Creating Spheres



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

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

    This is what I tried.. and I still get nothing in the TEXTURE field of the Color Channel.

    atmosphereMat->SetParameter(MATERIAL_COLOR_SHADER,GeData(Xfresnel),NULL);

    Any other thoughts?

    Thanks a lot for your help. :)

    ~Shawn



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

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

    No, I think it will need to be an actual allocated shader:

    PluginShader* shader = PluginShader::Alloc(Xfresnel);

    Also, there is another way from c4d_basechannel using HandleShaderPopup(). No experience with it though.



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

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

    I will try it out and let you know.

    Thanks again Robert.

    ~Shawn



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

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

    declared with ...

    PluginShader* fresnel = PluginShader::Alloc(Xfresnel);

    then used ...

    atmosphereMat->SetParameter(MATERIAL_COLOR_SHADER,GeData(fresnel),NULL);

    and got this error..

    c:\users he fosters\desktop\cinema4dr11010\plugins\#planet\source\object\planet.cpp(318) : error C2440: '<function-style-cast>' : cannot convert from 'PluginShader *' to 'GeData'
    2>        No constructor could take the source type, or constructor overload resolution was ambiguous



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

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

    You might want to try going through the BaseContainer then:

    atmosphereMat->GetDataInstance()->SetLink(MATERIAL_COLOR_SHADER, fresnel);

    GeData() can't handle general pointers (only BaseLink* ).



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

    On 13/11/2009 at 17:11, xxxxxxxx wrote:

    hmmm... well it comiles fine but still nothing shows up in the texture field.... that stinks.

    ~Shawn



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

    On 13/11/2009 at 17:49, xxxxxxxx wrote:

    I think you may be stuck with HandleShaderPopup() then. I couldn't find anything here, in the docs, or in the cinema4dsdk that describes how to set a channel shader.

    It is also possible that you need to insert the shader into the material:

    atmosphereMat->InsertShader(fresnel, NULL);

    Then try to set the link. Again, I don't see any examples or more explicit information on this.



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

    On 13/11/2009 at 17:53, xxxxxxxx wrote:

    atmosphereMat->InsertShader(fresnel, NULL);

    that worked,,    WOO HOO!    Now I jus tneed to figure out how to change the colors in the shader..   LOL...

    Thanks a million Robert.

    ~Shawn



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

    On 13/11/2009 at 19:54, xxxxxxxx wrote:

    LOL.. okay so after a few hours of searching a trying, I am at somewhat of a loss again..   How would I change the color of the knots that are in the fresnel shader?

    ~Shawn



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

    On 13/11/2009 at 20:38, xxxxxxxx wrote:

    Here's what I have so far..   This inserts the fresnel shader in to the material for both the color channel and the transparency channel.   And with the current code it completely removes the color knots from the gradient in both fresnel shaders. So I feel like I'm on the right track.. any help would be greatly appreciated. :)

      
              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);   
      
    


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

    On 15/11/2009 at 07:25, xxxxxxxx wrote:

    Does anyone know how I would add color knots to the gradient in the fresnel shader that I have added with the above code?

    Thanks,

    ~Shawn


Log in to reply