Jump to content
  • Advertisement
Sign in to follow this  
Steve_Segreto

Question about normals

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

How do professionals handle the situation where a game level is comprised of a small number of sub-meshes (each with correct artist generated normals) and these sub-meshes are then connected to each other at random translations and rotations to form a maze for instance.

For example, say there are 3 meshes: A long corridor, a T-Junction and a Room. These 3 meshes can be connected together via translations and rotations to form a very simple maze level.

How do most people handle the abnormal normals that will result on the polygons where the different pieces touch each other? Do most engines "weld" those vertices together? Doesn't this bust instancing?

Share this post


Link to post
Share on other sites
Advertisement
I'd say only weld if the normals are not too different from each other. On a cube for example, there are sharp 90 degree angles so you'd better not smoothen the normals there. On a cylinder on the other hand, the face normals do not differ that much so you can safely weld and take the average normals.

if ( dotProduct( normal1, normal2 ) >= 1 - threshhold ) then
<weld>
else
<keep the vertices seperated, or at least refer to 2 different normals>

When dynamically building a world out of chunks, you could check the seams where two pieces connect, then alter the normals there in case they can be welded. I don't expect much smooth normals for maze like structures though, unless you use curvy connections. Normals at a edge where the wall bows 90 degrees shouldn't be smoothed.

Rick

Share this post


Link to post
Share on other sites
I'm not entirely sure if welding everything together would be such a good idea. But, correct me if I'm wrong as always, having separate parts lends itself well to (hardware)-instancing and occlusion/frustum culling.

And about the normals, does it really matter? I mean, in the situation that you're describing here, there's only a few excess normals, even if its like 500 excess normals, a decent videocard won't mind..

Share this post


Link to post
Share on other sites
Don't worry about it. At least until the extra verts become a performance issue, which is unlikely unless you're developing for the iPhone or something.

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!