Bump Strength

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

On 23/09/2005 at 11:55, xxxxxxxx wrote:

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

---------
Hi, does anybody know how to use the Bump Strength in C4D 9.5Her is part of my code that doesn't work
     mat->SetChannelState(CHANNEL_BUMP, TRUE);
    var Bmp = mat->GetChannel(CHANNEL_BUMP);
    var BmpBc = Bmp->GetContainer();
    BmpBc->SetData(CH_TEXTURE, BumpMap);
    BmpBc->SetData(CH_BRIGHTNESS,  0.12);   ---> Always 20% Bug???
    Bmp->SetContainer(BmpBc);  
 
Thank you.

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

On 23/09/2005 at 14:18, xxxxxxxx wrote:

It's not CH_BRIGHTNESS, it's BUMP_STRENGTH - go figure. ;)

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

On 24/09/2005 at 00:22, xxxxxxxx wrote:

I know, I've already tried:
The value of BmpInt is 1.0
I supposed the result would be 100% but it's always 20%
    mat->SetChannelState(CHANNEL_BUMP, TRUE);
    var Bmp = mat->GetChannel(CHANNEL_BUMP);
    var BmpBc = Bmp->GetContainer();
    BmpBc->SetData(CH_TEXTURE, BumpMap);
    BmpBc->SetData(BUMP_STRENGTH, BmpInt);       ---> Always 20% Bug???
    Bmp->SetContainer(BmpBc);  
 
Any Idea???

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

On 24/09/2005 at 08:54, xxxxxxxx wrote:

According to the COFFEE 9.1 docs, you can't get there from there. ;)

  
Container ID Type Explanation   
------------------------------  
CH_COLOR [vector] Color vector   
CH_BRIGHTNESS [float] Brightness   
CH_TEXTURE [string] Texture name   
CH_BLUR_OFFSET [float] Blur offset   
CH_BLUR_STRENGTH [float] Blur strength   
CH_INTERPOLATION [int] Interpolation (see dialog)   
CH_MIXMODE [int] Mix mode (see dialog)   
CH_MIXSTRENGTH [float] Mix strength   
CH_TIME_FROM [int] Movie from   
CH_TIME_TO [int] Movie to   
CH_TIME_FPS [int] Movie framerate   
CH_TIME_MODE [int] Sequence mode (see dialog)   
CH_TIME_TIMING [int] Sequence timing (see dialog)   
CH_TIME_START [BaseTime] Sequence start   
CH_TIME_END [BaseTime] Sequence end   
CH_TIME_LOOPS [int] Sequence loops   

The Container only works with these settings common to channels.

With the C++ SDK, one would use SetParameter(), but this isn't available in the COFFEE SDK. Have you tried this instead:

BmpBc- >SetFloat(BUMP_STRENGTH,BmpInt);

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

On 24/09/2005 at 09:01, xxxxxxxx wrote:

Hi again,
I found that the container was not the good one!!!
Finally, this work:
    mat->SetChannelState(CHANNEL_BUMP, TRUE);
    var Bmp = mat->GetChannel(CHANNEL_BUMP);
    var BmpBc = Bmp->GetContainer();
    BmpBc->SetData(CH_TEXTURE, BumpMap);    
    Bmp->SetContainer(BmpBc);
    var BmpIt = mat->GetContainer();
    BmpIt->SetData(MATERIAL_BUMP_STRENGTH, BmpInt); 
    mat->SetContainer(BmpIt);  
 
Thank you.
 
B->