Sign in to follow this  

How to specify the normals of a cube ?

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

As Namethatnobodyelsetook said, you'll have to increase the number of vertices in order to get so called "sharp" lighting.

A cube isn't the best example, but in a lot of cases, people use "smoothing groups" so as to still share common vertices but have as little impact on lighting as possible. I think this gives a much better result when I write up terrain renderer's.

In the context of your cube, each of your 8 vertices is used by 3 different faces; if you were to calculate face normals for each of those, add them together, re-normalize (to maintain unit length) that would be a "smoothed normal". For a cube, you'd end up with an almost sphere-like shading pattern but with sharp sillouettes [smile]

hth
Jack

Share this post


Link to post
Share on other sites

This topic is 4592 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this