I don't have any lights in my scene only an HDRI. The light of it goes through my object who has a whole in it and I can see everything inside as I would have a light in there. Obviously it's weird because there is not light inside. There are some tutorials explaining how to play with the shadows of lights, but how do I play with the shadow of an HDRI? Thank you for your time.

I'm sorry I was wrong about it. Only in Eevee is happening not in Cycles. I attached a link with a simple cube to show you what I'm talking about. Just an HDRI in the scene, no other lights. enter link description hereAny suggestions how I can make it in Eevee not to show the light inside... besides changing the material color :-). Thank you.

  • 1
    $\begingroup$ Are you using Cycles or Eevee? The object should cast shadows on itself with Cycles, so the effect that you're describing shouldn't happen. Can you add a screenshot of your mesh in wireframe mode? $\endgroup$ – Robert Gützkow Dec 11 '19 at 8:58
  • 1
    $\begingroup$ The same in both Eevee and Cycles. Just take a cube make a whole in it not too big, add an HDRI to the environment and turn off all the lamps in the viewport and render. If you add a light color material inside the cube it is showing it as you have a 1000 W point lamp inside. Obviously it shouldn't be that way because in reality you can't see through that hole no matter how bright the light outside is. An HDRI it's supposed to resemble the outside natural light when set up as environment texture but its light goes through the objects in the scene. Of course it does, it's virtual reality, right $\endgroup$ – Daniel Dec 12 '19 at 13:19
  • 1
    $\begingroup$ There are a lot of reasons why this could happen, without screenshots or you project file we can't help you. Also make sure that your lights are actually hidden in the render and not just the viewport (restriction toggles) $\endgroup$ – Robert Gützkow Dec 12 '19 at 14:20

Short answer: using Irradiance Volumes might help...

Long answer:

Cycles is using ray tracing so shadows of HDRI are a given, i.e. when the ray calculation is bouncing inside the box, there is little chance of it getting to any of the light source of the HDRI through the hole inside your box, or no chance at all if the box is completely sealed (rays are calculated backward from the camera).

Eevee is not a ray tracer and the global illumination (GI) and shadows from an HRDI background texture can only be approximated using irradiance volumes and baking the results on top of existing materials. Eevee cannot do realtime calculation of shadows and indirect lighting of the lightsource emitted by every pixel of your HDRI texture. For realtime, Eevee only calculates the direct illumination of the HDRI on all faces of the scene and adds the indirect lighting stuff only if it has been baked (or until Eevee supports AMD ProRender or NVidia RTX for GI :) ).

In the basic example below, you can see that after setting an Irradiance Volume and Baking Indirect Lighting (under Render Properties), low res shadows start to appear inside the cube. Playing around with multipls Irrandiance Volumes and their resolution and other aspects might help but in general, stick to Cycles for true GI.

enter image description here

Credit: Beautiful sunset HDRI from Greg Zaal (https://hdrihaven.com/hdri/?c=outdoor&h=cape_hill)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.