Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Get all Ray-Intersections

    SDK Help
    0
    3
    173
    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
      Helper
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          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

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