Community
Arnold for Cinema 4D Forum
Rendering with Arnold in CINEMA 4D using the C4DtoA plug-in.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Create emissive shader without casting light

2 REPLIES 2
Reply
Message 1 of 3
crowellster
395 Views, 2 Replies

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?

Tags (1)
Labels (1)
2 REPLIES 2
Message 2 of 3
madsd
in reply to: crowellster

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.

NOTE:
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.


qweqwe.gif

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;
    else
    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.

2021-05-08-14-18-23.gif

Message 3 of 3
lee_griggs
in reply to: crowellster

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

Lee Griggs
Arnold rendering specialist
AUTODESK

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report