Render depthmap with RhinoCommon in C#

Hello,
I’m trying to figure how to render the depth map like we can do manually in rhino through the selection of the depth channel in the render windows.
I guess that : RenderWindow.StandardChannels Enumeration
can be used with
AddChannel Method to set the Depth channel in the rendering.

Rhino.Render.RenderWindow.AddChannel(StandardChannels.DistanceFromCamera);

But I have no Idea how to make it work.
Do I need RDK ?

@andy is this something you can help with?

Since RhinoCommon can be control through python, the solution in Python is OK.

I moved to the C++ SDK since I’m a bit more comfortable with C++.
I’m searching the good method but there is lots of Class related with rendering :

IRhRdkRender :
CRhinoRenderPlugIn
CRhinoSdkRender class
CRhRdkSdkRender class
I just want acces to the Depth chanel by script do I need to use the SDK for rendering ? or RdkSDK I’m a bit confuse with all this variation.
If it’s already in rihno I shouldn’t need to create a spcific render plug in?
With the wizard I’ve try to create a render plugin. It works but the building phase fail.