- This topic has 2 replies, 2 voices, and was last updated 8 years ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Home › Forum › SOFA › Using SOFA › Tex coords in OglModel
Tagged: 64_bits, SOFA_1503, Windows_10
Hello,
OglModel has a Data for defining triangles. How can I tell an OglModel which texture coordinate is associated to each of the local triangles vertices?
In particular, two triangles can share a vertex, but this common vertex can be associated with a different texture coordinate depending on the triangle. Can OglModel handle that?
I tested with a file loaded in the ‘filename’ attribute and it works. But I want to be able to do it with only Datas.
Thanks a lot,
Alex
A temporary solution is to break the topology so that each vertex is used once and only once by a triangle. The problem is we end up with duplicated vertices and Phong shading does not work (each triangle is independent and does not share anything with another triangle).
Hi Alex,
we discussed it (indirectly) morning in the Sofa-dev meeting.
We were talking about the Loader and Exporter: avoiding duplication of codes in loaders and exporters while keeping optimal components. OglModel came in the discussion since it not only loads obj files but textures as well …
Maybe Fred could help on this. Let’s keep in touch.
Cheers,
Hugo
WARNING
The forum has been moved to GitHub Discussions.
Old topics and replies are kept here as an archive.