Sign in to follow this  

Smoothing me some normals.

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


Best way to smooth normals. I know of one method, not sure if it's very memory efficient.

The informations you gave us are very sparse.

 

1. Which criterion do you use to qualify what good, better, and best is in this context?

2. What does "smooth normals" mean? An average of normals as it occurs when computing a vertex normal from the normals of surrounding faces? Or an interpolation of normals as it occur to fill gaps between samples? Or realigning existing normals to appear smoothly arranged? Or something else?

3. Which method is the one you know?

4. How is normal "smoothing" meant to be memory efficient / inefficient?

Edited by haegarr

Share this post


Link to post
Share on other sites

 


Best way to smooth normals. I know of one method, not sure if it's very memory efficient.

The informations you gave us are very sparse.

 

1. Which criterion do you use to qualify what good, better, and best is in this context?

2. What does "smooth normals" mean? An average of normals as it occurs when computing a vertex normal from the normals of surrounding faces? Or an interpolation of normals as it occur to fill gaps between samples? Or realigning existing normals to appear smoothly arranged? Or something else?

3. Which method is the one you know?

4. How is normal "smoothing" meant to be memory efficient / inefficient?

 

 

Most memory efficient way I mean. Sorry for not clarifying at first. 

Share this post


Link to post
Share on other sites
// set all normals to zero
for each vertex normal (n)
  n = 0,0,0

// add in each face normal to each vertex normal
for each face
  fn = calculate face normal 
  for each vertex normal in face (vn)
     vn += fn

// normalize normals
for each vertex normal (n)
  normalize(n)

Share this post


Link to post
Share on other sites
// set all normals to zero
for each vertex normal (n)
  n = 0,0,0

// add in each face normal to each vertex normal
for each face
  fn = calculate face normal 
  for each vertex normal in face (vn)
     vn += fn

// normalize normals
for each vertex normal (n)
  normalize(n)

This algorithm calculates a vertex normal by averaging normals of surrounding faces. While there is nothing inherently wrong with it, one usually wants to consider a weight so that the face normals have differently rated influence. A typical weights are the face areas, another is the angle of the face at the vertex of interest.

Share this post


Link to post
Share on other sites

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