DiscussionsIssue archiveVisualization and 3D Viewer

Archived discussion

Map a texture file on a group of faces

Visualization and 3D ViewerWed, 03/20/2019 - 19:122 replies

Browse this forum
QuestionAuthor

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!

Álvaro
 

Discussion

2 archived replies

Posts are displayed in their archived order.

01Commenter-1

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

02Author

I was afraid of that answer :)

Does anyone know if there is available any similar example?

Thanks!