Jump to content
• ### What is your GameDev Story?

• Advertisement

# Question about normals

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

##### 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

##### 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

##### 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

##### Share on other sites

• Advertisement
• Advertisement
• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

(You must login to your GameDev.net account.)

• ### Popular Now

• 17
• 14
• 10
• 9
• 11
• Advertisement
• ### Forum Statistics

• Total Topics
634094
• Total Posts
3015499
×

## Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!