View previous topic :: View next topic |
Author |
Message |
breksis
Posts: 15
Joined: 28 Oct 2013
|
Posted: Sat Sep 27, 2014 12:54 am Post subject: Packing efficiency |
|
|
Hey Phil,
would it be possible to let user specify rotation step in degrees instead of using 90 for finding better packing?
in other words - I have seen quiet a lot of situations where I could have get much better coverage but since UVLayout rotates just by 90 step and flips - it misses a lot of opportunities resulting in less coverage space.
In simple models of course i would do that by hand, but when it comes to much more smaller shells - it would be great to just sit and watch how it finds the best possible layout
I understand that it will require more computing time since there are lot more possibilities, but hey, when calculating - it doesn't even drive my CPU meter above 10%
Thank you |
|
Back to top |
|
 |
headus Site Admin

Posts: 2902
Joined: 24 Mar 2005
Location: Perth, Australia
|
Posted: Mon Sep 29, 2014 6:10 pm Post subject: Re: Packing efficiency |
|
|
"would it be possible to let user specify rotation step in degrees instead of using 90 for finding better packing?"
Yes, the algorithm I use could support arbitrary rotations, but as you predicted, it would be a lot slower too. You are right though, I should at least give users the option if they have the time to spare (i.e. run it over lunch).
I'll drop it in towards the top of the list ... I'm curious myself to see how it works out :)
Phil |
|
Back to top |
|
 |
breksis
Posts: 15
Joined: 28 Oct 2013
|
Posted: Tue Sep 30, 2014 12:04 am Post subject: |
|
|
Oh, that's great news Wonderful!
Approximately when can I expect this new feature to become available?
Another question - haven't seen UVLayout causing any significant load to my CPU. Usually it stays below 10%. Why so? Wouldn't it speed up the calculations if going up to 100% of CPU use?
I am on Ubuntu, Intel® Core™ i7-4700HQ CPU @ 2.40GHz × 8
Thank you. |
|
Back to top |
|
 |
headus Site Admin

Posts: 2902
Joined: 24 Mar 2005
Location: Perth, Australia
|
Posted: Tue Sep 30, 2014 10:18 pm Post subject: |
|
|
" when can I expect this new feature to become available?"
Its hard to say at this point ... I dont think a huge amount if work is needed to get it going, but I've got some travel commitments coming up so getting time to do that work could be the hurdle.
"I am on Ubuntu, Intel® Core™ i7-4700HQ CPU @ 2.40GHz × 8"
Well the bad news is that currently UVLayout isn't multi-threaded, so its only using one of your 8 processors, and that's why you're only ever seeing around 10% usage. The better news is that I have experimented with threading some of the code, but hadn't included any of that in the release version yet.
Maybe now is the perfect time because this new rotation feature will need as much CPU as it can get :) I'll get it working first though, then will look at threading it.
Phil |
|
Back to top |
|
 |
headus Site Admin

Posts: 2902
Joined: 24 Mar 2005
Location: Perth, Australia
|
Posted: Sun Oct 05, 2014 10:27 pm Post subject: |
|
|
So here's some preliminary results from the new pack rotation settings ... 90 degree only vs the same shells packed to 15 degree rotations (I let it run 5 mins).
Not a spectacular improvement in packing efficiency on these particular shapes (only 0.5 %) but now I have it working, I'll try it on a bunch of different layouts to see if I can find any stand-out examples, also maybe run it longer :)
There's certain computation efficiency gains from limiting the steps to factors of 90 degrees, so you'll have the choice of 90, 45, 30, 15, 10 and 5 degree steps.
Anyway, the basic code is working, I just have to do some testing now, get the undo working, and hopefully look at threading it!
Phil |
|
Back to top |
|
 |
breksis
Posts: 15
Joined: 28 Oct 2013
|
Posted: Sun Oct 05, 2014 11:59 pm Post subject: |
|
|
Oh, i am so glad you're on it already!
True, in this particular example I think you will not be able to gain a lot more. When the idea was born - i was having UV Shells more like arches, one big, several smaller, and they obviously didn't go well when rotated/flipped just by 90 degrees.
In your example each shell is more like a "rotate how you want it - it's all the same". But go with arched forms, long ones, narrow ones, throw smaller pieces in the mix.
Another simple example, you have vertical narrow uv shell that takes the whole heights of the tile. Then you have many more smaller ones that just float around it. During the packing if algorithm rotates the big-narrow shell so it fits along the tile's diagonal and then puts smaller ones around it - then you will definitely get much more coverage, since diagonal is always longer than straight x or y.
Thanks. |
|
Back to top |
|
 |
headus Site Admin

Posts: 2902
Joined: 24 Mar 2005
Location: Perth, Australia
|
Posted: Mon Oct 06, 2014 12:07 am Post subject: |
|
|
Here's testing our your last example :)
Phil |
|
Back to top |
|
 |
breksis
Posts: 15
Joined: 28 Oct 2013
|
Posted: Mon Oct 06, 2014 4:26 am Post subject: |
|
|
exactly!!! that's what i am talking about! These kind of situations i face regularly and now it makes me so happy that i see this will finally have a solution! YAY!
Thank you so much! |
|
Back to top |
|
 |
headus Site Admin

Posts: 2902
Joined: 24 Mar 2005
Location: Perth, Australia
|
Posted: Tue Oct 07, 2014 1:52 am Post subject: |
|
|
It might take me a while to get the multi-threading working, so I've uploaded the single-threaded latest linux install to the uvlayout.com Support Extras page (you need to login to get access). Usage is quite simple ... tick the Rotate button as before, then you'll be given the option to select the rotation angles it'll try.
Phil |
|
Back to top |
|
 |
breksis
Posts: 15
Joined: 28 Oct 2013
|
Posted: Tue Oct 07, 2014 11:51 pm Post subject: |
|
|
So the algorithm of rotations works for both - packing and fitting to square?
Will get home in couple of days and then will do the test-run on my previously problematic UVs and will let you know how it worked!
Thank you so much, this one was quick!  |
|
Back to top |
|
 |
headus Site Admin

Posts: 2902
Joined: 24 Mar 2005
Location: Perth, Australia
|
Posted: Wed Oct 08, 2014 12:08 am Post subject: |
|
|
"So the algorithm of rotations works for both - packing and fitting to square"
Oops, forgot about fit to square! I just tested it and its broken, but I'll fix that now and a new installer will be ready by the time you get to do the download.
Phil |
|
Back to top |
|
 |
breksis
Posts: 15
Joined: 28 Oct 2013
|
Posted: Wed Oct 08, 2014 12:35 am Post subject: |
|
|
Wonderful... cant wait to get home and try this out  |
|
Back to top |
|
 |
headus Site Admin

Posts: 2902
Joined: 24 Mar 2005
Location: Perth, Australia
|
Posted: Wed Oct 08, 2014 12:43 am Post subject: |
|
|
Fit to square now fixed and it does the angle rotation thing if turned on in the Pack tool.
I'll do some more testing now and will upload the new installer probably later today.
Phil |
|
Back to top |
|
 |
breksis
Posts: 15
Joined: 28 Oct 2013
|
Posted: Wed Oct 08, 2014 1:08 am Post subject: |
|
|
Perfect!
Will it also show coverage % after fit to square operation? In related post you answered that it was forgotten to put in there.
Thanks |
|
Back to top |
|
 |
headus Site Admin

Posts: 2902
Joined: 24 Mar 2005
Location: Perth, Australia
|
Posted: Wed Oct 08, 2014 1:11 am Post subject: |
|
|
Yep, I fixed that too ... the tile coverage should show and update all the time now if turned on in the pack panel. That does slow things down a touch (i.e. it has to compute all of the coverage stats whenever you just move a shell manually) but actually on faster PCs you may not even notice much difference.
Phil |
|
Back to top |
|
 |
|