Trying to setup different HDRIs for background, lighting and reflections, but stuck along the way

Hi All,
I’m trying to set up a mix of HDRI’s, I basically like the lighting setup up I have from " Environment Two", but would like a different image for the background (" Environment One") and reflections.
I’ve had some success from the scouring the web - see attached image.
But I’m struggling to get Environment One to show in the background and reflections, the reflections are currently coming from Environment Two.
If the solution is to have 3 groups one lighting, one background and one reflections, I’m fine with that, but my brain won’t work to set that up lol.
I’d like to avoid setting the background up in the compositor.
Any help with this would be great and stop me pulling my hair out.


Taking a look at your attached image, I noticed two things:

  1. In the Reflection View frame, there are two nodes sitting on top of each other. You can see that in the factor input, the slider is showing even though the input is connected. I highlighted it in red in the image below. Remove the node with the slider showing.
  2. Still in the Reflection View frame, the Shader connections need to be swapped (highlighted in green in the image below). Currently it says: if ‘Is Reflection Ray’ equals 1, use ‘Environment Two’; use ‘Environment One’ otherwise. It’s the opposite of what you want.

Thanks Akikun for pointing that out, turns out there was a duplicate node under that one which was causing issues to the slider.
I follow your steps, but swapping the shader connectors around in the reflection view only seems to change the background HDRI, but still shows the building HDRI in the rections strange.
Basically I have HDRI with trees for the back ground and HDRI with buildings mixed with a sky texture node for the lighting.
What I’m trying to achieve is the background and the reflections using the trees HDRI and the lighting using the building mix sky texture HDRI.
I’ve attached a couple of screen shots showing what happens when I swap the shader connector in the reflection node, notice the rections always show the building mix HDRI in both images.
My next thought was is the the camera view connectors wrong, but they are correct, if I swap them the light come from the trees HDRI which is not what I require.
Thank you again for your help, hope this makes more sense of what I’m trying to achieve :slight_smile:

It should work but apparently it isn’t working. I used another approach: I combined ‘Is Camera Ray’ and ‘Is Reflection Ray’ with a math node to drive the mix shader and it seems to be working. See the following images.

Also, it may be obvious but make sure you are using Cycles, as ‘Is Reflection Ray’ doesn’t work with Eevee.


That worked great, Thank you very much for your time on this :smiley:
Yes I’m using Cycles for rendering.
Have a great Sunday.

You’re welcome. Happy blending. :wink: