#Texturing

1 messages · Page 1 of 1 (latest)

astral sequoia
#

But in any case, to do the blending here is what I recommend.
Using a height map of the texture would give you better results, but you can technically use any map.

#

Your first step would be to be able to simply blend two textures, or n textures

#

Depending on how you are doing the texturing maybe it's super easy or super hard

#

If you have a set of weights already, super easy

#

Otherwise then it can get complicated

#

Let me know and I will try to help from there

glossy cairn
#

Hey @astral sequoia , thank you for your answer and your time!
The thing is that i'm using unity's tilemaps. I Have a Sprite for each Tile and through algorithms i determine which tiles i set in the tilemaps using Tilemap.SetTiles(). I have an int Array per Chunk which saves the data around the neighboring cells, where each bits corresponds to 1 neighbor.

For Example: 0000 0000 corresponds to the neighbors like this -> (N) (NE) (E) (SE) (S) (SW) (W) (NW)
Meaning that the number 4 would be 0000 0100 bitwise, so i need to blend that tile only to (SW). I would of course create blend masks for each direction, which would then be picked based on the number. ( See images ).

The problem that i have now is how i can access that array's data in shader graph. Each Tilemap has a Tilemap Renderer Component which has a material and i think is what is used by most for shader magic. https://docs.unity3d.com/Manual/class-TilemapRenderer.html.

hope this helps 🙂

astral sequoia
#

I see, well it then gets a bit way more complicated

#

You would need to:

  • Determine the place where two diferent tiles meet
  • Add a new tile with a new material on the outline
  • Add a blend texture on the direction of the blend on the new tile
  • Add the desired textures to blend on the new material
  • Blend according to the height map and the blend texture
#

Sadly I haven't used that much shader graph.

#

But if I understood correctly and you have the info that I understand you have

#

First off, are you already passing any data to the shader graph?