Jump to content
  • Advertisement
Sign in to follow this  
johnnyBravo

What to do with vertex normals when sharing vertices between indices?

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

I'm using an index buffer to draw a sphere, but I just realized that the normals are going to have to be different for each face, but the faces are sharing vertices with other faces. Are there any tricks I can employ here? thx

Share this post


Link to post
Share on other sites
Advertisement
I think you have to either duplicate your vertices or just use the average normal... if a vertex has two different normals, then its really two vertices. This gets asked a lot but there's not really an easy way around it.

Share this post


Link to post
Share on other sites
Do people commonly use the average normal when creating grid based landscapes?

Because while I was searching other posts I came across one where someone said using the average one made the lighting blend better, so the faces themselves don't stand out so much.

thx

Share this post


Link to post
Share on other sites
If you want a sharp visible edge in your lighting, such as on a cube, you want new vertices with their own normals that point different ways. If you want lighting to transition smoothly between faces you want to use one vertex with a blended normal. There may be case where both are true for different faces, such as a cone. Between the faces on the top of the cone, you want shared normals. You'll want a hard edge to transition to the bottom of the cone, but those bottom faces can share vertices/normals with each other.

It's best to just let the 3D modelling packages and your artists worry about it for real models, but you do have to know about it.

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!