Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/06/23 11:29
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
7 registered members (fairtrader, Quad, miwok, Martin_HH, AndrewAMD, alibaba, dpn), 581 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Overlay Question/Problem #84640
08/04/06 23:12
08/04/06 23:12
Joined: Oct 2005
Posts: 131
C
CBSection31 Offline OP
Member
CBSection31  Offline OP
Member
C

Joined: Oct 2005
Posts: 131
Hello,

I am attempting to create a map entity (WMB file) with partial transparency (textured via a BMP file) using the overlay effect. According to the 3DGS manual, WMB files do support overlay transparency, so I thought that it would be as simple as applying the texture to the model, making a WMB, and importing it into my level.

I created the WMB file and imported it, checked the "Overlay" option for the entity, and then built the level. But when I test the level, the black parts of the texture on the entity are still visible, even though overlay is on.

I first assumed that there was a problem with the texture. So, as a test, I imported the exact texture I used for the entity as a sprite, then built the level and tested it. The sprite worked perfectly, with the proper areas transparent. Yet the same texture does not work with overlay with a WMB file.

Do WMB files not support overlay, as the manual states, or am I doing something wrong? Thanks everyone!

Re: Overlay Question/Problem [Re: CBSection31] #84641
08/05/06 21:45
08/05/06 21:45
Joined: Aug 2005
Posts: 1,185
Ukraine
Lion_Ts Offline
Serious User
Lion_Ts  Offline
Serious User

Joined: Aug 2005
Posts: 1,185
Ukraine
Never used that. I'm using models only in my levels.
May be, You have to try 32bit TGA with alpha channel for a transparent entity?

Re: Overlay Question/Problem [Re: Lion_Ts] #84642
08/05/06 23:07
08/05/06 23:07
Joined: Oct 2005
Posts: 131
C
CBSection31 Offline OP
Member
CBSection31  Offline OP
Member
C

Joined: Oct 2005
Posts: 131
Thanks for the reply. Sadly, I just tried it with a 32-bit TGA and it did not work. If it helps, I could put together a small test file as an example of the problem.

Re: Overlay Question/Problem [Re: CBSection31] #84643
08/06/06 01:06
08/06/06 01:06
Joined: Aug 2005
Posts: 1,185
Ukraine
Lion_Ts Offline
Serious User
Lion_Ts  Offline
Serious User

Joined: Aug 2005
Posts: 1,185
Ukraine
Tried too. Had success with overlay=on and DDS (DXT1, ARGB) texture applied to the simple wmb cube.


Last edited by Lion_Ts; 08/06/06 01:20.
Re: Overlay Question/Problem [Re: Lion_Ts] #84644
08/06/06 03:28
08/06/06 03:28
Joined: Oct 2005
Posts: 131
C
CBSection31 Offline OP
Member
CBSection31  Offline OP
Member
C

Joined: Oct 2005
Posts: 131
Forgive my lack of knowledge, but is DDS a file format? I've been using BMPs and TGAs for images. Here are the files I've been using to test: www.upforums.com/test.zip

I created a wmb cube with the texture "test.bmp". The cube's filename is "object.wmb". In the level "test.wmp", I have two versions of the cube. One with overlay on and one with overlay off. They both have the black in them, though. Behind the cubes is the same texture displayed as a sprite with overlay. The overlay works properly on the sprite.

Do I have to use the DDS file format? Thanks again for your time and assistance.

Last edited by CBSection31; 08/06/06 04:04.
Re: Overlay Question/Problem [Re: CBSection31] #84645
08/06/06 11:09
08/06/06 11:09
Joined: Aug 2005
Posts: 1,185
Ukraine
Lion_Ts Offline
Serious User
Lion_Ts  Offline
Serious User

Joined: Aug 2005
Posts: 1,185
Ukraine
Yes, DDS is the file format. I'm using NVidia's plugin for Adobe Photoshop to save in.
May be, I'm doing something wrong too. I tried to save textures in BMP (24bit or 8bit indexed), TGA (24bit or 32bit), DDS (DXT1, DXT3 or DXT5), PCX. Therefore, (You can see it on the sshot) one entity displayed properly (with DDS texture applied), other are not.
Try to play with DDS file format (You have to rename test.jpg to test.dds after download. Download, not open in browser, it isn't jpg! I renamed it to comply rules of ImageCave uploading service): http://usera.imagecave.com/lion_ts/test.jpg
P.S. Apply material to an entity (avoids black outlines):
Code:

material overlayed_block
{
effect = "
texture entSkin1;
technique overlay {
pass P0 {
ZWriteEnable=True;
ZEnable=True;
AlphaBlendEnable=False;
CullMode = none;
Texture[0] = <entSkin1>;
AlphaRef=<200>; //play with it: ~128 or pass this value via mtlskill
AlphaFunc=Greater;
ColorArg1[0] = Texture;
ColorOp[0] = Modulate;
ColorArg2[0] = Diffuse;
}
}
";
}



Re: Overlay Question/Problem [Re: Lion_Ts] #84646
08/07/06 16:45
08/07/06 16:45
Joined: Oct 2005
Posts: 131
C
CBSection31 Offline OP
Member
CBSection31  Offline OP
Member
C

Joined: Oct 2005
Posts: 131
Okay, I'll give this a try. Thanks!!!

Re: Overlay Question/Problem [Re: CBSection31] #84647
08/08/06 01:52
08/08/06 01:52
Joined: Aug 2005
Posts: 1,185
Ukraine
Lion_Ts Offline
Serious User
Lion_Ts  Offline
Serious User

Joined: Aug 2005
Posts: 1,185
Ukraine
You are welcome.

Re: Overlay Question/Problem [Re: Lion_Ts] #84648
08/08/06 17:17
08/08/06 17:17
Joined: Oct 2005
Posts: 131
C
CBSection31 Offline OP
Member
CBSection31  Offline OP
Member
C

Joined: Oct 2005
Posts: 131
It works great! Even better, this also solved a z-sorting issue I was having with a model. Thanks again.


Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1