# Cycles Fake Absorption Setup Explanation

I would just like to understand why in the cycles fake absorption setup he ray length have to be multiplied against the backfacing value in order to tell Cycles when the ray starts and stops. I did the BlenderDiplom tutorial and there was no explanation as to why that does what it does. I can use the fake absorption setup with no problem, I would just like to understand exactly how it works so I can use it knowing exactly what it is doing.

• What context is this node used in? What would you plug the color output into? – PGmath Aug 25 '15 at 21:47
• @PGmath I think it can only really be used with a glass, translucent, or transparent shader. As for context, I'm sorry I have none. I have been using this with a translucent shader, but I would like an explanation for all three shaders if they are different. According to gandalf3, "it only allows you to control the shading of backfaces", so I think it is doing the same in all three shaders but I really have no idea. – Wyvernul Aug 25 '15 at 21:56
• Ahh, that's what I guessed, I'm working on writing an explanation for you now. – PGmath Aug 25 '15 at 21:58

The backfacing output gives 1 if the ray is hitting the side opposite the normal (the "front" of the face), and 0 if the ray is hitting the side with the normal (the "front" of the face). So the output of the first multiply node (from the left) will be ray_length * 1 = ray_length if the ray is hitting the backside of a face (meaning it is inside the object) and ray_length * 0 = 0 when the ray is hitting the front of a face (meaning it is outside of the object).
• @Wyvernul ray_length is the distance since the last surface/volume calculation (i.e. it resets to 0 every time it interacts with a shader). – PGmath Aug 26 '15 at 0:56