Translucent textures


Neutrino
11-05-2005, 09:17 PM
Okay. so i just made a treeline texture which was necessary to have an alpha channel in order to have certain parts of it invisible ingame.

In order for the game to recognize this, i have to put a line in the vmt file that sets its translucent value to 1.
although this works, it also other translucent materials appear, even if its behind the treeline. it weird, and very noticable.

although, ive noticed that u can have transparent textures without using the translucent thingy. but im just not sure how this is done.

for example, in the following screenshot, the fence texture on the left have a transparent top that works fine. yet, you can see its not translucent (no T in the bottom left corner. and when i use this material, the problem i stated above does not occur)

http://img370.imageshack.us/img370/1395/thet8rs.jpg

so does anyone know how to do this? simply put, to make transparent materials/textures without changing the translucent value to 1 in the vmt.

travis
11-05-2005, 09:28 PM
http://developer.valvesoftware.com/wiki/Creating_a_Material_Tutorial

There is a lot of stuff on the valve wiki :E im sure ive seen someone post this on interlopers but i cant find the topic :E

Watchtower
11-05-2005, 09:33 PM
I believe you have to Neutrino. But in any case, if your having problems the alpha channel is probably bad. If you need help, send them to me via pm and Ill do them quick.

You cant just create a texture and tell it to be translucent in the .vmt file.

You have to create an alpha channel so the texture knows what areas are to be transparent and which are not (opaque).

btw -
"although this works, it also other translucent materials appear, even if its behind the treeline. it weird, and very noticable. "

-- typing a bit quick dude, not understanding ya

travis
11-05-2005, 09:42 PM
oh year i know what youre talkin bout watchtower~ same thing making translucent sprays since they are textures also

Neutrino
11-05-2005, 09:54 PM
lol. i start one sentence and forget to finish it

"although this works, it also other translucent materials appear, even if its behind the treeline. it weird, and very noticable. "

this means

although this transparency works, behind the treeline part of the material, i can see other translucent materials in the map (which are in the current point of view).

and yes, i did the alpha channel. i follow a very easy tutorial. the necessary area is wiped out in game, but in some certain areas, the problem that i stated above occurs.
it only occurs in some areas. its really weird. like at one time i use the texture, it will block on a certain radius in the top left of the texture.
then at another part of the map where i use the texture, it will do the same thing, but to a different part of it.
or it works fine all together.
this happens to me with no only my own translucent texture, but all of them.

here are some pictures:

GOOD: everything is fine
http://img133.imageshack.us/img133/6503/good14ls.jpg

BAD: sprites in the bg show, as do some models
http://img133.imageshack.us/img133/5289/bad16vi.jpg

Before/After: this is an odd one. It fades in and out when im in different areas. See the orange. It disappears when i move a foot back. U still see tree material behind it because i have a second treeline brush to give more depth.
http://img365.imageshack.us/img365/6439/ba12mv.jpg

there has to be a way to avoid this translucent thing. b.c look at the picture in the first post. the wooden fence does not have the T symbol represnting a translucent texture. yet it works fine. ive noticed this with a few other default textures as well. they all same to have a pure pitch black texture to represent what fades away. i dunno.

CoolHand
11-05-2005, 11:57 PM
Neutrino, here is the interloppers tutorial :

http://forum.interlopers.net/viewtopic.php?t=2132

ultranew_b
11-06-2005, 07:29 AM
The wood fence texture you posted in the first post does indeed have a different .vmt file, here it is:

"lightmappedGeneric"
{
"$baseTexture" "wood/woodfence001"
"$surfaceprop" "wood"
"$alphatest" 1
"%keywords" "dod"
}


It appears they use the "$alphatest" line instead of "$translucent".

Try this out.

:D

Neutrino
11-06-2005, 08:10 AM
thanks.
u know what. i was looking at the vmt of woodfence001a. i couldnt find just woodfence001.
lets see if this works

edit - beautiful. it does. so use alphatest for this type of dealy.

Trp. Jed
11-06-2005, 08:23 AM
I noticed something similar with a transparent texture I was working on. If you use normal 8-bit alpha transparency you get problems with it setting the z-order for transparent textures so you get objects in the background appearing in front of a transparent texture in the foreground. I had to use $alphatest but it seemed to "downgrade" the transparency to 1-bit like we have with DoD 1.3. :(

travis
11-06-2005, 08:53 AM
What's a game engine without eccentricities.

Neutrino
11-06-2005, 11:14 AM
cool sig travis. but u are at least missing one. SKIP
:)

Trp. Jed
11-06-2005, 11:38 AM
Originally posted by travis
What's a game engine without eccentricities.

Not made by Valve?

Ginger Lord
11-06-2005, 12:01 PM
Originally posted by Trp. Jed
Not made by Valve?

*ba-doom-tish*

pedroleum
11-06-2005, 02:10 PM
Originally posted by Trp. Jed
I noticed something similar with a transparent texture I was working on. If you use normal 8-bit alpha transparency you get problems with it setting the z-order for transparent textures so you get objects in the background appearing in front of a transparent texture in the foreground. I had to use $alphatest but it seemed to "downgrade" the transparency to 1-bit like we have with DoD 1.3. :(

same here. got my cars only working with $alphatest 1

i used an alpha channel (8bit) only at the steering wheel. it was in the same texture as the rest of the model. compiled, it looked somhow inside out. (normals were not flipped or something) so, i gave the steering wheel its own texture (and there was no alphachannel in the main texture anymore) then the whole thing worked with setting it to $translucent 1.

having two textures is not the solution i was looking for, so i used $alphatest 1 on the original texture (with 8 bit alphachannel) instead. that way, the alphachannel got downgraded to 1 bit....
i kept it that way, since it doesn't really matter in terms of the steering wheel.

it would be a problem for half-transparent windows, though...

i'm wondering how they do the lamposts.. they have a half-transparent glass in them...

travis
11-06-2005, 05:37 PM
Originally posted by Trp. Jed
Not made by Valve?

zing~

Originally posted by Neutrino
cool sig travis. but u are at least missing one. SKIP
:)

Theres a lot more tools than just skip :P I just thought I'd try a little something, if people see the tools enough they may actually use them from time to time :)

Day of Defeat Forum Archive created by Neil Jedrzejewski.

This in an partial archive of the old Day of Defeat forums orignally hosted by Valve Software LLC.
Material has been archived for the purpose of creating a knowledge base from messages posted between 2003 and 2008.