Mesh Smoothing

I've been working with meshes in 3ds Max for a number of months now and felt like I was getting moderately comfortable with the system.  Just recently I've discovered that everything I save or export (regardless of the format, seemingly) is automatically smoothed out.  The only possible reason I can come up with is that an addition 1000 or so vertices are added to the mesh upon export.  I've just noticed, but it could have been happening to all of my models without my realizing it.

Is there some way to keep the angular features that the mesh originally has?  Or maybe to keep the program or script from "optimizing" the model?

I'm using the 3ds Max Sins Importer/Exporter, by the way.

Thanks for your help in advance!

6,615 views 15 replies
Reply #1 Top

Umm its actualy 'smoothed' in sins? Like the modifier 'smooth' (or turbosmooth)?

You have to typicaly incrase the vert count by like 30%ish it seems when exporting to formats like this because it needs to duplicate texture seam verts.

What version are you using?

Reply #2 Top

So I've just discovered.  I knew I hadn't set up any smoothing groups or autosmooth features, but when I experimented with those it created the exact effect I was seeing. 

I'm running 9.0 with 3ds Max and 1.0 of the importer/exporter.  I'm working to see if I can get rid of the autosmoothing right now, but if you've got any advice I'm all ears.

 

Reply #3 Top

Im not really getting you. Does the model LOOK diffrent in sins? (screenshots?)

The duplicate verts are nessesary, its entirely intended. Ironclads stuff is the same.

 

Also version 1 of That tool dosn't even support smoothing groups.

Reply #4 Top

Iv'e been trench deep in this stuff for a while, so maybe its going over my head. Maybe you mean you want a faceted style look on a mesh and its giving it a smoothed style look?

 

If you defiantly mean "Jan Van Der Weg's Sins of a solar empire maxtool", when he creates the normals/tangents he uses the faces surounding it - smoothing the lighting (and that is standard, thats where smoothing groups come in but he only did that in 2.0).

Reply #5 Top

It's weird.  I've gotten a couple of different results depending on whether I'm messing with the smoothing groups in "Edit Poly" or just the "smooth" modifier under Editable Mesh.

The model itself definitely has a faceted look, but when it's ported into Sins it's much smoother.  One part in particular bothers me; a portion of the lower saucer on the ship is depressed upward, creating a very angular multi-level look in the original model.  Once I export it and either add it into the game or re-import it, that depressed section of the saucer no longer as a multi-tier look, but is instead sloped. 

I can achieve that same result manually by smoothing the model out, but I'm stumped because I've not set up any kind of smoothing effect and have even gone as far as to apply a smoothing effect with an angle tolerance of 0 or 1 degree. 

The end result is an unaturally smooth model that creates ugly shadows and lighting effects.

Reply #6 Top

The smooth modifers actualy creates new geometery, the smoothing groups just do lighting stuff. Not sure how much into 3d you are yet. :P

 

Heres something to try, make the 'hard edge' a seperate element in the mesh (not weled together). See if it still has bad lighting.

Reply #7 Top

Thanks for the tip!  I'll try separating the edges to see if it helps out. 

It definitely sounds it's the smoothing groups that are creating the issues I don't like.  Is there a way to nix all of the smoothing groups in the mesh?

Reply #8 Top

Its not the smoothing groups, its the way vertex normals/tangents are generated, they use the normal/tangent of the face they touch added together and averaged down. So with angled faces you get a normal that is between them, that smooths the lighting values in game etc.

 

Using smoothing groups you could tell the export program (assuming it supported this) to not average the faces outside the smoothing group, crated a hard edge. That sins max tool dosn't support that in version 1.

 

I just looked at his code to make sure I wasn't talking the BS :P, it dosn't do any Smoothing group stuff, that basicaly means its treating each element in the editable mesh as a whole smoothing group effectivly.

Reply #9 Top

I did a picture! (NOTE: this was created with a... modded version of version 2.0)

The green lines are normals (pretty crap ones, ignore that its an example).

The one on the left has 2 smoothing groups for the top and bottom. The one on the left has a single SG. Two normals on the same vert location like that creates a hard edge in sins.

 

(That reminds me about something I have to invistigate... texcoords...)

Reply #10 Top

Yeah, I was thinking along the same lines, element-wise.  I separated the lower saucer into distinct elements representing each tier I wanted to be able to distinguish.  So far I'm getting the same smooth result, but I've got a few more ideas to try.

Reply #11 Top

That pictures makes a lot of sense (thanks).  The section of the model I'm frustrated with definitely has the two normals extending outward from the edge, but I haven't had any success yet.  How do I make sure they aren't averaged during exporting?

Reply #12 Top

Quoting Mystic, reply 11
How do I make sure they aren't averaged during exporting?

make them seperate objects in the same editable mesh, that should do it.

 

Heres why:

 

local vertFaces = meshOp.getFacesUsingVert mesh vTri[i]

 

thats the maxscript to get the faces a vert is attached to, this is how the code knows which faces to use. If they are not touching, they can't be averaged since that code wont return the faces in question.

Reply #13 Top

Would you mind being a LOT more specific.  My modeling vernacular is pretty low because I've never had to talk with someone about working with mesh before, and I'm just not sure of the specifics. 

What exactly should I make into separate objects, and how should I do it?

I ask because I've tried separating the mesh into appropriate elements that fit the shape I want.  I've tried breaking the Normals (though I can't say whether this worked or not because I wasn't sure how to tell if it actually had an effect).  I'm just not that familiar with this part of the program.

Sorry for my ignornace. :|   But I REALLY appreciate your help!

Reply #14 Top

On the editable mesh, it has vertex, edge, face, polygon and element. Elements are in the same 'mesh' but are totaly seperate. If you use 'attach' on a bunch of new primitive boxs they all become elements in the same mesh object.

You can use 'detach' on a selection of faces to acomplish the same thing. A dialog box will come up, select detach to element and do it. It will create a seperate element you can select as a whole (in element mode).

 

The parts to do it on are the sections you want smooth, the edges of them should be where there should be an angular lighting effect.

Reply #15 Top

Now I'm getting somewhere.  I had tried creating separate elements just before you suggested it (though I wasn't thinking of it in the same terminology you used), but the exporting script was actually combining them back together again.  I had to extrude the depression a bit more for it recognize it as two separate elements.

Thanks again for your help!