How to override Ambient Color for single objects?

Hi,

I’m looking for a way two have some objects in my scene render with a different Ambient Color than the default in Lighting / Environment settings. Basically, I want to capture some objects in a Render Texture. They should look like they where captured in a “neutral” room. But since I have a moving sun, the objects will reflect the night time colors. So, the objects in the render texture should always have a grey ambient color and just ignore the time of day ambient color of the regular scene. My findings so far: If I set the “Ambient Occlusion” node in Shadergraph to zero, they will render just with a black ambient color. Maybe there are some hidden internal shader properties to override this.

Bump. Any solution? :slight_smile:

Hi. I guess using unlit shaders is not a solution and I’m assuming you need physically based shading, maybe you could fake the shading with local reflection probe + lightprobes. Not sure if those lightprobes can be manipulated in any way by script or prevent them from rebaking with the scene.

Another solution would be a custom shader that has a fixed ambient light.

1 Like

Thanks for the reply! Yes, I actually need the URP Lit Shader. So it seems you cannot have “two” ambient colors in the same scene or some sort of override :(. My solution is to quickly overwrite the ambient color via a script, then render the offscreen 3D inventory items, then switch back to the default sky ambient colors during the same frame.