Using Blender's Light Path Node for Cycles

CG Cookie – Learn Blender · 54K views · 2013 · 32:55

Open on YouTube

Computer graphics & renderingAnimation & visual effectstutorialdated

Why Blender Stack Exchange recommends it

Blender Stack Exchange users link it when someone needs to understand the Light Path node, especially for making materials behave differently for camera, reflection or shadow rays.

Recommended by 2 people across 2 different months, 2015 to 2023.

What it is

A 33-minute CG Cookie tutorial on Blender's Light Path node in Cycles, recorded in an older Blender version. It starts with a basic introduction to raytracing, then shows how to change an object's color in reflections, shadows or refraction, and how to hide objects from specific ray types.

What people said

Recommends uhoh · 2015-10 · Blender Stack Exchange · on “Need to understand how to show reflected light well with cycles”

I want to show light reflected from a flat, mirror-like surface onto a diffuse surface. I noticed that even when everything else looks good, the light reflected from the mirror is 100% fireflies. When the roughness is increased a bit, they smooth out quickly to what I would expect. NOTE: mirror is flat - this is not a caustic [LINK] issue. However, that is the direction I'm going next. Also, I'd like to see how well Blender can do - "just use another rendering program" is not helpful here. Is there a concise yet accurate way to explain why this happens? I'd like to understand as much as possible. Is there some particular setting (beyond just "Samples") that I can use to improve the reflected

Recommends user1853 · 2016-07 · Blender Stack Exchange · on “What can a custom cycles shader do?”

There is a node for tight path. Using the many different options from it you can combine different shaders to do wonderful things. Watch Bartek Skorupa's video [this video]

Cites user13877 · 2017-03 · Blender Stack Exchange · on “Light Path Node and Mix Shader”

I am watching this tutorial on Light Path Nodes [this video] and in the image below the Light Path node is connected to a Mix Shader. [LINK] When connecting the "Camera Ray" socket to the Mix Shader the lower Shader is selected as being the Camera Ray. Why is this ? Why is not the other Shader selected ?

Cites Robin Betts · 2018-08 · Blender Stack Exchange · on “Is it possible to have an object ignore a certain light source but still be affected by others?”

This way is more about having a light ignore the object, than having the object ignore the light. If you're prepared to use OSL and CPU rendering, (which may slow things down too much for you), you can use this little OSL script in a lamp's shader, which returns the index of the object it's lighting directly, for each ray sample. #include "stdosl.h" shader LitObjectIDX( output float ObjectIdx = 0.0 ) { if (trace(P,I)){ getmessage("trace", "object:index", ObjectIdx); } } In the Render panel, enable CPU rendering, and OSL. In the Properties > Object > Relations panel, assign a Pass Index to the objects you're interested in discriminating. In this example, there are two cubes - the one on the l

Cites vklidu · 2023-01 · Blender Stack Exchange · on “How to perform separate light pass for each material”

I don't think there is an other way than your second link (that I was able to think of too). On shader level you can work with Light Path node [this video] to affect specific parts ... to operation pass level it doesn't sound like a good option since you will change material reflection, indirects or what ever at the same time, but since these pixels are contaminated a result would looks weird.

Cites vklidu · 2023-02 · Blender Stack Exchange · on “Possible to make a material that shows negative version of whatever's on the other side?”

With Lightpath node [this video] you can change color to be seen through glass, but I don't think you can get completely negative result... or you can try a **negative light** [LINK] combine with this trick [LINK] ... if it does something ... I don't have a time to test it now ... but I guess +1 to moonboots for Compositor would be the fastest way ...