Multiple textures and displacement maps on one object

Hi,
Can someone please explain if using multiple texture and displacement maps on a single object is possible? And if so, how.
I am working on some landscaping scenes, and I would like to have one object, part of the terrain, and in some parts to apply gravel displacements, on other parts bigger stones, etc. Can I use vertex map to drive the displacement? Or mesh selection tags?
Or is there any better workflow for this? I would like to avoid cutting the mesh to parts, I would like to keep it procedural (I have the low poly mesh subdivided with Remesh for a displacement to work better).
Thanks.

Hey @lukas_kostka , sure you can do this, you just need to properly mix (or blend) the displacement textures, depending on exactly what you want to achieve. Basically you can use two approaches (and even combine them):
1. Use a vertex map, which you can then use as a mix or blend mask (in a VRayMix or VRayLayered). If you want a sharp switch (instead of blending) between the displacement textures, you can also use VRayMultiSubTex, but that would be a bit trickier, if you want to use more than 2 textures.
2. Use polygon selections, which then should be used in VRayMultiSubTex’s sub textures IDs. Just note, that V-Ray does not support overlapping polygon selections, so you may have only a single texture per actual polygon.
3. It should also be possible to combine the two approaches, so use both polygon selections and vertex maps.

One thing to keep in mind - the displacement amount will be the same for the whole geometry. So you should start setting up the larger displacement first, and the rest should be reduced by reducing the color contribution of the relevant textures.

Here is a simple example scene using a vertex map:

vertex-map-displacement.c4d
vertex-map-displacement.c4d (1.06 MB)

Hi @deyan.hadzhiev and Thank you!
I did try this approach with Vray Distance, but I didn´t know how to make it work. So the key is to use VrayMix or VrayLayered, and then any node (curvature falloff, dirt etc?) can be added as a mix/blend map?
If you are aware of any tutorial explaining this in depth I will be happy if you share!

Hi @lukas_kostka , unfortunately, I don’t think there is a dedicated tutorial for this. But I’ll suggest making something similar in our documentation page.

Also, using the VRayDistance shader should be possible, again by setting it as a mask for VRayMix or VRayLayered. Just keep in mind, that VRayDistance is procedural shader, which means it can not be used for 2d Displacement type. It should work fine with Normal and Vector displacement though.

Hi @deyan.hadzhiev , If you could please help me with one more setting with the displacement. Having the displacement not a part of the shader, but disconnected object tag, really does not help to wrap my head around this setup.
Let´s say I need to make a shader of the tiles with chipped edges. The tiles are made of the simple cube in the Cloner object. I will make the shader with multitexture, so each tile will have difference in the color, bump etc.
But then I need to apply displacement, I was thinking to combine edge node with some dirt, and again to have mutitexture or to have it procedural, so it is randomized across all cubes in the cloner object.
Any idea how to approach this?
Thank you.

@deyan.hadzhiev So I suppose it is the approach you mentioned before in the thread:. If you want a sharp switch (instead of blending) between the displacement textures, you can also use VRayMultiSubTex, but that would be a bit trickier, if you want to use more than 2 textures.
Yes, I want more than 2 textures, a lot more, and to be applied on the clones with the same seed as the textures in the shader are..
And one more question related to multitexture node - is there a way to apply a bunch of textures to the node at once?
Thank you.

Hey @lukas_kostka , I’m not sure if I understand your intention correctly, but you can definitely use the MutliSubTex shader in both the displacement and the material. And as long as you ensure the randomization parameters between the two match - you will get consistent results. By matching randomization, I mean that you need to have the same Composite seed options, the same seed and the same number of textures used. And you always need to use the Instance ID randomization if you are using a Cloner. Here is a simple example:


I also attached the scene, so you can check it out. I hope this answers your question or you should specify a bit more precisely what you would like to achieve.

Edit: And to answer your separate question - you can load all the textures from a single directory at once (there is a button in the texture list tab for this purpose).
displacement_multi_sub.c4d (411 KB)

@deyan.hadzhiev thank you very much, that helped a lot!

I don’t think there is any way to mix displacement with 2D Displacement. I have a layered displacement setup using a vertex map to drive displacement in a VRayLayered and it doesn’t work. When I switch it to “Normal” it does work. 2D displacement is less memory intensive and looks better even at lower res as far as what I’m seeing. Is there not a way to mix using 2D Type?

Hey @wolfgang_himmelfarb , unfortunately mixing the two displacement types is not technically possible. What you can try, is using the Cinema 4D displacer deformer to make the vertex map displacement, and then add the V-Ray’s 2D displacement to achieve finer details.

Thank you ! deyan.hadzhiev

I’m a little confused still however - in the end, if I have a vraylayer node(layer) mixing two greyscale image maps, why would it matter how the image is made in the end. 2D displacement just needs a greyscale height map, And isn’t that what the modifier has in the end?

Hey @wolfgang_himmelfarb , the problem is not in the actual color being used or blending the textures in the layer node. The underlying problem is that you want to use a Vertex Map for 2D displacement.

Without delving into too much detail - the 2D displacement does not create actual geometry in scene (which is why it may achieve better detail with less of a performance hit), but it has a limitation that it needs an actual 2D texture which can be sampled, so it can build its height field map. The Vertex Map is not a simple 2D texture, hence it can not be sampled in 2D space. Here is a link to the documentation with a bit more information on the subject.

That being said - there should no problem in blending any amount of 2D textures for the 2D displacement, given that they are not procedural or need sampling in 3D space.

Ah, makes sense and very good to know. That being, I assume an alternative could still use bitmaps to blend 2 displacements? Rather than painting vertex(the benefit here is not having to adhere to the materials UV space), it should be possible to add a mapping channel only for masking the displacement layers and blend mat mask?

Yes, this should be possible and work as expected.

Having multiple UV channels does not work in 2D mode either. I have 2 mapping channels(0 and 1) and a displacement tag with Vray Layered Shader. In the Layer Shader I have 2 vray bitmaps with different mapping channels. It doesn’t do anything in 2D Mode but does work when I switch to “Normal” or if I enable Subdividing.

The different mapping channels is the problem here, because they still require mapping in object space, and hence can not be utilized for 2D displacement. I’m sorry if I misled you with my previous post - it is possible to blend the textures, as long as your blending mask also depends only on textures which may be sampled in 2D space.