Post by thatdarnowl on Dec 24, 2023 11:09:28 GMT
Creating Masked Textures
Question Submitted By: Jaks
How do I make textures for the game that have areas that can be seen through (transparent)?
Answer Category: Mapping / Embrace
To do this you first need to create your texture and prep it in a graphics editor then specially prepare the textures .nam file.
Although this can be accomplished by most graphics program I am using the Paint Shop Pro interfaqce in the below example to explain it, but it can be applied to other graphic editors out there.
First save your texture as a tga file (the usual 24bit, uncompressed). Then
color all areas of the image that you want to be transparent with black
paint. Then go to your masks menu and select mask->new->from image. A dialog will
show up, select "Any non zero value" and make sure the drop down says "this window", your black painted areas should turn
white. No go back into the masks menu and choose "Save to Alpha Channel", make
sure the filename of your texture is in the drop down box and click OK.
Give the channel a name (anything will do) and your texture is now prepared.
Last thing you need to do is make a quick edit to your textures .nam files.
Basically all you have to do is add the keyword "masked" to the file beneath
your texture statement like so:
texture vine.tga
masked
and save it. Be sure to save your texture to both your subdirectory and the
main materials directory else it wont show in game.
Thats about it. Masks are great for adding dirt to floors in uneven patterns, cobwebs, hanging foliage, etc... Im just beginning my experimentation with it and no dount Im gonna find dozens of good uses and nifty tricks. Let us know if you find anything useful above and beyond making irregular shaped tiles.
Oh by the way if your transparent sections of your brush intersect any walls or floors they overide that brushes material in the intersected area and make it see through, resulting in holes in your structures and buildings, so place these carefuly or set the surface properties of the texture in Embrace to decal, NO CSG, NO lightblock, NO lightmap.
-Jaks
Question Submitted By: Jaks
How do I make textures for the game that have areas that can be seen through (transparent)?
Answer Category: Mapping / Embrace
To do this you first need to create your texture and prep it in a graphics editor then specially prepare the textures .nam file.
Although this can be accomplished by most graphics program I am using the Paint Shop Pro interfaqce in the below example to explain it, but it can be applied to other graphic editors out there.
First save your texture as a tga file (the usual 24bit, uncompressed). Then
color all areas of the image that you want to be transparent with black
paint. Then go to your masks menu and select mask->new->from image. A dialog will
show up, select "Any non zero value" and make sure the drop down says "this window", your black painted areas should turn
white. No go back into the masks menu and choose "Save to Alpha Channel", make
sure the filename of your texture is in the drop down box and click OK.
Give the channel a name (anything will do) and your texture is now prepared.
Last thing you need to do is make a quick edit to your textures .nam files.
Basically all you have to do is add the keyword "masked" to the file beneath
your texture statement like so:
texture vine.tga
masked
and save it. Be sure to save your texture to both your subdirectory and the
main materials directory else it wont show in game.
Thats about it. Masks are great for adding dirt to floors in uneven patterns, cobwebs, hanging foliage, etc... Im just beginning my experimentation with it and no dount Im gonna find dozens of good uses and nifty tricks. Let us know if you find anything useful above and beyond making irregular shaped tiles.
Oh by the way if your transparent sections of your brush intersect any walls or floors they overide that brushes material in the intersected area and make it see through, resulting in holes in your structures and buildings, so place these carefuly or set the surface properties of the texture in Embrace to decal, NO CSG, NO lightblock, NO lightmap.
-Jaks
Social Media