I've read that a 1bit alpha channel can be stored in a DXT1 texture. Does anyone have experience doing this and could explain how to go about it? Would using the alpha of the diffuse in this way work well for transparency, masking, and the performance of those two?
I'd also like to use the blue channel of my normal maps for other things whenever possible. The first thing that comes to mind is for a height map, but I'm not sure I would generate a height map for everything.
Is there some type of map or method that could add crispness to the normal details? Normal details tend to average out and smooth, and while a specular map can be used to indicate that there are still details and surface variation, does anyone have a method of preserving the "sharpness" that I could use the blue channel for? I don't mean using a tiling texture to add noise; I mean making up for the detail shortcomings of normal maps.
Replies
Do you mean for something like parallax occlusion mapping? In any case, if you're using your blue channel for something else, you'll need to make sure your shader is only looking at the RG channels and recalculating the blue component.
I'm really asking for suggestions here. Using a heightmap for parallax is what I've thought of so far, but I wasn't sure if there were other uses that people had for the space. I was curious if anyone had a method of preserving details (maybe with some type of greyscale bump? I really don't know). Just looking for ideas.
I'll have to defer to someone else for the second bit, though.
So there is no difference in the quality of the of the colours stored, but you will see a loss in the number of colours that can be generated for a given 4x4 block when a zero alpha is required.
If C0 > C1 then we have 4 colours in a 4x4 block
C0 = Stored 565
C1 = Stored 565
C2 = 2/3 C0 + 1/3 C1
C3 = 1/3 C0 + 2/3 C1
When Zero alpha is needed in the 4x4 block then the following is used
if C0 < C1 then we have 3 colours in a 4x4 block and 0
C0 = Stored 565
C1 = Stored 565
C2 = 1/2 C0 + 1/2 C1
C3 = 0
Hope this helps, for more info you can read here
R8G8B8A8 - 1:1 no compression
- 2048 x 2048 = 16.0MB
- 1024 x 1024 = 4.0MB
- 512 x 512 = 1.000MB
DXT1 - 8:1 compression (optional 1 bit alpha)
- 2048 x 2048 = 2.0MB
- 1024 x 1024 = 0.5MB
- 512 x 512 = 0.125MB
DXT5 - 4:1 compression (8 bit interpolated alpha)
- 2048 x 2048 = 4.0MB
- 1024 x 1024 = 1.0MB
- 512 x 512 = 0.250MB
G8 - 1:1 no compression, single channel
- 2048 x 2048 = 4.0MB
- 1024 x 1024 = 1.0MB
- 512 x 512 = 0.250MB
I've also found from various places that the blue channel gets altered a bit, creating possible artefacts. I've noticed this myself when trying to use the blue channel of a normal map for something else (for instance a specular map). (Importing as default rather than NormalMap reduced this.)