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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    COF volumetric shader: refraction

    SDK Help
    0
    6
    619
    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
      Helper
      last edited by

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

      On 09/06/2003 at 22:41, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   8.100 
      Platform:    Mac  ;  
      Language(s) :   C.O.F.F.E.E  ;

      ---------
      If I would like to implement refraction in an volumetric shader, do I have to calculate the refracted/reflected ray in the shader myself?

      Thanks & Cheers

      Kabe

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

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

        On 10/06/2003 at 22:24, xxxxxxxx wrote:

        Funny - I think this is related to another question I asked before (about tracegeometry) :

        var id,p,n;
        var ray = new(Ray);

        ray->p = vector(0.0);
        ray->v = vector(1.0,0.0,0.0); // ray travels from world origin along the X axis
        ray->pp0 = ray->pp1 = ray->pp2 = ray->p;
        ray->vv0 = ray->vv1 = ray->vv2 = ray->v; // fill mip variables
        ray->ior = 1.0; // refraction index for air

        id = TraceGeometry(ray,&p;,&n;,0);

        So you can define your own IOR for refraction - but TraceGeometry (defined in VolumeData) is wrong documentated - coffee says you need 5 variables and not only 4... happy guessing (at least in R7)...

        Well but the rayclass would implement the ior you have asked for. I guess that if you can access the ray that have "shot" you in the point, you can change its IOR and c4d would do the rest... but I am only guessing...

        cu

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

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

          On 11/06/2003 at 03:20, xxxxxxxx wrote:

          Hi,
          yes TraceGeometry is wrong documented. The missing paramter is a distance paramter that afai can see defines the maximum ray traveling distance.
          The TraceGeometry call should therefore i.e. look like this:

              
              
              vd->TraceGeometry(ray,100000000,min,&p,&n);
          

          Have fun both of you! Hope that helps...

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

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

            On 15/06/2003 at 09:24, xxxxxxxx wrote:

            Well, interesting sidenotes about TraceGeometry (Thanks, Samir!)

            However, I was thinking about something different:

            To implement refraction, can I jsut set Ray->IOR to the new value and Cinema takes care about calculating the ligh bending?

            Or do I have to manipulate the transmitting ray myself?

            Thanks for any insight!

            Kabe

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

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

              On 26/10/2011 at 09:13, xxxxxxxx wrote:

              Originally posted by xxxxxxxx

              Hi,

              yes TraceGeometry is wrong documented. The missing paramter is a distance paramter that afai can see defines the maximum ray traveling distance.

              The TraceGeometry call should therefore i.e. look like this:

              [PRE]vd->TraceGeometry(ray,100000000,min,&p;,&n;);[/PRE]
              

              Have fun both of you! Hope that helps...

              It seems like it is still wrong documented even in the R13 C.O.F.F.E.E. SDK documentation!

              I hope it'll get fixed one day.

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

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

                On 27/10/2011 at 03:55, xxxxxxxx wrote:

                OK, I take note of this missing information in the C.O.F.F.E.E. docs.

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