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.


Regards, Robert

Quote
Everything should be made as simple as possible, but not one bit simpler.
by Albert Einstein

PhysX Preview of Cloth, Fluid and Soft Body

A8.47.1P