2
\$\begingroup\$

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: How do I use setFilmSize in panda3d to achieve the correct view?

\$\endgroup\$

2 Answers 2

4
\$\begingroup\$

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

thenodePath.setTransparency(True)
\$\endgroup\$
3
\$\begingroup\$

Actually there are multiple transparency modes:

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

The manual explains these stuff.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .