Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Negative Scaling Help

Negative Scaling Help

Anonymous
Not applicable
3,917 Views
6 Replies
Message 1 of 7

Negative Scaling Help

Anonymous
Not applicable

A friend of mine has sent me a model he worked on hes having trouble with. He needs to import this model into Cryengine, but about half of the geometry used is negative scaling. in MAX thats not really a problem, but with the Cryengine it is. We've been trying to find the quickest way of setting the negative scaling back to positive and keep its exact position and rotation. But because the model pieces are essentially turned inside out, the rotation and position are moved.  Ive been trying things for about an hour now, but im gonna have to start doing this by hand soon as my friend needs this in Cryengine for an assignment.
Theres about 1000 pieces that are affected by negative scaling - does anyone smarter than me have any suggestions on correcting this either in bulk or in much a faster method?

 

Id really like to hear some suggestions please. 

Thanks!

0 Likes
Accepted solutions (1)
3,918 Views
6 Replies
Replies (6)
Message 2 of 7

Anonymous
Not applicable
post a part of the model so i can better understand
0 Likes
Message 3 of 7

ekahennequet
Advisor
Advisor
Accepted solution

It sounds like the models were either scaled at the object level or that they were mirrored at the object level. In either case, Reset XForm should fix the scaling issues. However, applying Reset XForm will flip the normals if the objects had been scaled in negative value or mirrored at the object level. You will need to apply Normal modifier on top of XForm.

 

Steps: Make sure to do the following on a copy, not the original file.

 

1. Select all objects affected by negative scaling. If you have 1000s of objects, then do them in batches so it doesn't get bogged down. You can directly apply the XForm modifier or go to the Utilies Panel and and "Reset XForm," then "Reset Selected."

2. If the objects' normals flip as a result, then apply Normal modifier and check "Flip Normals" if it isn't already.

3. Convert to Editable Poly and export.

 

If the above doesn't help, please upload a sample Max file (must be zipped) with at least one object that shows problem in Cryengine.

Message 4 of 7

Anonymous
Not applicable

Awesome! Cheers mate!

Don't suppose you know a quick way of selecting all the Negative pieces?

0 Likes
Message 5 of 7

ekahennequet
Advisor
Advisor

You're welcome. Glad it worked. 🙂

 

The only one I found that looks like something you're looking for was this one on Scriptspot from our friend, Paul Neale, called Reset XForm. But it's dated 2007, and he wrote that it's a beta, so use at your own risk.

 

http://www.scriptspot.com/3ds-max/scripts/reset-xform

0 Likes
Message 6 of 7

Steve_Curley
Mentor
Mentor
(
local NegObjs = #()
function HasNegScale obj =
	(
	local IsNeg = false
	for i = 1 to 3 do
		(
		if obj.scale[i] < 0 then
			IsNeg = true
		)
	IsNeg
	)

NegObjs = for obj in geometry where (HasNegScale obj) collect obj
	
if NegObjs.count > 0 then
	(
	resetXForm NegObjs
	for obj in NegObjs do
		maxOps.CollapseNode obj true
	)
	
)
E and OE of course 😉

Max 2016 (SP1/EXT1)
Win7Pro x64 (SP1). i5-3570K @ 4.4GHz, 8Gb Ram, DX11.
nVidia GTX760 (2GB) (Driver 430.86).

Message 7 of 7

Anonymous
Not applicable

You guys are awesome! Cheers 🙂

0 Likes