UV packing

@Froyok: I’m not aware of a way that could batch-pack multiple assets outside Blender UI. It could work as a separate stand-alone script that had object loading and saving code, possibly. Definitely a good idea. I’ll add that to the list.

Could you make a option to left the script working until it founds a solution with more than X% of used area? with a count of current iterations.

@DcVertice: The best solution for that would be a evolutionary optimizer, which is something that could be done after all more high priority goals are reached. Currently: the end result is so unpredictable that if there was a set percentage to be reached, the algorithm might run forever or it might reach it in two seconds. The best way currently is just tweak the parameters and run it a couple of times if you want to chew through a couple of extra percentages of free space.

I was just asking if your script was compatible with the headless mode of Blender, that’s all actually. :slight_smile:

I already have on my side an import, unwrap and export script. I just wanted to know if it was possible to pack UVs with your plugin too. I met some scripts that weren’t working properly because they relied on certain states of the UI (or something like that, as I’m not a Blender expert).

Looks awesome, but is there an option to lock some islands? :slight_smile:

Overlapping UVs don’t really seem to work. The top screenshot is before packing. the top UVs have a mirrored circle and a square which get separated during the packing. Is that a bug? I’m using 2017-07-06 version. Thanks!


Just guessing but could it be that you’re getting that result because your circles are not inside the 0-1 uv space? In your screenshot they’re overlapping the boundary

@ArasTM: Hi, can you send me the .blend file. I’ll take a look.

I have the same problem with overlapping as @ArasTM

Same problem here

http://i.imgur.com/4r5W6Ni.gifv

with simple box unwrap it fails to recognize they are stacked identical islands and separates them.

The overlapping UV island needs to be a duplicate and be located exactly at the same position. If the order, amount or the location of the UV vertices differs, it won’t be recognized. I tried UV unwrapping a cube, then a n-gon circle, then duplicating two or three times, and moving the meshes into different locations. I couldn’t reproduce the bug. If you have a .blend file please send it to me and I can take a look. 2017-07-06 should be the latest overlap code. Which I also used for the testing.

Thanks, it works at last!

That version seems to work nicely with quick testing! YAY

Hi,

Just watch this:
https://www.sidefx.com/products/whats-new-165/

mind blowing! uv packing starts at 37:00 i was like: :eek:

Whoa sorry for a late reply, didn’t get any notifcation for the thread. http://pasteall.org/blend/index.php?id=48387 Here’s an example of .blend file where the behaviour is fairly unexpected. In this case the cylinder’s UVs are maintained overlapped but the mirrored cube’s UVs are reset.

This is a really nice addon in general but while there are such issues and it’s unpredictable this is very hard make use of in production. Thanks for looking into this :))

@ArasTM: I took a look and it seems the overlapping islands aren’t the same. That is something that is not currently supported. I might put an option to treat all islands that share any UV vertices as overlapping, maybe that would help?

Also it’s always interesting to hear how you are using the addon or where your problems are when it comes to production work. If you want to share that would be cool.

@ambi, what do you mean by saying that the islands are not same? As in separated islands? It’s the same geo duplicated / mirrored and thus it’s perfectly in the same spot in the UV editor as well. Shouldn’t that be considered overlapping UVs? Say you’re making screws for something and duplicate the UVed mesh a lot or

Let’s say you’re making a weapon and you want to mirror a side of it, I’d UV the whole part, select only the part I want to mirror and symmetrize it with some additions to fix any artifacts, that should work and might work but you’re never sure until these issues persist, so you can’t really depend on this yet. Though it’d be really great if it’d be slightly more reliable (at least in the overlapping islands department for now )

btw thanks for your support :slight_smile: the plugin is definitely worth the purchase, just I think that it has a lot more potential

@ArasTM: In your .blend when I tried the Blender UV island selection tool, there is one quad that is a separate island and the rest of the cube is the another island. That’s what I’m using as a measuring stick. They are overlapping, but they are not identical islands. The way the overlap detection works is if the UV is the same. Pretty much you have to copy and paste a mesh for it to detect the UV as the same. For example if you have a bolt and you want to duplicate it but maintain the UV it should work.

So if you wanted to mirror a part of a mesh and maintain its UV you first have to separate the UV into its own island, then duplicate that part of the mesh. If you move or edit any part later that stops the UV from being identical, it will separate them.

To your workflow I think I will experiment with detecting overlap with just shared UV vertices to see if that will work for that usecase.

tl;dr: overlap detection works only for identical UV islands (should be similar to Blender island selection behavior) that have the same UV vertices.

Alright, all clear! If you’d manage to find a way to implement that it’d be really great! :slight_smile: Thanks

+1 would help my workflow also (gamedev)