Transparent model + model quality

Hi,

QUESTION 1:
Maybe I don’t do my research the correct way in the documentation but I can’t find a way to make a model semi-transparent by setting the alpha…

For example, if I have the model of a flying baloon with his normal texture, I want the model to be semi-transparent so you can see the texture but can also see through it.

Is it possible? I’ve done some OpenGL before and it was possible so I guess it is in Panda3d. Also, if it’s possible, what am I doing wrong when searching in the documentation? Do you have any trick for a good search ? Don’t forget, I’m a newbie at Panda3d.

QUESTION 2:

I’m using the planet model found in the example of the solar system. When I make the planet bigger, I can see the plane that make the sphere. Is there a way with filter or something to make it look better or do I need a better model?

Thanks a lot :slight_smile:

Jaff

On every object, you need to enable transparency first. The easiest way is:

(In case this gives not good quality transparency, try other transparency modes.)

To make a model transparent, you can set its alpha scale:

model.setAlphaScale(0.5)

(With apologies to ynjh_jo, but now we know for sure that we wont reset the model’s vertex colors :wink:)

About your question two, I don’t know how the textures are created. You can try setting a different transparency mode (if its enabled at all, if not, enable it), or maybe the textures dont even have an alpha channel. If so, you’d have to add it yourself.

pro-rsoft, I guess you addressed setColorScale.
My question : how do you know that it changes vtx color ?
Doesn’t P3D perform color scale via lighting ? So the vtx color shouldn’t be changed. If indeed it’s changed, then it must be expensive, changing vtx color every frame ?

About the other thread, have you checked it again ? There is BIG difference.