Okay guys, here a challenge..(maybe)
When selecting 2 or more objects than applying the Unwrap UV modifier than select all the polygons, than use flatten mapping. than pack UVs it seems that all the polygons from all objects pack within the 0 to 1 space nicely side to side object to object.
However im looking for another way to pack the UVs, instead of the above result I would like to pack all object UVs at once as if they were being packed for themselves individually in 0 to 1 space. (They would be overlapping the other objects uv's of course. That way all objects are fit in the 0 to 1, like if they were uv unwrapped separately 1 by 1 )
The reason I need this is for setting up 1000s of already modeled game assets that require 1000s of objects UV unwraps needed for lightmap channels in the game engine.
Comments (6)
Comment policy
UV unwrap multiple objects (modifier.unfoldMap)
What is the script that work with the unfoldMap?
.
.
Is this is what you need?
Select the objects that you want to unwrap and run the script
Perfect !
Another Channel
Is it possible to make this work directly on channel 2 ? I really need this for the same reason: 1000 props....
Please rewrite the whole thing just to make sure it works.
Very nice Thank you.
Following up Kostadin solution U can try this fn
fn uvwFlattenMap objArr mapChannel:1 = if objArr.count != 0 do
(
clearSelection()
SetCommandPanelTaskMode #modify
with redraw off
(
for node in objArr where validModifier node (modifier = Unwrap_uvw()) do
(
addModifier node modifier ui:on
modifier.setMapChannel mapChannel
select node ; modPanel.setCurrentObject modifier
modifier.flattenMap 45.0 #([1,0,0], [-1,0,0], [0,1,0], [0,-1,0], [0,0,1], [0,0,-1]) 0.02 on 0 on on
)
)
)
uvwFlattenMap (selection as array) mapChannel:2