Page 1 of 1

Blender 'Set Smooth' Functionality

Posted: Sat Jan 08, 2005 5:02 am
by bana
<edit>I have exported four models (from Motorsport) one with the double vertices, and one with them removed. Then both of these with the blender option of 'Set Smooth' and one with 'Set Rough'. And yet I seem to have two different looking models. </edit>

What actually does the Set Smooth or rough parameter do? The reason I was wanting to use this is the original model was non manifold (due to the technique of vertice stacking to create sharp edges with the set smooth button). And I proceeded to make it manifold (or moreso) with the remove doubles option. That seemed to change the appearance pretty drastically in Set Smooth, although not in Rough at all.

Does Smooth or Rough actually change the geometry, or just the shading method? If the latter, then why do these models look different (same geometry except for double vertices).

Double Vertices Smoothed:

Image

Remove Doubles Smoothed:

Image

Both Double and Removed in Solid:

Image

Posted: Sat Jan 08, 2005 6:02 pm
by iq
With smoothing neighboring tris share vertices (and the vertex normals are interpolated from all neighboring tris) - without smooth each tri has it's own vertex with normal calculated from just this one triangle giving each triangle a flat look with sharp edges.

The geometry stays exactly the same* - just the shading is different.

I have no idea why remove doubles changes the way normals are calculated.
Normally you should be able to specify which vertices are shared (smothed) and which not and this should not change during normal operations (Wings does it this way)

(* note that #tris stays the same, but none smoothed models have a higher number of vertices)

Re: Blender 'Set Smooth' Functionality

Posted: Sat Jan 08, 2005 11:31 pm
by reimpell
As iq already mentioned, 'Set Smooth' only affects the way the normals are calculated and hence the shading. Using vertex normals averaged from adjacent faces just make edges look smooth. In Blender, you can use 'Set Smooth' for the whole object or on a per face basis.

However, it seems that Blender lost the "Set Smooth" information while applying the 'Remove Doubles' option. Just use "Set Smooth" again.

Posted: Sun Jan 09, 2005 7:58 am
by bana
Argh! I messed up those pictures (or more correctly: changed two variables and only told you about one) now it should make more sense.

So the double vertices do cause the shaded mode to look different because the normals (which are calculated differently in Smooth vs Solid mode) are stored in the .mesh file and not generated at runtime?

Does this mean that if you applied a normal map (from high poly mesh) that both the smooth, solid, double, or single vertices implementation would *look* the same?

Posted: Sun Jan 09, 2005 10:46 am
by DWORD
I'm don't know much about blender, but if you want to keep the original look of the model, you can't remove the double vertices. That is because it's only possible to store 1 normal for every vertex.

I think from your pictures, that set smooth/rough changes the shading in blender without affecting the underlying mesh. Remove doubles does change the mesh, and by removing doubles you also eliminate the possibility of 'hard' edges, because to get hard edges it's necessary to have two (or more) vertices at the same position with different normals.

Afaik Ogre will still detect the model as manifold eventhough some double vertices are present to give hard edges, so I guess you can have the correct look, and also use it with stencil shadows by jsut using 'double vertices smoothed'. Hope this helps.

Posted: Sun Jan 09, 2005 1:14 pm
by sinbad
DWORD wrote:Afaik Ogre will still detect the model as manifold eventhough some double vertices are present to give hard edges..
Yes, it will. The edge builder tries to 'weld' vertices at the same location whenever it can.

Posted: Sun Jan 09, 2005 5:59 pm
by iq
Ahh now it makes more sense - to restore the correct look in smoothed view without the shading errors all you should have to do is to select the edges surrounding the air intake, windscreen etc and set these edges to non smoothed/hard edges.
this should restore the correct shading by duplicating the vertices (same position, just different normals) again and yes ogre handles this correctly.