Hello Folks,
the last weeks i have been working on a uv packer. I could not find a good packer that can handle very complex shapes or holes.
The packer from Headus UV Layout is very close to it, but they are cases when it can't find a good solution.
Follow on Twitter Follow on FacebookDemo available (Update 6.03.2015 Beta 26 Version 1.7.5544.319)
also available via automatic updater inside the previous demo version
IPackThat on Steam
It's not final and still Beta. They can be bugs and rants
Inside the Demo version you can't save. Its just for testing purpose and feature testing.
IPackThatDemoIPackThatDemo ReadMeShort feature list
- read and write of fbx, dae, dxf and obj files
- handling multi-mesh files
- handling mutiple uv
- overlapping uv islands will be treat as one uv island
- rotation can be enabled/disabled for entire packing process
- rotation steps can be choosen per uv island (0.01 to 90°)
- automatic recognition of circle like shapes (no rotation)
- automatic recognition of rectangle like shapes (only check from 0° to 180°)
- endless solution process until you stop
- 1 mutation per 10 solution processes
- shape margins in pixel
- border margins in pixel
- treating aspect 1:1 and 1:2
- area selection filter from min to max (% area of largest uv island)
- rotation step selection filter from min to max (in degrees)
- automatic backup when a better solution is found
- multi threading
are there some other feature that are usefull ?
here are some shots of the results.
The Start ones are handcrafted and dont respect the margin size (sometimes they are below 2 pixels)
Replies
its still in beta and needs some polishing *g*
i plan 2 more features
- cluster groups (want to stay together)
- merge uv islands to one cluster
That sounds handy. How about a snapshot feature? It sounds like your app can present different iterations, so being able to quick save different steps would be nice.
Can you lock rotation on shells? Sometimes it's good to say "I always want these shells to have this orientation".
this is already a main feature. the packer can handle holes in all variation. It can put a shell inside a hole which also contains a hole. And in this one also some shells can be placed, which also can contains holes etc pp.
mhh, will think about the snapshot feature.
Locking of rotations can be done on each uv shell you want. You can select some shells and lock the rotation for them. Other you only allow rotation about 90°. Some others you allow rotation steps with 5°.
Will have a look into FBX. FBX is a open platform with different SDK's for reading and writing it. But its a large and complicated SDK when i checked it last time.
Obj Fileformat can handle different UV layouts in some later versions. But not all can write this format.
Multi-Meshes are treated as one UV-Layout so far. Have to think about this feature to treat each Mesh seperatly.
One thing I also find annoying is that I need to find my overlapping UV's but every script/tool I have used only works sometimes. I often have to go searching around my UV map to find the extra UV's that are overlapped. With smaller objects this isn't a big deal, but for a 50k tri model, it is freaking annoying and a time killer.
So if you can detect overlapping uv's 100% accurately AND offset them by 1 in U or V that would be very useful for baking.
Either way, Im looking forward to watching the development of this tool. If it´s better than the packers that are currently available, IPackThat could easily become the most popular packing tool if you sell it for like 5 or 10 dollars or something. (Never underestimate microtransactions!!) Good luck!
Inside the Demo version you can't save. Its just for testing purpose and feature testing.
IPackThatDemo
IPackThatDemo ReadMe
thats what i mean with merging shells.
The grouping feature is something different.
You set 5 shells to group 1 and 5 shells to group 2.
The Shells with group 1 will try to stay together and group 2 shells also.
That way the shells are not spawned all over the area if the user uses grouping.
Also, shut up and take my money...
yeah, its not optimized yet.
the progress bar is feature i want to implement also
The packing algorithm i use wont be as fast as packing with via bounding boxes.
So it will be always slower. But it can squeeze a bit more out of a uv.
As a matter of fact it will be faster than packing by hand *g*
while your a packing, you cant zoom in and out
texeldensity per shell ? or over all shells ?
I am experimenting with it now, really impressed with how tight it packs.
nope, it will run forever until you stop. i could build in a max solution find count. so if it hits the count its automaticly stopping.
could be usefull for a later batch process where you fill in num obj files and pack them all thru.
Yeah sorry per shell. Guess it would be something you check before sending it off to be packed (assuming this is the primary goal and not something like UVlayout where you can manipulate)
run by time wont work on larger uv layouts. I think i will implement tomorrow a user max run count. If 0 it will pack as intentended until you stop.
will look into it. someone at my work wanted a text overlay over the shell with rotation steps and area size compared to max area. this info could be displayed as well. only need to think about very small uv shells.
Keep this up, my dollars are ready and I'll be passing it around the office.
err this is a bug. it should zoom around mouse loc.
will fix it for next beta release *g*
Best solution just under 5 percent, really impressed with it
However at least on this mesh it does introduce quite a lot of overlap.
This is with the previous beta version, but it seems like you have not done any changes to the algorithm.
I set the step pixel and contour merge threshold to 1.
I can send you the mesh if you want to have a look at it.
Post it when it's done will you?
************** Exception Text **************
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index (goes on quite a bit from there).
None preset seems to work perfectly. Looks like it'd be quite a tight pack, nice.
mhh, i think i now where the probem is. i will look in to it right now.
You can send me the mesh if you want ^^ im happy for test stuff.
I will send you my email via private message.
ps: they are some chunks in your mech that are very very close to each other. this will result in merged cluster because 1 vertex of a shell is also used in a different chunk.
those presets got a strange obj asci layout. need to adress it.
anyways it should not crash. thats need to be adressed as well.
there is also a bug with stacked polygons. this i fiddled out yesterday. they are handled correctly but the area % will gone mad because they are all taken into account. but they should be taken into account only once.
Another bug happens when you import a uv set wich is not inside range from 0 to 1.
if the ranges of the uv set are all positiv (from 0 to 1+ in booth axis) all works out well. but if you got shells that are in the negative ranges (0 to -1) it will result in weird behavior)
Additional i think i got a solution for real stacked polygons. the first and that one with the largest amount of vertices (if you use ngons not tris) will be stay where it is. all other polygons that are using the same vertices will be offseted to x+1.
Yep, set your margin size to half of what you want to be between the uv islands as this adds the margin value to every uv island. So if you want 8 pixels then set it to 4. You can visualize this with the display options in the upper left.
I have some requests:
I had my UV's offset by 1 to bake. So when I loaded up my model it placed those as separate uv islands. Is it possible to have an option to move the offset uv's back? I could do this in my 3D package of course so it may be completely unnecessary if it doesn't fit within the scope of this tool.
I export all of my 3D files as FBX for my workflow. Is it possible to have multiple file types supported? .obj is just fine, but it would be 1 more extra file to export in my already massive sea of files. Again a picky request.
I used a 70k tri model at 4096 with a fast computer and it was still hanging a bit with no indication it was working. If there was a bit more visual indication it was doing some work that would prevent some slight confusion/frustration.
All in all this is potentially the best thing ever. So please keep on kicking ass.
let me finish the basics of the tool first and get it out *g*
the core itself is already some sort of sdk. but they is no wrapper around it.
that are plans for the future
edge padding = margin = padding = nudge or whatever other names they are out there.
already taken into account ^^
there is also a border margin for the borders of the area itself.
not quite right. the margin is the total amount in pixeln. if you set it to 8 the min distance between each shape is 8 pixel. so if you want 8 pixels around each shape you would need to set it to 16.
im on it already with the layered polygons (only one in 0-1 all others 1-2)
if you load an obj with uv's over 1 it will ask if you want to resize to 0-1 or remap 1+ to 0-1
i think i could make it ready this weekend.
fbx is somewhat new. need to read and understand the fbx sdk.
Thats not a task you make in one hour *g*
There are still some errors with overlapping islands getting seperated from each other though, check the upper right most part of the layout for example.
Plus I also think it 'recognized' some shapes as circles and rotated them. The angled shape halfway down the map to the far left. It was straight up and down before with the 'hump' pointing upwards.
The detection of overlaps is also improved.
Right now im implementing the offset handling for uv verts over x+1.
Not sure if i can upload a new version this Weekend. Will keep ya informed ^^
@quack jesus cries. This is a packing. When i started this tool, its Main purpose was to give a near good solution.
I never dreamed of such results. sometimes my fuzzy logic algorithm spooks me off.
But did I miss something or is there no "save" option?
Oooh. Having your packing algorithms integrated in PolyUnwrapper, for instance, would rock for those people that prefer to keep most tasks native to their modeling program.