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

    Fresnel Shader in the Color Channel

    Scheduled Pinned Locked Moved SDK Help
    4 Posts 0 Posters 340 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 13/11/2009 at 15:37, xxxxxxxx wrote:

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

      ---------
      So I have created materials and objects in the plugin that I am working on.   I would like to add the fresnel shader to the COLOR channel and change the colors within that fresnel shader.   Can someone explain to me how this is done?

      I have been using :

      SetParameter() to set the Color Channel's parameters but the parameter for the color channel that houses the fresnel shader is...

      SetParameter(MATERIAL_COLOR_SHADER,?,NULL);

      I am not sure what to put for the ? argument..   or if this is even the correct course of action.

      Please any help would be greatly appreciated.

      Thanks,

      ~Shawn

      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 05:29, xxxxxxxx wrote:

        I solved this problem with :

          
          
                  atmosphereMat->InsertShader(fresnelColor, NULL);   
          
                  atmosphereMat->InsertShader(fresnelTrans, NULL);   
          
                  atmosphereMat->GetDataInstance()->SetLink(MATERIAL_COLOR_SHADER, fresnelColor);   
          
                  atmosphereMat->GetDataInstance()->SetLink(MATERIAL_TRANSPARENCY_SHADER, fresnelTrans);   
          
                  fresnelColor->SetParameter(SLA_FRESNEL_GRADIENT,ATMOSPHERIC_COLOR, 0);   
          
                  fresnelTrans->SetParameter(SLA_FRESNEL_GRADIENT,Vector (0,0,0), 1);   
          
        

        Now I need to insert color knots into the gradient of the fresnel shader and change their color?

        Any idea how to do this?

        Thanks,

        ~Shawn

        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 05:29, xxxxxxxx wrote:

          The Fresnel shader's colors are actually knots of a gradient. They are part of the GradientCustomGui custom GUI and can be accessed through the Gradient custom data type. Please have a look at the GradientShader.cpp SDK example.

          cheers,
          Matthias

          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 05:31, xxxxxxxx wrote:

            Thanks Matthias, I will look into that

            ~Shawn

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