2
$\begingroup$

This tutorial explains how to make a shader that blend object with the ground by extracting the ground texture and applying it to the object. Here is an exemple:enter image description here

The blending is done with a color ramp creating a gradient along the Z axis enter image description here

Here is my version: enter image description here

I would like to use it in combination with a displacement modifier to increase realism. Turns out the gradient along the Z axis is not affected by the displacement (he remain straight) as you can see.

enter image description here Here is how the gradient is created in the shader

enter image description here

Is there a way to get this gradient affected by the displacement map in order to achieve a nice blend between ground and object (blend follows geometry) or any other solution to get a nice blend with an uneven ground, some geometry node maybe ?

here is the file for those who want to have a look:

Here are more tutorial related to the blending between floor and meshes: https://www.youtube.com/watch?v=6auecD4Rhx4&ab_channel=LOLDOBLENDER https://www.youtube.com/watch?v=5xYo0rE0aIM&ab_channel=PalurdasArts https://www.youtube.com/watch?v=4BTM4YPAeh0&ab_channel=Crompwell

$\endgroup$
4
  • $\begingroup$ I can't think of any easy shader method for this. Since displacement will operate on the normal vector of the faces, the displacement on the ground plane will clip randomly into the displacement from the shapes, breaking the illusion of a seamless texture. $\endgroup$ Commented Jun 9, 2022 at 19:57
  • $\begingroup$ In some cases the workaround could be Ambient Oclusion ... in more complex scenario could help Dynamic Paint with its proximity ... or there exists some OSL shaders that can detect two overlapping objects (just OSL is Cycles based not Eevee)? ... or I saw a few years ago some boolean material? So first question - Does Eevee matters for you? $\endgroup$
    – vklidu
    Commented Jun 10, 2022 at 8:47
  • $\begingroup$ @vklidu the blending matter more than the engine (but good advantage if Eevee compatible since it would be easier to tweak it with real time result) $\endgroup$ Commented Jun 10, 2022 at 10:20
  • $\begingroup$ @Aubrey No because my question is about two different objects and one having a displacement modifier or a displacement node $\endgroup$ Commented Jun 10, 2022 at 16:58

2 Answers 2

3
$\begingroup$

May I interest you in a Geometry Nodes solution? This one is good for medium to higher density meshes.

Geometry nodes tree

$\endgroup$
5
  • $\begingroup$ Looks promising ! Are you OK sharing the blend file ? I don't have much knowledge in geometry node and don't understand how it works ands what is the link between the texture and the geo node. $\endgroup$ Commented Jun 10, 2022 at 17:04
  • $\begingroup$ +1 Great :) I was just thinking about GN proximity too :) $\endgroup$
    – vklidu
    Commented Jun 10, 2022 at 17:11
  • 1
    $\begingroup$ @ponsdeleon Done! $\endgroup$
    – Rhaenys
    Commented Jun 10, 2022 at 17:35
  • 1
    $\begingroup$ @ponsdeleon just replicate Material and geometry node-tree for your Cube as used at Rhaenys screens. The core is to use the same name in material "Attribute" and "Store Named Attributed" node. Just as mentioned you would have to subdivide the Cube (it wouldn't work for 8 vertices cube) since it is based on faces. $\endgroup$
    – vklidu
    Commented Jun 10, 2022 at 17:42
  • $\begingroup$ Works fine with version 3.2 of blender, (not with the 3.0 since the "Store Named Attribute" doesn't exist in this one) $\endgroup$ Commented Jun 10, 2022 at 19:40
2
$\begingroup$

From mentioned the simplest one is Ambient Occlusion ...

enter image description here enter image description here enter image description here

... disadvantage of it is of course AO is over all object (at the example dirt is covering around small cube as well). In Some cases you can eliminate it by your already used Z axis.

enter image description here enter image description here

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .