Map a texture file on a group of faces

Hello everyone!

I'm able to map textures to the different faces of a shape with the AIS_TexturedShape class and SetTextureFileName(...). I can texture each face with a different image or the same image in all the faces of the shape.

However, I would like to correctly map one big image and project it on a group of faces. For example, with an image of a color scale, like the attached, I would like to map it on a shape and get different colors in the faces depending of its positions.

Is there any direct form of doing this?

Thanks in advance!


Kirill Gavrilov's picture

You need writing an algorithm, which would generate texture coordinates per triangulation node.

Alvaro Fernandez's picture

I was afraid of that answer :)

Does anyone know if there is available any similar example?