3
$\begingroup$

I have a scene below where I am wanting to get an HDRI image to come in through the windows and light the scene in the window areas and have a god ray like effect. I want to do this with a volumetric effect and have the HDRI lighting create throw patterns in the scene. Is this possible? To have volumetric lighting where the HDRI creates throw patterns? Thanks for the help enter image description here

$\endgroup$
9
  • $\begingroup$ Please search before asking, there are many good questions about this topic $\endgroup$ Commented Jul 9, 2018 at 18:36
  • $\begingroup$ @Duarte Farrajota Ramos-With respect, I don't think you understood my question. I searched a ton of questions for this already. I am talking about having a HDRI (which has every pixel from the HDRI as part of the light source) interacting with a volumetric shader to get a throw pattern). I'm not talking about using a directional lamp or a soft area lamp to make rays (which I have already searched for and know how to do). I just want to know if that is possible, or how an HDRI would work with volumetrics under the hood and if you could create rays and throw patterns with it. $\endgroup$
    – Tyler Dahl
    Commented Jul 9, 2018 at 18:40
  • 2
    $\begingroup$ You can't use volume scattering and a surface for the world. To achieve this effect you need to create a volume that surronds the scene (a big cube would be enough) that has volume scattering and acts as a scattering domain. See: blender.stackexchange.com/questions/92884/… on top of that you also need to modify the glass shader to let direct light through. Read: blender.stackexchange.com/questions/111146/… $\endgroup$
    – user1853
    Commented Jul 9, 2018 at 18:45
  • 1
    $\begingroup$ HDRIs generally produce uniform soft lighting with relatively soft shadows, I don't think it will be very practical to achieve what you want without some sort of directional light. Even then you might have trouble $\endgroup$ Commented Jul 9, 2018 at 18:46
  • $\begingroup$ @cegaton. Awesome, that makes total sense. Thanks man! $\endgroup$
    – Tyler Dahl
    Commented Jul 9, 2018 at 18:46

1 Answer 1

4
$\begingroup$

You can't use volumetric scattering and any kind of surface in the world settings simultaneously.

(see: Why doesn't an Environment texture appear when the world has a Volume Scatter shader?)

Volumetric scattering will completely obscure the HDR.

(Blatant Quote from the Blender Manual)

Volume World

A volume shader can also be applied to the entirely world, filling the entire space.

Currently, this is most useful for night time or other dark scenes, as the world surface shader or sun lamps will have no effect if a volume shader is used. This is because the world background is assumed to be infinitely far away, which is accurate enough for the sun for example. However, for modeling effects such as fog or atmospheric scattering, it is not a good assumption that the volume fills the entire space, as most of the distance between the sun and the earth is empty space. For such effects it is be better to create a volume object surrounding the scene. The size of this object will determine how much light is scattered or absorbed.

To illustrate this workaround: create a box around the scene (it will act as a domain) and have that box use volume scatter:

enter image description here Please note that the volume scatter is plugged to the volume socket of the material for the domain, the surface socket should not be used.

Note that the default density for the Volume scatter node is usually too high at 1.0, use smaller values until you find one that works for you.

Here's a scene lit entirely by an HDR image (HDR credit goes to giantcowfilms.com).

enter image description here

Then, if you have windows and are using glass on the windows, you need to modify the shader so that it lets direct light through.

(read: How to illuminate the darkness inside glass objects in Cycles?)

enter image description here

$\endgroup$
4
  • $\begingroup$ Hi, @cegaton . Thanks for this. This workaround however doesn't appear to work the same with Eevee, as it has the same effect than applying volume scattering in the world shader, occluding the environment texture. Would you happen to know how to achieve a fog effect which doesn't obscure the environment texture in Eevee which doesn't involve the use of render layers? I found an approach using z-depth and modifying each involved material, but feels clumsy. Please do tell me if you need me to open this as a new question. Thank you! $\endgroup$
    – ecv
    Commented Apr 30, 2019 at 12:37
  • 1
    $\begingroup$ @KevinRemo please ask this as a new question. $\endgroup$
    – user1853
    Commented Apr 30, 2019 at 15:12
  • $\begingroup$ @ecv please don't use the comments for unrelated issues or to draw attention to a different question. Read: blender.meta.stackexchange.com/questions/2491/… $\endgroup$
    – user1853
    Commented May 1, 2019 at 14:19
  • $\begingroup$ ok, sure. Sorry. I deleted the previous comment with the link to my new question. $\endgroup$
    – ecv
    Commented May 1, 2019 at 14:22

You must log in to answer this question.

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