Preventing emission from constant shader from lighting other objects

   2517   2   0
User Avatar
Member
125 posts
Joined: April 2014
Offline
I am doing some renders with image based UV mapping so that I can remap the texture in AfterEffects using http://revisionfx.com/products/remap/ [revisionfx.com]

Using the constant shader I am able to output a direct_emission channel which I can use in AE. However this shader also puts light into the scene from the emission. The Principle shader has a button option for the emission to not affect other objects, but the constant shader does not.

At this point I am not savvy or time gifted enough to dig into the shader and figure out the difference. And it seems that I was unable to get an acceptable channel out of the Principle shader for this use which is why I ended up using the constant shader.


Is it possible to remove the emissive aspect of the constant shader and still generate a useful channel that represents the constant / unlit texture that I can use for the UV in AE?

Or would I be better off with an entirely different approach? Like?

Any suggestions much appreciated
J

ps I am aware that I could isolate these elements into an entirely different pass with Matte objects and all but I was hoping to keep as much a I can in a single file(exr) for simplicity sake.
Edited by jeffMc - Feb. 19, 2018 17:37:43
User Avatar
Member
7737 posts
Joined: Sept. 2011
Online
There are several different ways, of varying convenience/complexity/impact on result.

The most explicit way is to modify the emissive shader with a ray switch, such that the emission is only non-zero when raylevel is 0, this is the method employed by the principled shader. There is a ‘raylevel’ vop that returns the current bounce level in which the shader is evaluated. If coding is more your thing, the inline and snippet nodes can use the getraylevel() function to switch the behavior.

Another is to add the render property “emission illuminates objects” (vm_emitillum) I'm not certain of the efficacy of this property.

A more indirect approach would be to exclude the emissive object from the other objects in your scene's reflection and refraction masks. This tells the objects not to gather from the emissive one (or any other object excluded in this way.) The syntax for exclude is ^objectname, so to reflect all but the emitter put ‘* ^glowyobjectname’

The laziest way is to set reflect/refract/diffuse level to 0 on the render node, but this will change the appearance of the image by removing all reflections/light bounces.
User Avatar
Member
125 posts
Joined: April 2014
Offline
thanks Jsmack, as always you are a great source of help. I appreciate the multiple descriptions.
  • Quick Links