Jump to content

Tiled splatmap seams


Recommended Posts

Hey all,

I've been toying with creating a large open world, I planned to tile this using a smaller grid of tiles around the players local grid. A sample of what I am trying to achieve is at http://community.troy.nz/hm/index.html

What I have so far is a 7x7 grid of seperate tiles that use individual 513x513 32-bit heightmaps and 64x64 24bit splatmaps (i've tried various other sizes also) and three textures. I've noticed when using the splatmapping there is a seam at the edge of each tile as depicted below.


Zooming in closer you can see the issue


When Zoomed right in you can see that one of the other textures is bleeding through, there's rocks behind the stone


Does anyone have any idea on what is causing this and how to fix it? I would also be interested in being able to use multiple splatmaps (ideally several individual greyscale ones) to have more than 3 textures per tile, Is there another shader available that will do this?


Link to comment
Share on other sites

It seems I found a solution for this, it was as simple as setting the wrapu and wrapv values on the mixTexture. I previously tried this on the diffuseTextures to no avail.

tMaterial.mixTexture.wrapU = BABYLON.Texture.CLAMP_ADDRESSMODE;
tMaterial.mixTexture.wrapV = BABYLON.Texture.CLAMP_ADDRESSMODE;

I now have a beautiful, seamless tiled map. I'm guessing to use more textures for splatting I will need to look at writing my own shaders, correct?

Link to comment
Share on other sites

For more textures, you have to write an extension of the terrainMaterial:


You need to replicate what was done for diffuseTexture1/2/3 and introduce the same code for diffuseTexture4 for instance

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.

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.


  • Recently Browsing   0 members

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