Jump to content

Home

Age old mirror object problem.


SilentMobius

Recommended Posts

Anyone who's had to export a mesh from Max will know what I mean. And arm or a leg has all of its faces flipped because you mirrored the mesh from the other side of your model to make sure it was symmetrical.

 

Now why is this so. I understand Max represents the attitude of faces by a seperate "normal" vector, and this vector can be tweaked by using smoothing groups. And I also know that in the absence of this data most importers/exporters/engines will use the "wind order" of the points in a given face. It stands to reason that the wind order in a mirrored object is going to be inverted. So far so good.

 

But when you tell max to "flip normals" what is it doing? it is

A. Fips the stored normal vertor

B. Inverts the wind order of the points.

C. A+B

 

Now I'd go for A, but if that's the case why does flipping the normals in Max fix a problem generated by mirroring. We've already said that the exporter is using the wind order not the normal vector sho why would flipping max's internal normal vector make any differance?

 

Perhaps its C, in that case is should be possible to invert the wind order and _then_ correct the normal vector.

 

Has anyone heard of a maxscript/plugin that does this because I'm sick of having to deal with inverted faces in MAX just so it'll export properly.

Link to comment
Share on other sites

Ok I've created a maxscript that only inverts the wind order. The normals appear to be recalculated on a update. So once you've mirrored an object whatever the new wind order is it is "matched" to the current normal facing...... how bloody inconvenient.

Link to comment
Share on other sites

Sheesh, 3 posts and they're all me, I aasume that people know what I'm talking about but just don't know how to fix it?

 

Well fear no longer, I have a script that _FIXES IT_

I've made a max script that will do a "safe" mirror of a given object, it's a little scrappy right now but it works!

 

Anyway I'll tidy it up and post it if anyone is interested?

Link to comment
Share on other sites

Gyaaaaah, after all that work (A lest I now know how Maxscript works) my script starts misbehaving a little and in my testing I find another way of sorting out inverted objects.

 

When you mirror a mesh Max must somehow put a marker in the mesh structure saying "Wind order X has faces pointing out" thats how it keeps the same vertex order (and thus UVW maps are constant) Now when you use Max's "Flip faces" it deals with the UVW maps without you having to worry about it, but it still obays the marker.

 

However

 

If you create a new object (anything'll do) select your new object _first_ then your inside out mesh and collapse, all the mesh parameter are taken from the new object and the marker is removed and the wind order recalculated. Then you can select verts and delete the extra verts of your dummy object.

 

Hmmm I wonder if this hurts UVW mapping.

*checks*

Nope.... cool

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...