Jump to content
  • Advertisement
Sign in to follow this  
golgoth

Hard Edges and Vertex Index

This topic is 4437 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

Hi all! I m kind of confused here, let say I want a load a cylinder in my engine from a 3d package, export from xsi to collada for instance. when viewed in xsi the body, the top and the bottom caps are smoothed... but the edges between the body and the caps are hard edges... now, the top vertices of the body and the top cap share the same vertices (same for the bottom obviously) once exported... to get hard edges I would have to duplicate those vertices... but if I duplicate all vertices of the whole mesh... the body will now be hard edged... I obviously don’t want this... I m also aware that 3d package deal with this in term of smoothing groups... my question is, I understand the technique of "merging" vertices that are on top of each other... it is used to save space and loading time... but, once the mesh is exported, how can I tell some part of the mesh use smooth and others hard edges? this data seams to be lost somehow... is nt it a flaw in some way? What are the known solutions? Flag each edge with a smoothing group?… which leaves no choice but make our own export format?

Share this post


Link to post
Share on other sites
Advertisement
I agree 100%!

what if the format you are using does not?

and what would be the technical aspect of the smoothing groups? how does it work?

thx

Share this post


Link to post
Share on other sites
Smoothing groups are slightly different between different packages, but in general, if an edge is between two triangles that share at least one smoothing group, then that edge is smooth, else it's hard.

You get into quite a conundrum at the apes of a cone, though, as the bottom vertices should be shared, but the top vertex should be shared between individual tris, but not across all tris, or you'll get a single vert with a normal that points up. It's best to think of a cone as a cylinder where one cap has size 0.

Share this post


Link to post
Share on other sites
thx for your answer!

Quote:

if an edge is between two triangles that share at least one smoothing group, then that edge is smooth, else it's hard


how do you handle that? since we cant have more then one normal per vertex I ll have to duplicate the vertex right?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!