Jump to content

Annoying mirror problem!


Brian Cassil
 Share

Recommended Posts

Has anyone else ever noticed that mirrored objects in max will frequently be inside out if exported, even though they look fine in max? I first discovered this when preparing a large detailed model for rapid prototyping. The faces of all mirrored objects were backwards and therefore useless for RP! It took HOURS to get it all sorted out. Then a little while ago I noticed it again when exporting a file to lightwave, and this time I even used polytrans for exporting.

 

Well I recently came across a tip that I thought might help with this problem and that is using the "reset xform" utility to reset transforms in max. It didn't help but it did show the backward mirrored objects in max, which is somewhat helpfull since at least I won't have to reference my exported file to see what is backwards and what isn't.

 

Does anyone know how to fix this, so mirrored objects automatically have their faces pointed the right way when exporting? For now what I have to do is find all the inverted objects and flip the normals. It's a pain. I don't see any options in mirror except a "mirror ik limits" checkbox and that doesn't help (I tried). The attached image shows what I'm talking about. the box on the left is a mirror of the one on the right, and I used the "reset xform" utility on both of them.

Link to comment
Share on other sites

Very odd that I had to test it for myself, indeed you are right. The only way I noticed to solve the problem is to export the model as a 3ds file and re-import it in. Also in some cases of file importing you will see a "unify normals" button, however it didn't work when I tested this for a dwg file.

Link to comment
Share on other sites

Flip normals before export....

 

This is what I've done in the past. Problem is in a scene where I have thousands of objects it is a very tedious task to perform. It will be a little easier being able to see what is backwards in max now but still, it would be much better if there were someway of preventing the faces from being flipped in the first place, or someway to fix the entire scene at once, rather than having to isolate all the offending objects.

 

The only way I noticed to solve the problem is to export the model as a 3ds file and re-import it in.

 

Thanks for the info! I tried it and it worked. I don't typically export files to 3ds but maybe I'll have to start thinking about doing it that way now. At the very least I think it should work for exporting to .stl format for rapid prototyping, possibly for exporting to other formats too. I'll simply export my entire scene to .3ds then reimport to max and export using polytrans to whatever format I want. I'll test it on a real scene and leave my results.

Link to comment
Share on other sites

Hi Brian,

When you mirror or negative scale an object (same thing) you reverse the vertex draw order. Max/viz is pretty good about handling these situations (most of the time) because it knows to a certain extent what you did. Sometimes you run into problems when you start applying other modifiers to that mirrored geometry. Most people will tell you to avoid mirroring at all costs.

A rather simple way to fix it is to use the ResetXform utility, apply a normal modifier, and then collapse the stack. If you do mirror objects frequently and add things to the stack after the mirror then you really should do this before adding something to the stack.

You could write a simple maxscript to do this whole procedure for all objects that were mirrored in the scene. I would start by writing it for one object and then after your get that working expand it to query the scene for negative scales and run on those. Would be a good way to pick up a little scripting knowledge ;)

The preferred way of mirroring when exporting or working on the stack is to use the mirror modifier.

Link to comment
Share on other sites

I was so hopefull that this was figured out but alas, no. I've posted a couple of images of a more complex model. This first image is after I've exported it to 3ds and re-imported it to max. The second is after having applied the reset xform utility. I also tried exporting it to .stl and the faces are backwards there too.

Link to comment
Share on other sites

When you mirror or negative scale an object (same thing) you reverse the vertex draw order. Max/viz is pretty good about handling these situations (most of the time) because it knows to a certain extent what you did. Sometimes you run into problems when you start applying other modifiers to that mirrored geometry. Most people will tell you to avoid mirroring at all costs A rather simple way to fix it is to use the ResetXform utility, apply a normal modifier, and then collapse the stack. If you do mirror objects frequently and add things to the stack after the mirror then you really should do this before adding something to the stack. You could write a simple maxscript to do this whole procedure for all objects that were mirrored in the scene. I would start by writing it for one object and then after your get that working expand it to query the scene for negative scales and run on those. Would be a good way to pick up a little scripting knowledge The preferred way of mirroring when exporting or working on the stack is to use the mirror modifier

 

Thanks for all the info, it explains a lot. I'll try some of your tips a little later today. I think it's a long shot for me to get into scripting right now, even though I'd like to, I just don't have the time to try learning something like that... maybe someday. Maybe Chris Johnson would do it for me, he's a maxscript stud and I see him every now and then. I also don't think simply not mirroring anything is an option either. There is simply too much in architecture that is symetrical.

Link to comment
Share on other sites

Ok, I tried using the mirror modifier, rather than the mirror tool and that does indeed seem to do the trick. It's a bit of a shame since I won't be able to have mirrored instances of objects but I will be willing sacrifice that in order to fix this little problem.

 

Thanks for your help Shane.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...