Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I need to map a partially transparent texture on a flat quad with panda3d. With the quad as a canvas I'd like to create something like sprites positioned in the 3d coordinate system.

isometric tree

I wanted to render a tree. As you can see the color values of the trees border have been stretched over the texture. How can I change the texture mode to include the alpha channel ?

I just don't know how to get hold of the right settings. A link to the right manpage would be perfect. If you need more information about the setup you might want to look at my other question: problem with isometric rendering

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

ThomasEgi on the panda3d irc channel solved the problem. It's actually embarrassingly simple. You need to call

thenodePath.setTransparency(True)
share|improve this answer
add comment

Actually there are multiple transparency modes:

np.setTransparency(TransparencyAttrib.MAlpha)
np.setTransparency(TransparencyAttrib.MDual)
np.setTransparency(TransparencyAttrib.MBinary)

The manual explains these stuff.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.