How can I have the snaptopixel feature working from UV editor when I use + Lightmap + SmartUV + Unwrap any of the above commands. In UV editor UVs->SnapToPixel selected executing any of the above commands causes the vertices of island to be to positioned proportionally that is vertices of islands have fractioned numbers e.g. 19.11, 28.12 etc.. , rather than integer numbers 19.00 , 28.00 etc.. . I want to remedy that.

If there is workaround I'd like to apply it, if there is not then I would like to implement python code for this, your guidance will be appreicated.

  • 1
    $\begingroup$ I'm greatly interested in this potential feature too ! :) $\endgroup$ – Vinc3r Aug 30 '16 at 7:21

I'm not a massive user of this feature, but as far as I can tell, Snap to Pixels refers to snapping while you are moving UVs around in the editor using the standard translation tools, like G, R and S. See the comparison in this GIF (first I move around without Snap to Pixels enabled, then with):

snap to pixels

The trick is, you simply enable the G tool, and the vertices will already snap. Just LMB click to confirm.

  • $\begingroup$ telling that pressing G is compulsory, was really helpfull, my only remaining discrepancy is islands smaller than 1 pixel or close to 1 pixel but not greater than one, are morphed into a line or dot, can you suggest any trick for that. $\endgroup$ – Sonya Blade Aug 30 '16 at 8:27
  • 1
    $\begingroup$ @SonyaBlade regarding the lines issue, I believe that's impossible to achieve. Think about it: The UV coordinates are simply rounded to the closest value by the algorithm. How would you guarantee that faces are preserved? UVs unfortunately don't come in very pixel-friendly, and depending on the geometry (say, you have a lot of triangles around like in my example) there could be five, six, seven points within an area, while there is only tone or two pixels around to snap to. You can only provide an image with enough resolution, so the likelyhood of collapsing is reduced, or fix the areas manual $\endgroup$ – aliasguru Aug 30 '16 at 9:36
  • $\begingroup$ In my example, I was snapping to a 256 x 256 pixel image. If you give it a 1024x1024 pixel image to snap to, it will work out a lot better, But I don't know if you have this freedom in your case. $\endgroup$ – aliasguru Aug 30 '16 at 9:37
  • $\begingroup$ @SonyaBlade Also, if the island gets averaged into a dot, chances are it's too small in the first place to really even need more than a dot. BTW What would be the purpose of snapping to pixels anyway? It's actually kind of pointless except for in a very few cases. $\endgroup$ – JakeD Aug 30 '16 at 12:33
  • $\begingroup$ @pycoder Unreal Engine has troublesome seam issues if the lightmap is not generated on the pixel. It colors half filled pixels as black making shadows at the end of faces. Sometimes it can be useful but most of the time not. Especially in context of modular pieces. This is what brought me here in fact. I'm modding texture atlas addon to give me the option to snap to pixel among a few other things game related. $\endgroup$ – jollarvia Oct 23 '16 at 13:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.