Community
3ds Max Forum
Welcome to Autodesk’s 3ds Max Forums. Share your knowledge, ask questions, and explore popular 3ds Max topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unwrap UVW Flatten Mapping Limit

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
wesley.nash
782 Views, 3 Replies

Unwrap UVW Flatten Mapping Limit

I'm encountering a strange issue where there appears to be a limit to the number of nodes to which I can add an Unwrap UVW modifier and run Flatten. I first noticed this when attempting to write a script to flatten all UVs in a selection.

SetCommandPanelTaskMode(#modify)
fn Flatten o =
(
	select o
	uv = Unwrap_UVW()
	addModifier o uv
	uv.flattenMapNoParams()
)
for s in getCurrentSelection() do
(
	Flatten s
)

This script worked for small selections, but when the selection was more than about 10 nodes, the earlier nodes in the selection would not have the flattening applied. The later nodes would still be fine, but the earlier nodes seemed to have been "reset", even though they still had the Unwrap UVW modifier.

 

I was able to replicate this manually by selecting a node, adding the Unwrap UVW modifier, opening the UV Editor dialog, and running Flatten: Custom. After repeating this for 10 nodes, I went back to the first node and opened the UV Editor, and the UVs had been reset. Any help or guidance with this issue would be appreciated!

3 REPLIES 3
Message 2 of 4
10DSpace
in reply to: wesley.nash

@wesley.nash 

 

This sounds kind of similar and potentially related to a bug reported for earlier versions of Max noted here:

 

https://forums.autodesk.com/t5/3ds-max-forum/3ds-max-2021-unwrap-reset-bug/m-p/9437526#M185226 

 

But even if you are on the latest Max version and in case it not related to the same issue, you can try my own AutoUnwrapUVWFlatten script (attached).  I do not get the issue you report, have tested it on multiple objects.  Admittedly it's a little slow in iterating through the loop, but the flattening always persists in my usage (I've been using it for maybe 2- 3 years now.

 

There are a few differences in implementation you can check out, one of which might explain the differences in function.  Let me know if it works for you. 

 

It's written as an .mcr, so unzip, drag to a max viewport to install and then add to your ui/hotkey via Customize>Customize User Interface.   Hope it helps.

 

 

 

 

Message 3 of 4
10DSpace
in reply to: 10DSpace

Also, if acceptable to your workflow, collapsing the stack right after running the uv flatten operation  should absolutely lock in the uv unwrap changes.  This was true even for those experiencing the bug mentioned above.   But of course there are many cases where you don't want to lose the individual modifiers on your stack if you have any below uv unwrap.  Still, it might not be an issue for you in your workflow.  Just another possibility for you if the others don't work for you.

Message 4 of 4
wesley.nash
in reply to: wesley.nash

@10DSpace Thanks for your response! Unfortunately I was still seeing the UV flattening reset with your script, it must just be the version of 3DS Max I'm using. Thanks for pointing me to that bug post, somehow it never came up in my Googling. The tip about collapsing the stack seems to be working for my workflow, though.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report