Sign in to follow this  

Smoothing Groups - Normal vector calculation

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

Hi So far I developed applications that required to calculate normals : 1. per-vertex to average normal vectors (smooth shading) I think its called Phong Shading. Am I right? 2. per-face (flat shading) But I dont really understand what people mean saying smoothing groups. They are also used in 3D Studio Max. Is it something that I could also develop for my little DirectX demos to improve shading? Could you please explain technically what smoothing groups are. Ive done search on this and there is not much about it. Also links would be cool. Thx!

Share this post


Link to post
Share on other sites
Quote:
Original post by papa
1. per-vertex to average normal vectors (smooth shading) I think its called Phong Shading. Am I right?

No. Phong shading describes the interpolation method with which the primitive color is calculated between the vertices during the rasterization phase. Phong, in this context, means that the primitive color calculation evaluation happens per-pixel, as opposed to Gouraud (per-vertex).
Quote:

2. per-face (flat shading)

Means that each vertex of a given triangle has the same normal, effectively making it look like a flat triangle when shaded even via Gouraud or Phong shading. Common renderer implementations of flat shading take into regard only the triangle's first vertex's normal, and using it across the whole triangle when calculating lighting, saving computing time.

Quote:

But I dont really understand what people mean saying smoothing groups. They are also used in 3D Studio Max.

Is it something that I could also develop for my little DirectX demos to improve shading?

Could you please explain technically what smoothing groups are. Ive done search on this and there is not much about it. Also links would be cool. Thx!


Smoothing groups are only tools to achieve averaged normals across arrays of adjacent polygons. It is simply an algorithm, no more, no less.

You could implement your own normal averaging algorithm for a DirectX program, but personally I find it more intuitive to use an art package to do that, thus leaving out much guesswork.

EDIT: Rick's explanation in the other thread is nice also :)

Share this post


Link to post
Share on other sites
ok. So phong shading is per-pixel shading.

I calculate average normal for a vertex based on the neighbouring 4 vertices (it is per-vertex). So what technique is this? is it? Gouraud shading? or something else?.


Well anyway. This is not my main question. I know how to calculate per face normal and per vertex. it dead easy. Let close this subject. I need to know what Smoothing groups are technically. How do you determine if a part of the mesh belongs to smoothing group 1 or 2 or 3 etc.. This is my point.

Share this post


Link to post
Share on other sites
Normally the art package has a way to specify this.

I can explain how to do it in 3D Studio Max, but I don't know any other packages.

Edit: Just noticed your original post.
1. Select the object.
2. Go into sub-edit mode, select 'polygons' or 'triangles'
3. Select the polygons whose smoothing group you want to change.
4. Scroll all the way to the bottom.
5. You'll see an array of 20 or so buttons with numbers on them. If you select a button, that number will be assigned to the selected polygons.

You will see that if two triangles share an edge, and the both have at least 1 smoothinggroup in common, the edge will be smoothshaded (--> the normal of the triangle will be interpolated). If they do not have at least one group in common, then the edge is hard.

Share this post


Link to post
Share on other sites

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