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

    volumetric shader: refraction

    Scheduled Pinned Locked Moved SDK Help
    6 Posts 0 Posters 499 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 08/06/2007 at 05:31, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   10 
      Platform:      
      Language(s) :     C++  ;

      ---------
      Hi,

      I have similar question to this one, but not in the C.O.F.F.E.E.

      I would like to implement refraction to my volumetric shader plugin, but i have no clue how to do this.

      In my VolumeData Obiect vd I have obiects like
      vd->trans
      vd->ray->v
      vd->ray->ior
      vd->rray->p
      vd->rray->ior

      but i don't know how to mix them together.

      All i need is to implement IOR for refraction.

      I'll be apriciate for any help.

      Cheers
      Bart

      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 08/06/2007 at 08:34, xxxxxxxx wrote:

        Generally you need to implement and calculate your own refraction algorithm for volumetric shaders.

        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 08/06/2007 at 08:52, xxxxxxxx wrote:

          Even if i only want to change IOR?

          Could you give me some clue how to operate on ray vectors?
          In SDK there is nothing about it.

          And what for i have this:
          vd->ray->ior

          😉 I know that might be sily questions, but simply i don't know how to start.

          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 08/06/2007 at 12:11, xxxxxxxx wrote:

            Hi,

            vd->ray->ior is the refraction index, but changing this won´t change the transparency ray. So you must modify vd->ray->tray in your volumetric function.

            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 08/06/2007 at 13:46, xxxxxxxx wrote:

              hm....

              when i want to change alpha channel, all i have to do is:

              Vector ret_val = shader->Sample(&cd;);   
              vd->alpha = ret_val.x;
              

              and it's work fine

              then, when i want to change the bump channel:

              ret_bump = shaderBump->SampleBump(&cd;,SAMPLEBUMP_MIPFALLOFF);  
              vd->bumpn += (ret_bump*bumpStrength);
              

              and it's work too

              but when i want to change transparency, like this:

              Vector ret_val = shader->Sample(&cd;);   
              vd->trans = ret_val;  
              vd->tray->ior = 1.2;
              

              it's wrong.

              why this isn't so simple? 😉

              how to implement transparency channel?

              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 09/06/2007 at 07:51, xxxxxxxx wrote:

                Hey,

                anybody 😉 please give me some clue how to manipulate transparency and refraction ray. I'm writing master of scient research about ability of makeing volumetric shaders in 3d enviroments like cinema, and all i want to do is to create simple thing (like opaque obiect with parametric index of refraction level - based on volumetric shader) and write sth about it.

                i would be appriciate for any example

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