Get all Ray-Intersections



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

    On 09/11/2004 at 06:21, xxxxxxxx wrote:

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

    ---------
    Hi

    I am working on a shader. For a given shading-point i need a list of all ray-intersctions between the shading-point and the camera.
    First i thought the VolumeData would provide the data for the ray that caused the call of the output-function, but i was wrong.
    The only solution seems to be the TraceGeometry-function of the VolumeData. But this means shooting a ray, that has already been shot by the raytracer itself. The raytracer needs to compute those intersections, and my shader would compute them again?
    Ok, let's say i accept this additional computations and i use traceGeometry.
    TraceGeometry seems to return only one intersection, not all intersections. And from the description in the SDK i can not say which intersections this would be. The first one i would guess!?
    I would have to uses the function several times, until i found all intersections between the shading-point and the camera.
    Does anyone know a better solution?

    Thanks
    Chris



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

    On 10/11/2004 at 06:46, xxxxxxxx wrote:

    Hi Christian,
    vd->p only gives you the first ray intersection IF that position needs to be calculated by the shader. The shader is not called for positions where the surface is covered by another material.
    So you have to send out rays by yourself. Trace Geometry only gives you one intersection at a time (the first one on the ray). So you have to generate a chain of rays to find all intersections.



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

    On 11/11/2004 at 03:31, xxxxxxxx wrote:

    Hi

    Thank you Arndt, that's what i thought.
    Started implementing it that way.

    cu
    chris


Log in to reply