Keeping objects white under colored light?

I wasn’t sure if I should put this under lighting, but I figured not since its only for one object.

If I have a white object and a colored background or light, Is there a way I can keep the white color of the object, or at least reduce the influence of the colored light on that object only?

Only in post afaik, by dividing the image with a sampled white with a color cast.
Of course, that may introduce a new color cast where you don’t want it.
And it only works on the full render since being post, not on a per object basis.
Maybe others have other solutions.

I tried a few things.
http://pasteall.org/pic/1ecf0bbf7bdcc11735f093afb8b3d1c2

In theory you could manipulate the lights to shoot a different colour ray at the object. I could only do that with Cycles’ mesh lights and I don’t know how to use the Attribute node, but it should filter your object cleanly if you figure it out.

Here’s a video showing an introduction into the ways light paths can be used.

You could use an emission shader for the object, so it emits its own light instead. Either mix that with the existing material to attenuate the colour-bleed effect, or use a pure emission shader to stop colour bleed completely.

This might cause its own effects. Then you get into fiddling with node graphs that behave differently according to different ray types, which is certainly all doable.

“Oh, what a tangled web we weave, when first we practise to fake physically impossible things…”

Yea, if you are using cycles, a lightpath based material on a mesh light (or environment light) is the way to go. It’s not too complex. This should work for you:


light trick.blend (737.6 KB)

With the camera ray attribute, any object that is directly hit by the camera (the light source itself in this case) will use the material in the second slot. You can also use this to make diffuse objects light the scene and stuff like that.

If you need this for a blender internal project, I’m not super familiar with its settings and workflows, but I’m pretty sure you can use the light linking workflow to do this stuff there.

EDIT: I assume you just don’t want the background image to influence a white foreground object’s shading, so here is a better example:


light trick2.blend (739.8 KB)

If you meant that you wanted one object in the scene to be white, while everything else is lit with the lamp’s color, then you’ll probably need to use the compositor to do that.

I’m very sorry for my late reply! This worked well, and I’m happy with the results! Thank you! :slight_smile: