22
$\begingroup$

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

$\endgroup$
  • $\begingroup$ 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. $\endgroup$ – Polosson Mar 28 '14 at 1:29
  • $\begingroup$ That's probably what I want.. I don't want the emission to affect nearby objects though. $\endgroup$ – ajwood Mar 28 '14 at 17:43
19
$\begingroup$

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

$\endgroup$
  • $\begingroup$ 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. $\endgroup$ – ajwood Mar 28 '14 at 16:15
  • $\begingroup$ How do I make sure the light emitted from this object doesn't affect its surroundings? (this object should still cast shadows) $\endgroup$ – ajwood Mar 28 '14 at 16:16
  • $\begingroup$ 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. $\endgroup$ – ajwood Mar 28 '14 at 17:37
  • $\begingroup$ @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.. $\endgroup$ – gandalf3 Mar 28 '14 at 19:51
  • 2
    $\begingroup$ @ajwood Ctrl+H (or header > Node > Hide unused output sockets) $\endgroup$ – gandalf3 Mar 31 '14 at 20:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.