Smoothing Groups - Normal vector calculation

Started by
3 comments, last by rick_appleton 19 years, 7 months ago
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!
Advertisement
Check out this thread.
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 :)

Niko Suni

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

This topic is closed to new replies.

Advertisement