Textures transparency (alpha)

Hello, is there a way to apply a texture on another with an alpha blending effect (transparency) of the obove over the below one without having a specific alpha channel, setting an alpha value? I dont think default modulate mode or other modes like add would do the case. For example if i have a lightmap texture that has just the lighting images to apply to the default texture with multitexturing i dont think that using one of the supplied modes would be good…
Bye

Hey, welcome to the forums!

If I understand your question correctly, you want to use an alpha map to control the transparency of the model, or want to blend multiple textures using an alpha map?

You may not be able to achieve either effect by means of the default texture modes indeed. But you can still get more custom behaviour by using combine modes. These are discussed on this page:
panda3d.org/manual/index.ph … bine_Modes
In particular, you may want to look at the ‘interpolate’ mode.

Usually, light maps are applied onto a model using the ‘modulate’ mode (where the underlying texture will be unmodified when the light map is white, but it will be darkened where the light map is darker.)

Did this answer your question adequately?

Yes i think so, but what TextureStage.COSrcAlpha operand means, that it must use the alpha channel that the texture eventually has? So TextureStage.COSrcColor means to use the actual color texture.
That is to say the command is :

ts.setCombineRgb(TextureStage.CMInterpolate, TextureStage.CSTexture, TextureStage.COSrcColor, TextureStage.CSPrevious, TextureStage.COSrcColor, (Alpha value 0 - 1), TextureStage.COSrcColor)

But could you just make a standard texture mode like setMode.(TextureStage.MAlpha) with an alpha value to set?
Thanks

Panda3D simply exposes the modes that the graphics API (exposed by the GPU drivers) provides. It’s true that it could be easier to add such a mode on top of the provided modes, but I’m not sure if this situation is common enough to justify creating a special mode for this.

I understand, well ok but is the command i provided correct?
Plus i wanted to ask a question on Panda3d engine when will be available shadows on omni lights? Is is the only important lack that there is in this engine it would become very complete with that!
Thanks bye

Upon quick glance, it seems that it interpolates between the current texture and the previous texture based on an alpha value (which I assume is supposed to be an alpha map). That seems correct, yeah.

I don’t know when support for shadows in point lights will become available.

Another question, how do you use ts.setcombinealpha to exclude the alpha channel of a texture if you don’t want to use its alpha channel?
Thanks

Hey no reply yet to my last question?..