leukbaars / DreamUV

DreamUV - 3D viewport UV editing tools for Blender
1.35k stars 58 forks source link

randomly distributing planks #34

Open lonnie-ralfs opened 12 months ago

lonnie-ralfs commented 12 months ago

hey love the tool, use it all the time! 💯 ❤️

i'm hoping we can add a feature to randomize the distribution of uv's onto atlas parts of similar size

i think these screenshots will help illustrate the request

  1. here is my atlas object image
  2. here is the atlas in wireframe, see how I have 5 planks of roughly the same size? image
  3. these are the planks I want to hotspot image
  4. ⚠️ the issue is that all of the planks are allocated to the same part of the atlas image
  5. 💡 i'm hoping we can add some way to incorporate randomness to these uv allocations during hotspotting

this would really speed up my workflow and I think people would appreciate it 👍

i have some coders on my team, and maybe i could persuade them to contribute, if you could offer some pointers on how we could make a good pull request for this 🤝

thanks! 👋

melvixiodf commented 12 months ago

I second this pls.

I used to think I had the atlas at the wrong scale thats why the uvs weren't randomly distributed among the atlas parts that were of the same size. I would even duplicate that part of the mesh specifically and add to the atlas to make sure the scale is correct, sometimes, the addon would not even allocate to those faces on the mesh that were duplicated from to form the atlas.

chase-moskal commented 10 months ago

hey.

it looks to me like this is the area of interest in the code: https://github.com/leukbaars/DreamUV/blob/master/DUV_HotSpot.py#L282-L325

we might be able to add some kind of randomness factor here, to solve this issue.

we'd want to add a slider to the UI so the user can adjust that randomness factor.

melvixiodf commented 10 months ago

hey.

it looks to me like this is the area of interest in the code: https://github.com/leukbaars/DreamUV/blob/master/DUV_HotSpot.py#L282-L325

we might be able to add some kind of randomness factor here, to solve this issue.

we'd want to add a slider to the UI so the user can adjust that randomness factor.

Thanks a ton, Chase.

leukbaars commented 2 months ago

I am a bit surprised this doesn't work. It should randomize them if they are the same size. Could you share a .blend file for me to look at?

chase-moskal commented 2 months ago

@leukbaars i'll see if i can poke my artist pal @lonnie-ralfs to make a repro blend for you

lonnie-ralfs commented 2 months ago

woodtrimissue.zip

Here's the .blend.

Maybe the issue is because the planks are not precisely the exact same size. We need it to work even when they are slightly different sizes, a configurable threshold would be ideal.