Hi guys!
I got huge difficulties to figure out how to write a script that can make pixel padding between the UV elements based on resolution in Unwrap UVW modifier.
I found one script from internet
http://www.scriptspot.com/forums/3ds-max/general-scripting/maxscript-uv-pixel-padding which works perfect for one object selected but if I have multiple objects selected it works funny and does not keep "Normalize - off" in account.
I tried to contact the guy that made this script via email to ask if its a bug or not...I didnt got answer. I also asked almost everywhere and dont get any answer(kinda depressing), so Polycount is my last hope.
How do you guys figure out things like that? I tried to find out the logic the guy is using for the padding but I am getting lost with the variables and I cannot follow it...
Could it be possible for you guys to help me just theoretical how I could write something like that or where to eventually look for solution or examples.
Thanks in advance.
Replies
If you get the resolution of your map, let's say 2048, and want a padding of 8 pixels, set spacing to 8/2048 (0.004)
Also take a look at
http://www.polytools3d.com/polyunwrapper/index.html
It's a nice tool, and it packs by pixel. Not sure how it behaves on multiple selection tho.
It works but not always, Unwrap UVW pack is behaving very randomly, throwing the uv elements here and there.
Here is the code I am using, I am not sure if this is the optimal way to write it.
Thanks for the "Polyunwrapper" suggestion but I would like to find out how I can write it. Kinda for experience too.
You have to share the same unwrap modifier then pack objects together.