Reset XForm on Body Object increases face count

gordon.evans
Contributor

Reset XForm on Body Object increases face count

gordon.evans
Contributor
Contributor

I work exclusively with geometry exported from CAD software, STEP format and then imported into 3ds Max as Body Objects.   This allows me to add more faces easily to objects that need it (larger curved surfaces).  From there I convert to Editable Mesh and Attach like objects together to reduce the overall number of objects.

 

I have noticed starting several years ago that sometimes when attaching objects together I get weird flipped faces.  To combat this I apply a Reset XForm first, convert to editable mesh and then attach the objects together.  This has worked without problems.

 

However today I had the Polygon Count utility open and I happened to notice that applying a Reset XForm directly to a Body Object increases the face count (in some cases) of the object by a VERY large amount.  I did a test with several imported objects.  One was a flat plate (box) and this doesn't seem affected by the Reset XForm.  It started with 12 faces as a Body Object and after a Reset it still had 12 faces.

 

Then I tried a curved guard object.  At a Medium body quality it has 748 faces.  If I apply a Reset X Form to the Body Object the number of faces jump to 14672!!

 

On another curved object (not shown) the Reset XForm increased the faces count (2338 to 6444) and it was noticeable that certain curved parts changed and now have more faces.  Almost like the Body quality was increased from Medium preset to Fine.

 

I'm wondering if anyone can explain why this might be happening?

 

Is this a bug?

 

Is the Reset XForm Utility just not compatible with Body Objects?

 

Thanks for any insight you can give.

0 Likes
Reply
379 Views
6 Replies
Replies (6)

MartinBeh
Collaborator
Collaborator

Can you upload a sample .max file with such a geometry?

Martin B   EESignature
→ please 'Like' posts that are helpful; if a post answers your question please click the "Accept Solution" button.
0 Likes

gordon.evans
Contributor
Contributor

Yes, file attached. Max 2022 format.

 

I did some further testing and I've discovered why I haven't noticed this before.  I regularly apply a Material Modifier to most of my objects before doing the Reset XForm and Convert to Editable Mesh.  It turns out if this modifier exists in the stack then the number of faces does NOT increase when doing the Reset XForm.  This is also the case with a Edit Mesh modifier applied.

 

Thus this only becomes a problem if I've applied material id's at the Body Object level, which I do for some objects that are multi mats. 

 

Going forward I think I will modify my workflow and do a Convert to Editable Mesh, then Reset XForm and again Convert to Editable Mesh (or collapse).  This keeps the number of faces the same for objects that don't have a Material Modifier or Edit Mesh applied.

 

So I guess a limitation of the Reset XForm utility...

 

Your thoughts greatly appreciated.

0 Likes

gordon.evans
Contributor
Contributor

Added sample max file.  Thanks!

0 Likes

MartinBeh
Collaborator
Collaborator

It looks like the difference in poly count you see is due to different levels of details:

Top is Body -> Reset XForm, bottom is Body -> Material -> Reset XForm

comparison.png

Both are valid triangulations of your Body object, just one has more detail.

 

Now - why one conversion uses the low-detail setting and the other uses the high-detail settings I have no idea.

 

And when you add a "Material" modifier, this turns your objects into Editable_mesh class, so the triangulation happens before Reset XForm/Body can mess it up.

 

Having said that: I can only reproduce your problem on the first application of Reset XForm! If I load your scene, take the top-left body object in your scene (the original Body object) and apply Reset XForm I get the very result you have.

But: if I remove the XForm modifier again and then apply another Reset XForm the result looks exactly like the one at the bottom of the image (and has identical poly count) ... and only after I reload the .max file I can get the (incorrect) high-detail version again.

 

Looks like a bug to me in the way Body objects (re-)calculate their triangulation!

 

To be sure to avoid that problem in the future I suggest you apply a "Turn to mesh" modifier to all you Body objects before you run Reset XForm. That way you will directly see what the mesh version of your body looks like.

Martin B   EESignature
→ please 'Like' posts that are helpful; if a post answers your question please click the "Accept Solution" button.
0 Likes

gordon.evans
Contributor
Contributor

Very interesting, there are definitely some bugs here.  I will use your advice of using the "Turn to mesh" modifier before a Reset.  Thank you!

 

I looked at why the second application of Reset XForm didn't cause the re-calculation of the triangulation.  I was looking at rotation of the object before (90,0,0) and after the Reset XForm was applied it went to (0,0,0).  Expected given that is what the Reset is supposed to do.  Removing the XForm from the stack however does not change the rotation back.  It stays at (0,0,0).  The second application of Reset XForm does not result in re-calculation of the triangulation as you discovered.


So then I took the original Body object and rotated it from (90,0,0) to (0,0,0).  Applied the Reset XForm and NO re-calculation of the triangulation took place!

 

So it would seem that any Body object that doesn't have the rotation of (0,0,0) and has a Reset XForm applied will trigger the strange re-calculation of the triangulation.

0 Likes

MartinBeh
Collaborator
Collaborator

Interesting.

 

If Reset XForm has nothing to do (i.e. there is no transform to reset, it is already zero) then the triangulation works as expected - but when it has to actually remove some transform it will incorrectly produce the high-detail triangulation...

 

FWIW the same happens when directly adding a "XForm" modifier to the Body object, without using the Reset XForm utility, AND THEN rotating the XForm gizmo... 

 

So the problem is in the combination of Body object + XForm + non-identiy gizmo transformation.

Martin B   EESignature
→ please 'Like' posts that are helpful; if a post answers your question please click the "Accept Solution" button.
0 Likes