1
$\begingroup$

So I have a really simple rectangle that serves as a floor tile in a 3D game. When placing the tiles in my game, I have slight white edges because my cobblestone texture does not appear to fit exactly right on the UV map (even though in Photoshop it looks like it does). When I make the grey UV map "smaller" so it is definitely covered by the image, there a no more white edges (but of course, the tiling doesn't line up anymore).

So I am exporting the UV map, adding textures in Photoshop and applying this image back here. Is there a simple way to get tiling pixel-perfect? Thank you.

enter image description hereenter image description here

Trying with snap to pixels: snap gif

$\endgroup$
8
  • 1
    $\begingroup$ Select the face in Edit mode and press U > Reset. $\endgroup$ Commented Feb 27 at 21:07
  • $\begingroup$ If you see white lines in a tiling texture, they are likely in the image. They can be a result of interpolation when scaling images in Photoshop. You probably need to fix the image, not the UV mapping. $\endgroup$ Commented Feb 27 at 21:59
  • $\begingroup$ I would question why even make a 6 faces model if it's just to put a texture on one face. Plus most game engines have more efficient tools for making basic terrain and grounds. $\endgroup$ Commented Feb 27 at 22:27
  • $\begingroup$ Solid meshes are preferable in a game engine IMO @Lauloque. Lighting gets weird with single mesh planes. Most in-engine terrain stuff is just that, terrain. It often isn't that great for hardsurface stuff. $\endgroup$ Commented Feb 28 at 2:41
  • $\begingroup$ @Lauloque I need the sides as well for visual purposes, because the game is isometric. $\endgroup$ Commented Mar 1 at 6:44

1 Answer 1

1
$\begingroup$

In the UV Editor, go in the menu UV > Round To Pixel > Corner

enter image description here

Then when moving components, they will basically be snapped to the pixels corners, allowing you to perfectly allign them to your texture:

enter image description here

Note: pixel-level motion is minuscule, therefore easy to miss!
You won't benefit from pixel snapping it if the slightest hand movement on your end moves elements across dozens or more pixels on the texture.

In order to even see and fill the pixel snapping, you really need to be zoomed into the image enough, not only to see the individual pixels, but also so that your mouse movement results to pixel-magnitude motion:

enter image description here

$\endgroup$
2
  • $\begingroup$ I added a gif to my post where I apply this setting, but no snap occurs when moving an edge. $\endgroup$ Commented Mar 3 at 20:30
  • 1
    $\begingroup$ Your image texture in your gif is so zoomed out (and the gif itself low resolution) I can't even see the texture's pixels. Plus, you move pretty fast over a great distance. I suspect it does work, but you are not putting yourself in a situation to notice a pixel-level transform. See my gif, I'm zoomed enough to see individual pixels. i.imgur.com/ZcRGrDd.gif $\endgroup$ Commented Mar 4 at 4:51

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.