Texture atlas points selection + information.
When using pre-created texture atlases in-game, the texture coords must be set by hand (calculating the corner points or looking for them in external image edition software, but this is normally a bit tedious). It would be great if there was an option to enable "corners picking", so when you click in the image it selects a point on it that matches the next power of 2 in x and y.
So, for example, if you want to know which points are the left-top corner and the right-bottom corner of any sub-image inside the atlas you just click near of that corner and the corner is automatically selected, giving you the coordinates for x and y.
Comments (4)
-
repo owner -
reporter Imagine you have the next image:
And now you want to create a button in your code with the three stars rectangle in the center of the image. For it, you must manually set the stars rectangle top corner pixel position (eg: x:640, Y:512) . However, it is not obvious which position is, it would be great if you could just click near that corner and it gets selected giving the corner information.
Of course, to make this we must assume that each sub-image is a power of 2 (so when clicking, it gives the information of the next power of two pixel nearer to the click position).
Even with that in mind it wouldn't work (you can have many tiny images, eg: a full 1024x1024 image filled with 2x2 sub-images) so a slider specifying the accuracy would do the trick (changing the accuracy-potency, eg: selecting images of 2x2, 4x4... 128x128).
-
repo owner @NemesisMate can you simulate the behavior in any graphics tool and make a short video about this?
-
reporter Yes, I think I can do it. It won't be too soon though. As the priority says, it is a trivial thing to have xD.
- Log in to comment
Do you have any visual example? it isn't clear for me