UV packing

I implemented an algorithm for packing UVs quite a bit tighter than Blender does it. The algorithm is quite simple so it took a lot of optimization to make it fast.

It’s up on https://gumroad.com/l/UVShotPacker (paid)

There is currently a project underway to implement a better UV packing algorithm into Blender (https://blenderartists.org/forum/showthread.php?397599-GSOC-2016-UV-Tools). So you might want to wait for that. But it’s not certain when that will be finished.

Any feature requests and bug reports are welcome.

Attachments


8 Likes

Thanks for creatng this addon ambi, way better than blender own. Are you planning to improve it with new features like overlapping uv packing and ipack that kinda features? Just to know im supporting for a reason.

ipackthat? No, unless SapphireS abandons the current UV packing project. I don’t think doing overlapping work is a good idea.

Improving the current addon with new features, performance? Certainly.

Overlapping UV packing, I will look into it, but no promises.

bought. I wish youd set the amount to 2+ so I can pay what I want.

1 Like

Works really well. Can I ask how you handle island rotation? The test object I ran through it looks like rotations are locked at 90 degrees, are there any plans to expand it so that users have more control over it? Such as per-island locking the initial rotation so that it doesn’t rotate at all, unlocking rotation completely, and locking to 90º.

Might be worth mentioning but the addon threw a python error when I tried to pack my first test object. I took a wild guess based on the error that it was caused by overlapping vertices which seemed to be correct because running remove doubles on it solved the issue.

The islands are rotated by 90 degrees to maintain texel orientation. 360 degree rotation is not complicated to implement, but it will increase the packing time by quite a bit.

Per island locking should not be hard on the algorithm level, but on the interface level it requires a lot more planning. Maybe use UV pins for that?

Can you send me a .blend on the object that threw the error? I’ll look into it. Something like http://pasteall.org/blend/ should work fine.

This is my result, I get islands sticking outside a bit:


Feature request: Don’t leave the edit mode when finished packing.

360 degree rotation is not complicated to implement, but it will increase the packing time by quite a bit.

That would be nice. If lowering the rotation steps amount would help performance, you can add that as an option.

I will tell some of features that I really wanted see some day in blender.

  • Island groups, to have groups allways near.
  • margin in pixels
  • Block islands in the UV and the rest of island conform to this.

@PLyczkowski: The addon should now recognize and pack all of the islands. It will take some additional tests and coding before the next release, but I might upload a beta version if there’s interest for it.

Attachments


Good job I would like to try beta versions :slight_smile:

@aMars: There shouldn’t be inner or overlapping islands anymore. The requirement to remove doubles still remains. Unless there’s a clear use-case where double vertices is part of the UV workflow, it’s out of the scope for now.

I put the packer_beta.py on the Gumroad.

Attachments


Great Work! This is really what Blender needs!

Thank you ambi! As far as overlapping vertices go I don’t mind the requirement, I only spotted this because I just lazily threw the mesh together. The main reason why I posted it is because the error wasn’t particularly descriptive so from a usability standpoint I wasn’t sure what the problem was and just had to guess. It would have been nice to receive a more specific warning.

I purchased your asset recently and did some practice with it using the Suzanne head. The results were very satisfying! I did not save the project but I do have a render that I painted (see below):


I would absolutely recommend it to anybody who has troubles sorting UVs. :smiley:

The packer_beta.py now has rotation step feature.

Still, 90 degree rotation and flip seems to be the best alternative when started with Blender pack (CTRL-A, CTRL-P), because it minimizes the bounding box. But, if anyone is interested in trying it out, let me know how you like it.

Bought it and made some small tests so far, it’s awesome! Thanks for making this.

I have tried the last aditions, works all perfect.

Updated the packer_beta.py. 50 iteration the performance is about the same. For 200 iterations the performance is twice as fast.

Awesome addon for game asset production. I also find it very usefull for packing lightmap uvs for ue4. It would be great to have some kind of progess bar if possible.

Cheers,
n1k

Sent from my LG-D855 using Tapatalk

Tommi, sincere admiration to your capability and developed useful tools (such as Curvature>Vertex colors)!

I work fulltime with gamedev using Blender/Houdini. I tried to throw some production models at your script that I just bought. Some feedback:

Thank You