Lit by HDR but solid color ?

Is there a way to light a scene by an hdri but has a solid color ?

Could you please show an example of what you want to achieve?
What is supposed to have a solid color? The light? The objects in the scene? What kind of objects - are they reflective?

Not exactly but i’ll try to explain. I have a glass object on a plain which is lit by a studio panels hdr I’ve taken from Keyshot. The problem is that the glass is reflecting & refracting the light but also the black. Ideally I want to use the light but make the environment color just a plain solid color. If I mix rgb & replace the black with the color I want, the problem then is the environment also emits that color.

Make any sense ?

… And there’s a whole lot of already solved problems in the world (not to mention handy manuals) :wink: so use world nodes (trick/example - excerpt below) to your advantage

Sometimes it may be useful to have a different background that is directly visible versus one that is indirectly lighting the objects. A simple solution to this is to add a Mix node, with the Blend Factor set to Is Camera Ray. The first input color is then the indirect color, and the second the directly visible color. This is useful when using a high-res image for the background and a low-res image for the actual lighting.

Similarly, adding the Is Camera and Is Glossy rays will mean that the high-res image will also be visible in reflections.

The word of life is: EXPLORE!
:slight_smile:

I’ve done exactly as you’ve shown but it doesn’t seem to do anything.

You need to choose which outputs of the Light Path node are relevant to you, of course. Here’s another example:

https://dl.dropboxusercontent.com/u/27650383/29-07-2017%2010-06-29.png

https://dl.dropboxusercontent.com/u/27650383/29-07-2017%2010-07-05.png

Camera, Transmission (= what you see through the glass) and Glossy use the plain grey background, while the lighting is provided by the HDR (see the caustics).

Not sure, though, why you would need to use an HDR background in that scenario. What’s the benefit if you don’t want to use the matching reflections and refractions it provides?

Ok thanks, will try again.

I think the solution if I read the question correctly is to switch the Is Glossy Ray to Is Transmission Ray in the Light Path node as illustrated by @burnin.

At least that was what I was looking for as a solution to having the natural lighting with a solid background. I am still testing it. At least it looks to work with reflective surfaces.