I have the following code:
self.tree1 = loader.loadModel(MYDIR+"/models/trees/palm1")
self.treeCol = CollisionNode('tree')
self.treeColNp = self.tree1.attachNewNode(self.treeCol)
I have tried both TGA and PNG files and verified that the images have Alpha that is visible in Photoshop, but in Panda, the cutouts around the leaves show as white.
Again, Im sure its something stupid and I allow at least 2 hours of digging through the docs and the forums before I ask.
Wow, that’s weird.
What is this actually for :
Did you try to set your leaves semi transparent, or just for debugging the transparency ?
Do you know that the default transparency mode is MAlpha ? So try change it to be MDual :
Have you read this :
Yes I have read that section 3 times.
I have been involved in computers and programming for 20 years, but am a stark novice at Panda… How much of that section do you think I understood?
Doesn’t sound like it applies to my case.
I will try the MDaul
The self.tree1.setAlphaScale(0.5) WAS just for debugging because I dont know what the hell im doing.
Setting to MDual appeared to work, thanks!
I don’t know why MDual should work when MAlpha does not, unless you have nested transparency in your model: transparent parts viewed behind other transparent parts. Is this the case?
Can you put screenshot here, and your original texture ?
I’m curious, seems that it’s the first time happened around here.
After further investigation, I found they both work.
My problem was quite a bit simpler…
“tree1” was using “texture2”