Associating extra information to a ray in Cycles
Simple Answere

This is not possible without changing the code of Cycles. ;)

More Detailed

While rendering, there is no data stored about the individual rays, only until the current sampling function returns. There are multiple images – passes – stored and are kept and accessible, but storing data for every ray would need hundreds of gigabytes for large renders. Reading such amount of data would most probably be slower than rendering.

By touching the source of Cycles you could average out additional information about rays into new passes, like the number of bounces or total ray length. This is what other renderers do probably.

Emulating Multilighting

LuxRender allows to create light-groups. The lighting of those groups can be changed later, their color or intensity to be precise.

This behaviour can be achieved in Blender by separating your light-groups onto layers and creating a separate render layer for each group.

In the compositor you could mix these without rendering. Rendering each layer again in the compositor would be easy with the designated button.

Example Scene



Compositor Setup



The pass of the lamps are multiplied with (2, 2, 2) and (0.5, 0.5, 0.5) colors. The same result is achieved when the strength of lamps are changed to 200 and 50 from 100:



Emulating Bounce Count Pass

You would have to create multiple renders with the limit of total bounces increased on each render. Subtracting those from each other one would get the amount of contribution a given bounce provides.

You could multiply 0, 1, 2, etc with the related contributions and sum those. Dividing the result with the sum of the contributions – the last render – would result in the contribution weighted bounce count average.

You could use the bigger than node to get where each bounce contributed at least a little and multiply them with the related 0, 1, 2, etc and get the maximum of those. This would result the maximum bounce count for each pixel.

Bouce Count Setup