Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Xunil_RJ

2 textures coordinates for 1 vertex

This topic is 5317 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

oh...hello... i´m exporting my geometry from MAX with a plugin that i´m doing... everything is ok, just one problem... sometimes in the max the number of the textures coordinates is greater than the number of vertices... meaning that some vertices is using more then one terture coord. well... i believe that opengl VAR expect the number of texture coord to be the same that the number of the vertices... so i´m asking if the are some way to opengl expects the number of the texture coord the same as the indices? or i will have to duplicate the vertices with more then one texture coord ?

Share this post


Link to post
Share on other sites
Advertisement

hi.

>>well... i believe that opengl VAR expect the number of texture
>>coord to be the same that the number of the vertices...
you are right:
OpenGL expects same number of U/V''s as number of vertices - what you meant is called "multiple index buffer", but it hasn''t arrived until know in OpenGL (i think it''s planned for GL2.0, IIRC)

>>of the texture coord the same as the indices?
i have never heard of one.

>>or i will have to duplicate the vertices with more then one
>>texture coord ?
yes, this is necessary if you have "hard edges", or if you want to calculate smoothing groups.
BUT: you shouldn''t construct your geometry on a per-triangle comparison, but on a per-face comparison; so you will have the complete 3DSMAX model "flattend" - then you can optimize, e.g. find vertices with _exactly_ the same uv/normal.





DJSnow
---
this post is manually created and therefore legally valid without a signature

Share this post


Link to post
Share on other sites
Yeah, I had noticed the same problem with Max file exports. They try to keep file size down, so they keep positions and texture coordinates separate and then different texture coordinates can relate to the same position.

In the end, I wrote a file converter that converted the Max file into an OpenGL friendly file. Where positions were duplicated to match the number of texture coordinates.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!