Dear Blender developers, I present you a very small patch for Cycles to be able to output the length of the ray being shaded in the LightPath node, it doesn't add any extra computation, is very simple no intrusive, making possible to create volume absorption dependent shaders, like glass absorption based on the distance the ray traveled inside the surface, or using the transmission path of the translucent shader to create a very fake sss effect like frozen ice shaders and others. very useful for use in combination with transmission light path.
I attached an screenshot but for more information about uses cases and illustrative screenshot you can visit my Blog entry about it:
http://agus3d.blogspot.com.ar/2012/05/blender-cycles-ray-length-node-output.htmlYou can find there a .blend file with the usage examples.
Patch against rev. 46120
Thanks for your attention.
Agus.