overlay textures

Good afternoon.
As I can overlay two textures in the same model.

for example in figure 1 is shown with a texture, and I want to add another texture on top that contains only the texture of the orange line shown in Figure 2.

Is poible do this?

I use blender for modeling and animation.


Yes, the manual has quite a bit of detail about this and other texturing techniques. Try reading from Multitexture Introduction.


I try does not work. I have a model that has a UV map, so changes texture with the following code:

ts = modelo.findTextureStage(’*’)
tex = loader.loadTexture(“textura/imagen1.png”)
modelo.setTexture(ts,tex, 1)

And then the following code to overlay the image with which I have dealt with transparent background.

tex2 = loader.loadTexture(“textura/imagen2.png”)
modelo.setTexture(ts,tex2, 1)

The images do not overlap, but replaced.


You don’t seem to be creating a new TextureStage – for each layer of textures, you’ll likely want a new TextureStage.

A simple example, replacing the second piece of code in your post (that is to say, omitting the assignment of the original texture):

newTs = TextureStage("overlay")
tex = loader.loadTexture("textura/imagen2.png")
modelo..setTexture(newTx, tex) # Note that we don't use the third parameter here