smoothing groups

Started by
0 comments, last by meeshoo 17 years, 9 months ago
Hey, I have been looking around for info on how smoothing groups are calculated but I don't seem to find any info on it. First of all I am still confused as to what smoothing groups is - is it just another fancy name for vertex normals ? Also how would one go around doing a good job of rendering smoothing group models in OpenGL. I have an DirectX x file which has a model having smoothing group normals. It has 64 normals and the face indices it should be applied to. It seems like you wouldn't be able to do it one call using glDrawArrays and would have to go to immediate mode to do this. What would be the best way to use smoothing groups in OpenGL. Thanks
The more applications I write, more I find out how less I know
Advertisement
You can best learn what smoothing groups are in 3d studio max. No they cannot be calculated, just exported from a 3d modelling software package. If you want to understand smooting groups, just think of vertex normals. They are giving the impression that a certain polygonal surface is smooth and curved by lighting the polys properly. Now if you have a mesh that uses vertex normals, the mesh looks smooth and curved. But let's say you don't want it to be smooth, you want a certain edge on the mesh to be visible. In this case, you create 2 smoothing groups (which are just identification numbers) and all the polys from one side of the edge will go into the first smoothing group and the rest will go into the second. If a vertex belongs to polys in different groups, then for that vertex different vertex normals are calculated for each group. By doing this, we acctually obtain visible edges because the smoothing groups are rendered sepparately, one group at a time(using let's say vertex arrays) and there are different normals for adiacent polys. The numbers exported from 3dsmax that identify smoothing groups are numbers that represent a single bit set to one in the whole value, which can easely be obtained using a bit mask.

You are right, you cannot do it in one glDrawArrays. You must split your mesh into submeshes, each submesh containing just one material and all polys of that submesh being grouped in the same smoothing group. Then you render one submesh at a time. You cannot render multiple smoothing groups at one time because of the multiple vertex normals along the edges of one group. Think for ex to a cube. In this situation, you will have different smoothing groups for each face, and for each vertex you will have 3 vertex normals, one for each face.

Hope it helps

This topic is closed to new replies.

Advertisement