Smooth "transition" between 2 materials (in Cycles)

Hey BlenderArtists people!!

Ok so basically, when I create a model (character/object/anything), which is only made of one mesh, Let’s say I made a mountain with the wonderful Landscaper add-on, I then select 3 different parts (bottom, medium, then very top) and create a Vertex Group for each of them ; I then create 3 materials that I want to be Grass, Rock and Snow When I assign these materials to the correct selection, the border between the 2 materials is kind of rough/hard…

Is there a way to “smooth” or “soften” the transition between the two materials?? If you see what I mean ^^ By the way preferably in Cycles :slight_smile:

Thanks in advance!

P.S Sorry if my English is bad, I’m French… :slight_smile:

You probably want ‘vertex painting’. Here is a tutorial explaining it quickly:

Although that will show you how to mix two types of material, but I am unsure how to do three… maybe somebody else knows the answer to that.

are you going with UV image or proc textures?

you could try to add a gradient or a ramp with multi slots

but gradient will make a color variation

happy cycles

I was asking myself the exact same question.

However just before I went to prove my search engine skills, I found this thread and RickyBlender’s post inspired me to find some kind of solution.

So, what you’re about to see is a very quicky put together scene with an awful proof of concept material.

In this case it only works with a 90° rotation on the Y-axis.
No UV maps were unwrapped.
I ‘think’ this would work with any given number of mix shaders?

I’m sure there is a more elegant way to do this. I’d be happy to read it! Especially if there were a way to control the falloff with numbers instead of sliders…

Sir Richfield would be nice if you cold upload the file

if needed i could dig up some example for a Vcol and proc mat in cycles if needed
it is more difficult to work with but very nice for doing some grunge maps!

happy cycles

I suppose I could do that.
Just keep in mind that I do not claim to really know what I did there, it just kind of works.
It is not as controllable as I would like to.

What I need in the long run is to determine the border of the materials by the information of an displacement map and then “blur” the information given. I can find the “borders” with “less than” math nodes. I’ll give my idea a try if I find some time.

Attachments (245 KB)

here is an optimized version of your node network… only one BSDF node used.

optimized.blend (947 KB)

Vertex painting will give control as to where you want the two different materials to be… if you need more detail, look into texture map paintings.

Thanks doublebishop, these nodes make a lot more sense.

OK, I’ll write that on my “things to learn” list. ATM I’m at “What do these buttons do?” :wink:

I chose one direction of learning blender and that is the “sculpting with displacement and UV maps” thing in another thread in this forum. Using that I don’t get much vertexes to paint on, as long as I don’t apply the subdivision modifiers. (Or should I look into the multiresolution modifier?)
(It is very possible I’m missing something altogether)
That’s why I’m looking for a way to let an image determine where the mixing should happen.

I attached a concept file. It’s not as organic as it should be for what I’m aiming at, but I don’t have access to my files atm.
With the actual method I can mix colors based on the objects generated “height”.
What I need (read: aiming at) is to mix the colors based on the displacement maps “height”. The next step of applying displacement maps would indeed be the use of vertex painting to determine the strength of the displacement. But that should be independent from the “height” of the mix.

Maybe if I’ll write it down, I’ll have an idea if I read it again later:

  • From black to 20% grey (of the displacement texture) use color A
  • From 20% grey to 40% grey fade color A from 100% to 0%
  • from 20% grey to 40% grey fade color B from 0% to 100%
  • from 40% grey to white use color B

Attachments (451 KB)

I have used the same method to get a kind of grunge wall:

It uses two gradient layers.

Found a solution for my problem.
The answer was RGB curves.

The only image used in the picture is the displacement map.
I used RGB curves to separate the greyscale of the displacement.
The information was used as a factor to mix the wanted color and black.
Then the results are mixed together. This way colors get only mixed when overlapping.
Finally similar things were done with glossy shaders and bumps.

Blend file is attached.
It’s not really the orginal, though. Converted the displacement map from a exr file to png to not having to upload a 5MB blend file. Kind of messed up the transitions.
Also while it kind of worked out the way I wanted (well, for a start), the transitions are not as “smooth” as I would have liked. I think the displacement map was not that ideal for the task…


Spines on a (389 KB)