Mesh smoothing groups

Posted By: Stansmedia

Mesh smoothing groups - 11/21/12 23:33

Is it possible to disable mesh smoothing of a model? I have a model (a piano key), and I want the edges to be sharp - but the smoothing is making it look blobby. I need the vertexes to be connected for stencil shadows too so I cant just have unconnected faces.
Posted By: EvilSOB

Re: Mesh smoothing groups - 11/22/12 01:38

I dont KNOW if this will work, but maybe you could give it a try...

In MED, dis-connect the faces as if stencil shadows werent an issue.

Then re-calculate the normals for all faces.
(/Edit/Select_All while in triangle mode then /Object/Recalculate_Normals)

Then re-connect the faces using Vertex_Mode and the "Merge" button.

Then save WITHOUT doing another Recalculate normals.
This MIGHT work... Ive never tried it though.


In theory this same process could be achieved in another application
than MED if you use one... Assuming it works at all...


[EDIT] Ahhh crap! Thanks Uhwerk. I still keep thinking the
normals are stores for FACES, not vertices.
I know this is the case, but I have to remember to remember...


Posted By: Uhrwerk

Re: Mesh smoothing groups - 11/22/12 02:03

This won't work as the faces still share the vertices' normals.
Posted By: rojart

Re: Mesh smoothing groups - 11/29/12 12:06

Originally Posted By: Stansmedia
Is it possible to disable mesh smoothing of a model? I have a model (a piano key), and I want the edges to be sharp - but the smoothing is making it look blobby. I need the vertexes to be connected for stencil shadows too so I cant just have unconnected faces.

I tested many formats to get different smoothing group on a primitive model, but without success, maybe MED import/export or engine bug.

From the FAQ:
Quote:
Q. I've designed a model in MAX, and imported it in MED. It looks basically correct, but the MAX version seems to have more contrast and the edges are sharper.
A. This is most likely due to the material settings and smoothing groups. Some exporters have problems with that, so you might need to correct this in MED. First look into the skin Material Setup. Some exporters generate a high specular value, which "overshines" the texture details. Also, if smoothing groups are not properly exported, edges look too smooth due to the Gouraud shading. In this case you might need to duplicate the edge vertices in MED.

So, as a workaround you can use a Render State solution, I know it's not perfect.

Code:
MATERIAL* mShadeMode = {effect="technique ShadeMode{pass p0{Shademode = Flat;}}";}
...
ENTITY *cylinder = ent_create("cylinder.mdl",0,0);
cylinder.material = mShadeMode;


Or just Copy&Paste solution that works very well with stencil shadows, but increases your vertices and faces.


Maybe it helps.
Posted By: sivan

Re: Mesh smoothing groups - 11/29/12 12:44

in case of very simple models, a fairly easy method is to make it in WED, export as mdl7 with checked Faces separation ("Duplicates vertices belonging to different faces on convex blocks. This option prevents Gouraud shading."), and that's it.

Edit: or import complex model as fbx to WED and make the same export.
Posted By: Wjbender

Re: Mesh smoothing groups - 11/29/12 13:01

Also if your exporting from max for fbx see the "support normal per polygon vertex"
Option in the exporter.just mentioning because i saw the words max and fbx somewhere here
© 2024 lite-C Forums