I know I can make an object totally invisible but can you set the transparency level so that it’s 50% transparent for example ?
You can, yes, I do believe.
The exactitudes depend on just how your model it set up. Two simple approaches are these:
- If your object is textured, then you can simply make the texture semi-transparent.
- You can call “setAlphaScale(0.5)” on your NodePath.
That said, note that if your object isn’t initially detected to have transparency (by virtue of having a texture with an alpha-channel or a vertex-colour with an alpha-value less than one, I think), then you may have to manually indicate to Panda that it is transparent. This can be done most simply by calling “setTransparency(True)” on your NodePath.
(Although there are more-complex approaches for certain types of transparency.)
When using autoshader, you can set transparency through the material.
material.setDiffuse((R,G,B,0.5))
1 Like