31

I'm trying to make a material node setup to set final render colors, regardless of lighting conditions. Is such a setup possible?

iKlsR
  • 43,379
  • 12
  • 156
  • 189
ajwood
  • 10,063
  • 11
  • 60
  • 112
  • Not sure to understand well your question... If you want to render an object with an image texture applied, which is not affected by lighting, you can try with a simple "emission" shader with value of 1. – Polosson Mar 28 '14 at 01:29
  • That's probably what I want.. I don't want the emission to affect nearby objects though. – ajwood Mar 28 '14 at 17:43

3 Answers3

29

I assume you mean a "shadeless" shader:

enter image description here

To create this you can use the Light Path node to make an emission shader which is visible only to the camera, letting other rays straight through with a transparent shader:

enter image description here

Casting shadows:

With a diffuse shader (or a holdout shader, black transparent shader, etc. anything that will cast a shadow and render fast) used instead of the white transparent shader:

enter image description here

You'll notice that there is some indirect lighting (in this case it's a slight orange tint to the shadow, because I made the diffuse shader orange)

enter image description here

If you don't want that orange tint, you can either:

  • Disable it per object by disabling Diffuse in Properties > Object > Ray visibility:

    enter image description here

  • Disable it per material with the light path node:

    enter image description here

Result:

enter image description here

gandalf3
  • 157,169
  • 58
  • 601
  • 1,133
  • I think you took care of my "unaffected by lighting" by using the emission node, so the transparency shouldn't be necessary. In your example, I really just wanted to make sure that lamps around the scene make bright orange on some parts of the object, and dark orange on others. – ajwood Mar 28 '14 at 16:15
  • How do I make sure the light emitted from this object doesn't affect its surroundings? (this object should still cast shadows) – ajwood Mar 28 '14 at 16:16
  • Oops! In my first comment, I meant that there shouldn't be some dark and some light orange... orange should be orange I'd like to make many different colours though, based on textures; I just don't want the final rendered shade to be influenced by lamps. – ajwood Mar 28 '14 at 17:37
  • @ajwood In that case, use a diffuse shader instead of a transparent shader. Note that there will be some indirect lighting from the diffuse shader if you use that. If you really don't what the indirect lighting, there are some workarounds.. – gandalf3 Mar 28 '14 at 19:51
  • In the interest of learning, what kind of workarounds would there be to get rid of the indirect lighting? – ajwood Mar 29 '14 at 18:03
  • @ajwood I have updated my answer. – gandalf3 Mar 30 '14 at 23:31
  • That's great, thanks! I'm curious.. how did you hide the unused output sockets of the light path node in your screenshot? – ajwood Mar 31 '14 at 17:30
  • 2
    @ajwood Ctrl+H (or header > Node > Hide unused output sockets) – gandalf3 Mar 31 '14 at 20:42
4

Update:

In addition to Gandalf's answer above, I noticed that my white emissions shaders in Blender 2.8 using Eevee render engine were not completely white. I set the color to #FFFFFF and they still looked a little grey. The reason for this is that the Color Management is set to Filmic by default. For emission materials to render in the exact color they emit (from scene backgrounds to individual objects), you must change the color management to Standard:

Standard Color Blender

Hopefully this helps some people who want to integrate 3D Blender graphics into a presentation with a perfect white background template (anything less than white would show a noticeable line).

Hackstaar
  • 141
  • 2
2

When you import images as planes, they acquire a fully-fledged material, preset according to options which open up in the source file window.. like this, in Blender 3.61:

enter image description here

The indicated option will result in a surface which does not respond to environmental light. It's a bit more sophisticated than an Emission (explicit or directly connected):

enter image description here

It employs the group IAP_SHADELESS , shown below:

enter image description here

.. which, as far as I can reverse-engineer, is made that way so as not to respond to external lighting or shadows, while also not illuminating its surroundings, in Cycles.

Robin Betts
  • 76,260
  • 8
  • 77
  • 190