UV packing


(ambi) #283

Are you using 2.79 or 2.80 version of the addon? Try setting pruning ratio to 0.0. There’s a bug in the simplification algorithm that cuts some corners, it’s already fixed but hasn’t been pushed to Gumroad yet. You can also try using the “Select broken UV islands” operator in Shotpacker Tools, if it shows anything. I’m also happy to look at the .blend if that is available.

(ambi) #284

If I’m understanding you right, you can just use the “Island selection behavior” set to “ignore”, select the islands you want to pack, pack them, then just move them 1.0 UV coordinates to the right.

(mathieu) #285

I was speaking about the mesh itself in the 3D view, no UV. I guess your algorithm can work with everything that is 2D? So I was asking if it would be possible to use this algorithm to pack flat loose parts of a mesh object. It would help to minimize material lost when sending data to a CNC machine.

(ambi) #286

That’s an interesting use case. I’m just not very familiar with it. You would have to point me to examples of exactly what you’re doing and how. Is it just flat polygons you’re trying to pack? Some sort of file output from the UV packer that saves .json of the polygons wouldn’t be too difficult to implement. Then you could have an external script to generate G-code out of that. Of course, any complex object and the process would fail. This would work only on completely flat objects that can be projected to 2D with no overlapping geometry.

(mathieu) #287

It’s to cut out height lines in cardboard, to build height models out of it. At the moment, we can either print one height-line per cardboard, having a lot of losses or manually rotate and place each height line to minimize losses, which is very time consuming for big models. But as your algorithm does exactly that, I thought it would be easy to port it so that it moves the polygons instead of the UV islands. We need it to work on the mesh itself as UV doesn’t keep the real size. Of course, it’s all 2D as it’s only height lines. You don’t even need to project as it’s already the case. Only rotate and translate in 2D to pack it all nicely.

(Dzmitry) #288

I use 2.79b and texture atlas addon to unwrap multiple objects at same time. After some messing around it solved it self, but here is copy of file with problem present.

(ambi) #289

You can project from view to get the UV from the mesh. Then use Shotpacker “Lock” setting in Shotpacker Options panel to not scale anything. Then you can use TexTools Mesh Texture feature (Create UV Mesh operator) to convert the UV back to mesh. TexTools makes some shape keys for the created mesh, it’s probably best to delete those to avoid any complications. This seems to maintain the scale.

(mathieu) #290

will try it thanks :slight_smile:

(Leon) #291

Hi there, I’m working with Blender 2.8 and I have the problem, that if I unwrap multiple objects at once Shotpacker (latest version installed) only seems to consider the UVs of the active object rather than all the selected objects. Is there already a solution to this problem or is it new?
Best regards and kudos to your otherwise awesome addon :smile:

(ambi) #292

It’s not a new problem, and I’m working on it. There are many updates and improvements on my plate currently and it might take a while until I get everything to a state that it can be released.