Hey,
I was wondering if it is possible to blend multiple materials together inside of 3ds Max using Vertex Color and something similar to THIS?
I have to admit I haven’t checked indepth yet if something like this is possible using corona. But maybe someone here has already tried or done this before?
Well, I couldn’t really find anything about this online. And granted I haven’t tried for very long yet but I couldn’t make something that comes even close to the blending there.
Because all I am doing is changing the Vertex Color which is as far as I know just the texture coordinates for the blending ( I have no idea if I have this right ) instead of changing the way the material blend node actually blends.
Well, if you have two textures with carefully prepared height maps, then it shouldn’t be hard to blend those textures and use height maps as masks for conditional blending. Why you should need vertex colours for that, i don’t know. But maybe i didn’t understand that article fully - didn’t read it carefully.
Vertex color mask (easy to paint and use in real-time) to paint areas where blending between two materials happen, and where not (only base material shows).
Height-map mask to blend between two materials. You need at least one height map (the one with more depth ideally of course) for that. The better this heigh-map is, the more convincing is the result, so it’s either sculpt based or scan-based. Alternatively, you can derive one from diffuse texture using Quixel NDO/Bitmat2Material/Skald/etc… but if won’t be as convincing because it’s only guessing the depth.
This is done using standard 3dsMax nodes as Romullus said.
With that said, this technique makes most sense in real-time, because the surface will be rendered only using parallax techniques. In Corona, you can just use displacement of two different surfaces and the effect will happen naturally (instead of vertex painting you can z-height paint directly using polygon brush).
Vertex colours are good when you have relatively dense mesh to paint on or when there’s a need to have maximum interactive feedback. In other cases i would stick with texmaps.
I should have cleared up why I am asking and what I am trying to achieve in the first place.
I am using World Machine to create large scale terrains.
Now with a little bit of setting up, World Machine can provide masks that are then planar mapped onto the terrain mesh that define where a material is supposed to be displayed.
Simplest example would be a slope mask that defines where the cliff material is supposed to go and where grass is supposed to go.
Usually I would end up with around 5 of those masks for 5 different materials.
Up unto this point the whole thing is procedural and works A+ for backrounds especially.
But often times I would like to have a bit more fine control for areas closer to the camera on where the different materials go, so I would use Vertex Paint for that.
I haven’t actually checked how to do this inside of 3ds max natively yet. Not sure if you can drag and drop a bitmap into a vertex paint slot to use as a base to later paint over manually.
( Usually I am using game engines like UE4 for this kinda stuff )
And in the end I would like to blend all those materials together using the height based blending approach.
The textures are Photoscanned textures provided by a guy named Christoph Schindelar. And the heightmaps are pretty much top of the line.
I’m real sorry that I haven’t provided any actual examples yet ( I kinda don’t have too much time lately ) but I will try to post an actual example tomorrow perhabs.
I think for what you have described vertex paint modifier + vertex color map will be the base. Then you can experiment with setting different map channels for the vertex paint, baking (as Romullus suggested), mixing vertex map with procedurals to create masks, etc…
Both of them blended together using “Corona Layer Mtl” and a “Vertex Color” node set to map channel 0, as the mask.
Only the albedo seems to be blended. The height and normal seem to only come from the “Forest Ground Material” though.
So, am I doing something wrong right from the start?
Displacement is taken from base material only. That’s current limitation of layered material unfortunatelly. Bump map should be picked correctly AFAIK. Try to mix displacement at map level instead of material level. Alternatively you can blend everything in single material.
You could alternatively just decouple displacement to map level (as you suggest), but place it using Disp modifier onto geometry object.
This would retain benefits of layered material (separate maps, easier tweakable).
But by any of the above solutions, you loose the option to easily adjust height of each displacement separately no ? So it’s not such an ultimate solution to current problem.
This should easily be possible.
But my head is already starting to spin imagining the node network for a whole bunch of materials blended this way.
I also tried a bunch of different composite maps for all the different materials and I haven’t gotten any closer to achieving a similar result to the article I posted at the start of the topic.
Well, I know. That’s the only way it would work :- ).
But the modifier has only single “height” option (I don’t mean relative height of texture map, I mean the physical units inside the modifier, ie. 2 cm). You will have to use this for the material with bigger depth, and adjust the other heightmap.
While keeping displacement map in two different materials, you can keep your texture heightmaps unmodified and adjust each height respectively.
Sorry, i didn’t read your post carefully enough for the first time. Yes, you’re right, this method isn’t flexible enough. Oh well, we have what we have for now. Let’s hope layered material will be revisited someday :]
Anyway, recorded short video for OP. Just a proof of concept, nothing more:
Let’s hope layered material will be revisited someday :]
It could be bit more robust. Game engines now offer blend nodes that don’t just lerp between two materials, but can ‘stack’ them (I think this is what the legacy Autodesk composite material was supposed to do ? But does anyone ever used it).
You could then lerp their diffuse/specular properties, but overlay normals.
This can be easily done through nodal network of course, but the charm of more advanced blend node, is that you can keep untouched presets, and mix them into final materials with very artistic, real-world resembling approach. A “dampness” layer, mixed with paving, would overlay normals, and multiply diffuse properties, lerping specularity, without any nodal network at all. Even a 5year old child could then easily create complex blended materials.
One can hope. Or not, when something like “check-box” caused hysteric reactions.
Thanks the video is really nice especially for other people who want to do something similar in the future.
Now we have solved the issue of blending the dislplacements correctly and using Vertex Painting to mask the materials.
I am still not any closer to actually blending the materials properly based on height. Doing it in a DirectX material wouldn’t be too hard but I am not sure how that would even work with Corona.
And in all honesty. The offline render displacements look so good that anything gained by heightmap based blending would almost be marginal.
On a different note, concering Juraj_Talcik’s post.
The material system inside of 3ds Max is kinda meh in all honesty.
I don’t mean Corona or Vray, just in general the native 3ds Max slate editor.
Comparing it to something like the UE4 material editor which is essentially just HLSL code presented as template nodes, 3ds Max’s material editor is just meh.
Maybe it’s my lack of experience working indepth with the 3ds Max material system but to me it feels simply too obscure to make more difficult things with.