Jump to content

Texture Atlas Edges Transition


Athelios
 Share

Recommended Posts

Hello,

I have got procedurally generated terrain. Terrain is divided into chunks. There is texture atlas image which contains all block textures. UVs of certain block are set to appropriate positions in texture. But it renders also edges of neighbour block texture:

Edges.png

Atlas texture:

atlas.jpg

Any help appreciated!

Link to comment
Share on other sites

6 minutes ago, gryff said:

Can you change the UVs so that they are inside each texture by about 1 or 2 pixels?

cheers, gryff :)

Changing UVs inside about 1 or 2 pixels doesn't affect result, but 50 pixels inside changed result:

Edges.png

You can see far blocks still have green edges. It can be a solution but I think there must be clearer solutions.

Thanks! 

Link to comment
Share on other sites

Was only suggesting something in between, but now that I look closer that is for when the whole image covers the mesh.  You are tiling / repeating.  I export 2 properties on textures for that, wrapU & wrapV.  It looks like you only have a seam in one direction, are doing both with WRAP_ADDRESSMODE or 1?

If so, are both your texture dimensions an exact power or 2?  If not, on load to gpu they are made that way.

Link to comment
Share on other sites

20 hours ago, JCPalmer said:

Was only suggesting something in between, but now that I look closer that is for when the whole image covers the mesh.  You are tiling / repeating.  I export 2 properties on textures for that, wrapU & wrapV.  It looks like you only have a seam in one direction, are doing both with WRAP_ADDRESSMODE or 1?

If so, are both your texture dimensions an exact power or 2?  If not, on load to gpu they are made that way.

I have WRAP_ADDRESSMODE of 1 by default. Changing wrapU and wrapV didn't help. Textrures are exact power of two (1024x512).

The seam is only in one direction because texture tile transitions are only on one side:

atlas3.png 

Image shows how UV map is repeated. My guess is that far UVs are resized or texture is compressed which result to UVs intersection to grass texture.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...