I spend many time to mask my tree but lose
tree.setTransparency(TransparencyAttrib.MAlpha)
lowPassFilter = AlphaTestAttrib.make(RenderAttrib.MUnused,0.5)
tree.setAttrib(lowPassFilter)
tree.setAttrib(DepthTestAttrib.make(RenderAttrib.MLessEqual))
Can I mask texture in panda3D
upload.hunsa.com/img.php?image=0 … titled.jpg
Thank You
drwr
November 20, 2009, 3:03pm
2
What texture format are you using for your tree? Are you sure that it has an alpha channel? Panda will automatically mask out the parts where alpha = 0 when you enable transparency; you don’t need to fiddle with AlphaTestAttrib or DepthTestAttrib.
David
My texture format is .bmp file
I think it has not alpha channel but How to try or it is impossible
thx
drwr
November 20, 2009, 3:28pm
4
Correct, .bmp format does not support alpha, at least not with Panda’s bmp reader. Save your texture in .png or .tiff format to keep the alpha.
David
wezu
November 20, 2009, 3:40pm
5
Or you could use a separate grey scale map for transparency and put it in your modelling software