Page 1 of 1

5 Blended Material through RGB Color ID Textures. issue

PostPosted: Wed Mar 28, 2018 7:00 am
by smoluck
Hi.

I've created a Blended Material through a new shader (based on Snow example). I've succeed on making this one except that i can't find the way to offset the minimum angle where the snow start to appear. Tried to use a contrast node or Offset, but i could find the way. ( searching for some sort of level node like in SubDesigner).

Anyway the main Problem i got, is that if i want to Blend with that result more textures, for ground, through an RGB Texture to add 3 more different pass, it seems that Unity can't mix more than 2 Normal Map.

Clending the SideStoneWall and Top Stone is ok. but after that, using Lerp to mix the others, they didn't shade correctly ( same thing occur on AO pass)

Image

Image

Image

Image

i hope someone can help me. Cheers.

Re: 5 Blended Material through RGB Color ID Textures. issue

PostPosted: Wed Mar 28, 2018 3:11 pm
by Amplify_Borba
smoluck wrote:Hi.

I've created a Blended Material through a new shader (based on Snow example). I've succeed on making this one except that i can't find the way to offset the minimum angle where the snow start to appear. Tried to use a contrast node or Offset, but i could find the way. ( searching for some sort of level node like in SubDesigner).


Hello, thank you for getting in touch!

Depending on the type of blending effect you want to achieve, you could possibly try using the Dot product of a Normalized Vector3 and the World Normals in order to blend between two textures according to the angle between those normals and the vector. Feel free to also check out our FourSplatsFirstPassTerrain shader function, included in the main package.

We also provide a few different blending nodes which may assist you in achieving different types of blending, such as the Layered Blend, Summed Blend and Weighted Blend.


smoluck wrote:Anyway the main Problem i got, is that if i want to Blend with that result more textures, for ground, through an RGB Texture to add 3 more different pass, it seems that Unity can't mix more than 2 Normal Map.

Clending the SideStoneWall and Top Stone is ok. but after that, using Lerp to mix the others, they didn't shade correctly ( same thing occur on AO pass)


Have you had the chance to check our FourSplatsFirstPassTerrain shader function? It provides an example on how to blend between 4 different textures and normals, which might serve as a good reference.

If you'd like us to take a quick look at your shader, feel free to send us a simple project sample via [email protected], thanks!

Re: 5 Blended Material through RGB Color ID Textures. issue

PostPosted: Mon Apr 09, 2018 6:29 am
by smoluck
Ok so if i understand well, as there is a limitation of 4 sample texture, so i could do at least 2 texture over the stones. check you email, for testing the shader, i've send it.

You could probably remove the passes on Vertex color Blue channel.

that shader combine the ease of an automatic layering function on top faces, and the ease of use of vertex colors.