Blender 'Set Smooth' Functionality

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
User avatar
bana
Greenskin
Posts: 132
Joined: Mon Aug 02, 2004 7:40 am
Location: Austin, Texas
Contact:

Blender 'Set Smooth' Functionality

Post 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
Last edited by bana on Sun Jan 09, 2005 8:06 am, edited 1 time in total.
A proud member of the OpenFrag Coding Team.
http://coolhands.blogspot.com/

iq
Greenskin
Posts: 125
Joined: Mon Oct 20, 2003 8:25 pm

Post 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)

reimpell
OGRE Contributor
OGRE Contributor
Posts: 570
Joined: Mon Mar 01, 2004 10:35 am
Location: Hamburg, Germany

Re: Blender 'Set Smooth' Functionality

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

User avatar
bana
Greenskin
Posts: 132
Joined: Mon Aug 02, 2004 7:40 am
Location: Austin, Texas
Contact:

Post 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?
A proud member of the OpenFrag Coding Team.
http://coolhands.blogspot.com/

User avatar
DWORD
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 1365
Joined: Tue Sep 07, 2004 12:43 pm
Location: Aalborg, Denmark
Contact:

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

User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19265
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 66
Contact:

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

iq
Greenskin
Posts: 125
Joined: Mon Oct 20, 2003 8:25 pm

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

Post Reply