Q3: How do I make a transparent object?
A3: This is a simple sample that makes a 50% transparent mesh pyramid that uses the rock texture:
material
name alpha_rock
texture wall
notexalpha
color 1 1 1 0.5
end
meshpyr
name Pyramid
matref alpha_rock
position 0 0 0
rotation 0
size 10 10 10
end
A fully transparent object can be made by:
material
name transparent
color 0 0 0 0
end
meshbox
name box
matref transparent
position 0 0 0
rotation 0
size 10 10 10
end
Q4: How do I make a translucent object?
A4: There are 3 ways to make an object translucent:
1. use a translucent texture (without using notexalpha)
2. use a translucent color
3. use a translucent dynamic color
Translucent faces take more time to draw because they require sorting to draw them from back to front (note that bzflag currently does a poor job on this aspect). As well, you never get the depth buffer clipping that you'll get from opaque objects. This means that each pixel will have to have all of its rendering information processed even if it is behind a plane.
I would advise keeping the number of translucent faces in any given map to a bare minimum. As well, try to keep the translucent faces small, so as to avoid the ugliness that is caused by bzflag's poor sorting algorithm.