Channel Shader: Get total Ray Length?

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 16/11/2009 at 12:14, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   10/11 
Platform:   Windows  ;   Mac OSX  ; 
Language(s) :     C++  ;

---------
Hi,

how can I retrieve the total length of the render ray, including all reflections etc, when it hits my channel shader? I tried the following code:

  
Vector MyShader::Output(PluginShader *chn, ChannelData *cd)   
{   
     VolumeData *xvd = cd->vd;   
     if (!xvd) { return Vector(0.0); }   
  
     Real ShaderValue = xvd->dist;   
     //...   
     //...   
}   

But xvd-- >dist unly gives me the length of the ray after the last reflection. I want the sum of all reflections (if there are any).

Thanks for hints!

Cheers,
Jack

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 16/11/2009 at 16:11, xxxxxxxx wrote:

I found this in the SDK Documentation under BaseVolumeData...

Maybe this will help.?

LONG raydepth

[READ ONLY]

The depth of the actual ray.

Note: Ths value is 0 during shadow calculation.

🙂

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 17/11/2009 at 14:02, xxxxxxxx wrote:

Hm, that does not give me the total length of the resulting ray.
But thanks anyway 😉

Cheers,
Jack

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 19/11/2009 at 07:09, xxxxxxxx wrote:

Anybody?