Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python 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

    CalcVolumetric

    Scheduled Pinned Locked Moved SDK Help
    1 Posts 0 Posters 116 Views
    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 Offline
      Helper
      last edited by

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

      On 04/02/2008 at 04:32, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   9.6 10.5 
      Platform:   Windows  ;   
      Language(s) :

      ---------
      Hi,

      I need to get a depth map of my scene in CalcVolumetric on in another method during the rendering process. I know that Cinema can process this depth map but it doesn't help me since my plugin should then activate itself this multipass effect and I don't want that, and I want to use my parameters for my depth map.

      I tried first with vd->dist but in the case of a texture using displacement or transparency the results are not good enough.
      So I tried with TraceGeometry in CalcVolumetric with the following code:
      SurfaceIntersection hit;

      if (vd->TraceGeometry(vd->ray,1000000.0,NOTOK,&hit;))
      {
      LVector vec(hit.p.x-drcCurrent.camMatrix.off.x,hit.p.y-drcCurrent.camMatrix.off.y,hit.p.z-drcCurrent.camMatrix.off.z);
      dist = Len(vec);
      }
      else
      {
      dist = vd->dist;
      }

      The results are a bit better but some pixels are not correct, see the image below:

      ![](Z:\DevelopmentSoftware\Maxon\CINEMA 4D 10.5\plugins\SVI-StereoEditing\ est_Z Depth_00_0000.jpg)

      The ring has the displacement texture. Something similar is coming with transparency.

      I read that it cannot work because the ray casting is off or not working (I don't remember) with displacement.

      Well, how should I get my depth map during the rendering ?

      Thanks a lot in advance.

      Vincent

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