• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

2D Art Help: Trying to make glass/windshield

Shurek

Grizzled Veteran
May 21, 2006
857
13
www.darkesthourgame.com
Howdy,

I'm hoping one of you texture artists/2D art gurus can help me out with some information on how to create a proper glass texture.

I imagine it goes a little something like this. First, you lay down a transparent alpha layer. Next on top of that you add a diffuse layer (or layers) with scratches, dirt, other blemishes, etc. You merge the layers and export the file as .dds. You import the texture into the editor, check mipmaps, and then set the texture properties as Masked and Two-Sided (or is it Alpha and Two-Sided?).

Well, I've tried that and unfortunately it appears that is not correct, or at least not the way I did it. I can get a transparent texture into the editor but it is not truly two-sided. If I set it as Masked, while the texture appears to be clear, however, static meshes and other objects are not rendered on the other side. If I set it as Alpha, then I am able to see through to the other side, however, my diffuse layer of scratches and dirt appears mutilated with strange colors and artifacts.

Okay, what am I doing wrong here?
 
Transparency Tutorial

Transparency Tutorial

Well, I don't claim to be a 2D guru of any sort but this should help. And hey, what else am I supposed to do all day with this dodgy internet connection? :rolleyes:



Text version

1. In Photoshop, create a New File with a transparent background.
2. Create your texture using layers for each separate material.
- Use the Opacity box to adjust the transparency for each layer individually.
- The hole in the glass was made by simply deleting that part of the glass layer and exposing the background (checkered).
3. Save the file as D3D/DDS (*.DDS) and choose (Explicit Alpha) DXT3 or DXT5 (Interpolated Alpha).
4. Import the file into the Red Orchestra editor via the texture browser (File > Import...). Be sure turn on the Alpha checkbox. If you forget or ever want to change this you can go into the texture properties (RMB + Properties over the texture in the Texture Browser to bring this up) and look under Surface.
5. You
 
Upvote 0
What I do to get alpha into non-alpha textures is to create a shader and use the texture in question as "diffuse". Then I create a ConstantColor and change the A value of its RGBA color representation to the alpha value I want the texture to have and then I use that ConstantColor material as "Opacity" in the shader with the texture.
Only works if you want your texture to have the same alpha value everywhere, but for glass this works quite well.

I haven't had any problems with this regarding objects appearing "in front of it" although they should be behind it.
 
Upvote 0
1. In Photoshop, create a New File with a transparent background.
2. Create your texture using layers for each separate material.
- Use the Opacity box to adjust the transparency for each layer individually.
- The hole in the glass was made by simply deleting that part of the glass layer and exposing the background (checkered).
3. Save the file as D3D/DDS (*.DDS) and choose (Explicit Alpha) DXT3 or DXT5 (Interpolated Alpha).
4. Import the file into the Red Orchestra editor via the texture browser (File > Import...). Be sure turn on the Alpha checkbox. If you forget or ever want to change this you can go into the texture properties (RMB + Properties over the texture in the Texture Browser to bring this up) and look under Surface.
5. You
 
Upvote 0
hmm, driving no smoke vehicle? :)
You can see through smoke through alphas, at least through edges with high alpha part, basically every fence. Make sure you wont get that issue there -.-

Edit: hm, just now read your second post, might be an issue for the smoke too. If so, nvm ;) Pity there wouldnt be an easy way to fix this if its true.
 
Last edited:
Upvote 0