THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 26/09/2003 at 06:32, xxxxxxxx wrote:
Cinema 4D Version: 8.207
Platform: Windows ; Mac OSX ;
Language(s) : C++ ;
I want to write a depth channel into a file. I'm trying to do this in a VideoPost plugin, but all the depths are coming out the same.
As a test I tried saving the depth multipass channel from the user interface and that came out with all pixels the same.
Here's what I'm doing:
void EpixWriterData::AllocateBuffers(PluginVideoPost *node, Render *render, BaseDocument * )
render->AllocateBuffer(VPBUFFER_DEPTH, 0, 32, FALSE);
LONG EpixWriterData::Execute(PluginVideoPost *node, VideoPostStruct *vps)
if (vps->vp==VP_INNER && !vps->open)
VPBuffer *depth=vps->render->GetBuffer(VPBUFFER_DEPTH, 0);
depth->GetLine(0, 0, wd, depthline, 32, false);
Should this work, or do I need to do this in ExecuteLine or ExecutePixel?
On 02/10/2003 at 05:41, xxxxxxxx wrote:
I think you need to set the front and back distance in the camera object.
On 02/10/2003 at 06:02, xxxxxxxx wrote:
When should I set these values, and how do I find the correct values to set?
As a VideoPost plugin I have no direct knowledge of the extent of the scene, and the camera is managing to do the visibility analysis correctly so I would have thought it already new the front and back depths.
On 12/10/2003 at 02:17, xxxxxxxx wrote:
That is up to the user then. Users will be used to having to set this information for correct depth maps. (But you should probably write it in your plugin documentation as well.)