Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Recent
    • Tags
    • Users
    • Login

    Channel Shader: Get total Ray Length?

    Scheduled Pinned Locked Moved SDK Help
    4 Posts 0 Posters 378 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        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.

        🙂

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          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

          1 Reply Last reply Reply Quote 0
          • H Offline
            Helper
            last edited by

            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?

            1 Reply Last reply Reply Quote 0
            • First post
              Last post