Transparency


mumblyjoe
06-15-2003, 11:40 PM
How to you make a texture transparent?

PedroTheLion
06-15-2003, 11:42 PM
look in Danza's modeling FAQ, he has a link to a tutorial.

HS The Whap
06-15-2003, 11:42 PM
its the last colour in the little colour thing

Genie
06-16-2003, 03:38 AM
Very good description there HS the Whap :D

transparency is generally pretty easy, make ur texture then when ur all done w/ it go (assuming you use Adobe Photoshop) to image/mode/color table. Go to the very last color on the table and choose a color that is not allready been used. Example-bright neon pink. It easiest to do that after you make the texture because if you make it as you're going along it, the color you used wont be the last color in the table and trying to make it that wont work, you have to get a new color and fill the area back in.

ok hard part over.

save ur bmp as index color mode, import it w/ HLMV or "install" w/ milkshape if you are making your own model. Then you have to edit the .qc file. You can get to it by using Kraisto's decompiling tools located in milkshape, or by downloading mdldec and setting it up to run as a right click interface.

I posted a tutorial about that but it died, if u need help on right click interfacing PM me.

anywhere in the .qc file add the line

$texrendermode "texture.bmp" "masked"

where "texture.bmp" is the name of the file you want to have transparency. A little side note, any bmp file w/ transparency in it will lose a good amount of detail so if you're making your own model, it's best to make the transparent object it's own group/use it's own texture.


Hope that helped.

mumblyjoe
06-16-2003, 04:07 AM
I do use Photoshop and I've tried using the 'Blue-Screen" Blue as all other programs use it. I'm asking this because I got a model that was supposed to have transparency and it didn't work.

Genie
06-16-2003, 05:01 AM
You're dead sure the last color in the table is the exact shade of blue you are using, and that it isn't anywhere else in the table?

=DD=Wolf Kahler
06-16-2003, 10:23 AM
Yeah, the problem with that is that the transparency colour -has- to be the last of 256 colours. If you switched the texture to Indexed, but it only had to index less than 256 [say you're working with a metal texture that has very little tone differences], you'll have to fill in the rest of the index so that there are exactly 256 colours. Then make the last one the blue you want.

It's a shame Photoshop doesn't have indexing tools as friendly as Deluxe Paint.

No, that's not the MS Paint crap. I'm talking about the program EA Games wrote when they started up to help them design and animate 2D objects and characters. People could do stuff with that you would -believe-. Even in grayscale, where it really only had sixteen shades of gray. *sigh*

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.