Justin Crowell avatar image
Justin Crowell asked

Create emissive shader without casting light

High all. I have a simple setup-- buildings, where the windows should be a solid bright color. I'm using two textures with selection tags on one object: One for the building, one for the lit windows. I don't want the lit windows to cast light on the buildings, but I can't figure out how to make the lights fully bright without doing that.

Any thoughts? Any way to get the effect of an emissive texture without casting light?

10 |600

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Mads Drøschler avatar image
Mads Drøschler answered

This is fairly straight forward.

I have written a practical node you can use to stop the backfacing emission internally which can slow things down, making the emission directional based on the face you light up, Normal directions.

As seen below, you take the OSL code for the front/back map I made here, and wire it to theSwitch RGBA nodes diffuse component, where the "back" is black" and frontis whatever you want to emit. Then wire that up to the emission color slot and all is working like you want.
You can see I wire up an OSL Candy shader for the primary camera ray, and those does not conflict with the emission.

We now have a split signal ready to be designed.

You can also flip this around, so there is NO emission, and a strong light from the windows, you simply just switch the Switch RGBA inputs around.

I use 3ds max here, but you would do the exact same thing in C4D. UI just looks different, the result will be identical.


Here is the code for the OSL Front Back node.

Make a new OSL node in C4D and insert this code.

shader FrontBack
    color Front = color(1,0,0),
    color Back  = color(0,1,0),
    output color Out = 0
    if (backfacing())
    Out = Back;
    Out = Front;

And here is the reverse expression.

Full Emission color, and no bleeding, as mentioned you just swap the camera rays and leave the diffuse component untouched, this will stop emission to nearby surfaces.


qweqwe.gif (1.9 MiB)
10 |600

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Lee Griggs avatar image
Lee Griggs answered

You can also reduce indirect_diffuse to 0 for the non-emissive surfaces if you don't want them to receive the effect of the emission.


1620638264496.png (64.9 KiB)
10 |600

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Welcome to the Arnold Answers community.

This is the place for Arnold renderer users everywhere to ask and answer rendering questions, and share knowledge about using Arnold, Arnold plugins, workflows and developing tools with Arnold.

If you are a new user to Arnold Answers, please first check out our FAQ and User Guide for more information.

When posting questions, please be sure to select the appropriate Space for your Arnold plugin and include the plugin version you are using.

Please include images, scene and log files whenever possible as this helps the community answer your questions.

Instructions for generating full verbosity log files are available for MtoA, MaxtoA, C4DtoA, HtoA, KtoA, and Kick.

If you are looking for Arnold Documentation and Support please visit the Arnold Support site.

To try Arnold please visit the Arnold Trial page.

Bottom No panel present for this section.