TraceColor and Reflections



  • On 19/08/2013 at 09:15, xxxxxxxx wrote:

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

    ---------
    Hy there,

    I use TraceColor within a shader to trace reflections. This works fine, as long as there are shaders involved, but it does not work for example to get the colors from a reflecting material (reflection channel used).

    So, if I can't determine the reflections with TraceColor, is there another way to do this? Is there another function for reflections? Or do I need to set certain flags to get the correct behavior?

    If there is no such function, is there a way to figure out the material settings of the point hit by TraceColor, so I can send out the next ray "manually"? Somehow I can't imagine I need to do that manually, as Cinema for sure has a way to trace reflections...

    Thank you,
    maxx



  • On 28/08/2013 at 07:38, xxxxxxxx wrote:

    Howdy,

    Well, it appears that no one knows. 

    Adios,
    Cactus Dan



  • On 28/08/2013 at 07:56, xxxxxxxx wrote:

    ...at least there are now two replies and some movement in the thread 😄

    Cheers,
    maxx



  • On 02/09/2013 at 04:11, xxxxxxxx wrote:

    Did you have a look at GetSurfaceData()? SurfaceData contains things like reflection color and the reflected ray.



  • On 02/09/2013 at 09:55, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    Did you have a look at GetSurfaceData()? SurfaceData contains things like reflection color and the reflected ray.

    Thanks for the tip! I really missed this...

    With the reflection amount in the SurfaceData, I have the information I need.

    Cheers,
    maxx



  • On 02/09/2013 at 15:38, xxxxxxxx wrote:

    I found the problem! The ray used for the TraceColor needs its transport vector set to 1... easy, if you know...

    Cheers,
    maxx


Log in to reply