got some probs with uv packing within 3dsmax.
if im scaling the uv chunks in v direction, i cant pack the uv anymore.
if im trying to, the chunks starts to rotate around.
i dont use rotate in the packing menues but they keep rotating.
is this a known bug ? are they other plugins for max that handle the uv packing better than the max one ?
Replies
so basically some line intersection collision detection between the outer edges of the shells and trying to pull all shells to the upper left corner. But I don't have time to do it anytime soon and it wouldn't be so fast as something compiled with the max SDK.
This Guy wrote this tech:
http://packer.3d-plugin.com/
for 3d io a smal german game related company, he recycled the code for a zBrush plugin as well:
http://speedy.rs/prouv/
but the general design philosophy behind seems to be automatic stuff including flattening and defining UV shells (atleast zBrush and Unwrella the main plugin). So maybe check out just the packer plugin.
We do alot of mirroring and overlapping amoung other things that plugin doesn't account for, so then it's just as much work because of having to re-scale/move stuff how you want it.
I don't think any script will replace a good custom UV layout. It may help, but not replace.
from the official website along those many bloated marketing texts: auto-rescaling = normalize
optimal packing = rotate and move uv shells compact
so that one does just the packing, the con:
they mainproblem i want to pack those uv shells is the texture size by texel density generating.
so i dont know before what kind of texture size the texture is. the edgepadding on the other hand is needed.
the packing in max itself only woks with quads. but sometimes you want a rectangle, cause the uv layout fits more with these proportions.
a 256x1024 is a lot better than a 1024x1024.
if the texture sizes would all be the same, we could do the uv layouts ourself.
then we know what edgepadding in pixel we need.
will have a look at this script
maybe it will do the trick.
when im finished with my texel denstity voodoo im creating a polygon (quad)
this quad i add to my object with power of 2 texture.
in uv space im stretching the new quad from u 0 to 1
the v starts from 0 to 0,5
then i start to pack without rotating.
if the resulting boundig box is from 0 to 1 its a valid solution.
now i go with the quad from 0 to 0,75 and repeat packing
if the bounding box is now to large i step back and take the last solution
the script fn_07__rotate_shell_compact() i use before to get sure the single uv shells are rotated correctly
-Stefan-
Its an advanced feature Snoelk is after and so far I am not aware of any package including blender that can do that right away.
will do an update of the xNormal port for 3dsmax soon
the new uvsweeptest function will test the target power of 2 texture with different proportions agains themself and the best solution is taken.
my 2048x2048 is 2048x1024 ^^
it works as follows.
i take the uv layout with the guessed texture size.
now im creating a plane and in uv space im filling half of the uvspace with this uv plane.
now im attaching this new plane to my object.
start to pack and check if any vertice has left the valid space between 0 and 1.
if not im taking this solution and do this again but this time i use the plane with 2/3 of the uv space and check again.
when im done with this i scale down the object uv space by half and multiply my power of 2 texture by 2.
then i test the procedure again with the the doubled texturesize.
this i do because it could be better to get 4096x256 if possible.
i store all hits in an array and check the 2d volume of the textures.
i grab the first hit with the fewest volume and take this as new object to bake and delete the rest.