2
$\begingroup$

I have a scene where I'm using a HDRI image for the background (and have a separate sun inside). The HDRI doesn't contain only sky, but also a bit of the ground. The problem with placing objects in the environment is that they don't cast shadow to the ground (as the ground is part of the hdri).

I am thinking about making a material to put flatly on the ground that would be: a) generally transparent b) giving a grey tint to the places where the objects shadows would be

How would I set a material like this? Or is there maybe a better way to achieve the shadows?

Note: I don't care about it being fully photorealistic with the ground materials etc (as this is obviously impossible), but rather would like to have a rough shadow where it should be.

the object on the background

$\endgroup$
4
  • 2
    $\begingroup$ maybe you are looking for shadow catcher: youtube.com/watch?v=7OOCjR5s9EQ $\endgroup$
    – moonboots
    Aug 15, 2021 at 11:31
  • $\begingroup$ precisely! Feel free to promote your comment to an answer $\endgroup$
    – sygi
    Aug 15, 2021 at 11:45
  • 1
    $\begingroup$ sorry I thought you were using Eevee, actually in Cycles it's even easier, just enable the Shadow Catcher option $\endgroup$
    – moonboots
    Aug 15, 2021 at 11:58
  • $\begingroup$ Yeah, I found the option once I knew what to look for :) $\endgroup$
    – sygi
    Aug 15, 2021 at 12:51

1 Answer 1

2
$\begingroup$

In Cycles you can simply select your plane and enable the Shadow Catcher option in the Object panel:

enter image description here

In Eevee you can use the trick explained here by CG Top Tips, which consists on the following node setup:

  • Diffuse RGB > (Converter >) Shader to RGB > ColorRamp > (Factor) Mix Shader
  • Diffuse BSDF > (Shader) Diffuse BSDF
  • Transparent BSDF > (Shader) Diffuse BSDF
  • Mix Shader > Output

enter image description here

Don't forget to choose Blend Mode > Alpha Blend and Shadow Mode > Opaque in the material Settings.

$\endgroup$

You must log in to answer this question.

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