UV packing

add-ons
commercial

(ambi) #1

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



(fiendish55) #2

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.


(ambi) #3

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.


(masterxeon1001) #4

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


(aMars) #5

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.


(ambi) #6

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.


(PLyczkowski) #7

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.


#8

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.

(ambi) #9

@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



(fiendish55) #10

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


(ambi) #11

@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



(jimpaw80) #12

Great Work! This is really what Blender needs!


(aMars) #13

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.


(EEEnt_OFFICIAL) #14

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:


(ambi) #15

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.


(mbbmbbmm) #16

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


#17

I have tried the last aditions, works all perfect.


(ambi) #18

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


(n1k) #19

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


(cgstrive) #20

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