THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/09/2004 at 07:47, xxxxxxxx wrote:
Cinema 4D Version: 8.503
Platform: Windows ; Mac ; Mac OSX ;
Language(s) : C++ ;
No matter how I setup a bitmap or the RenderDocument flags it will not render an alpha to the bitmap ( the bitmap does have an alpha and does show up when I open the bitmap I rendered to and saved in PS ). This is an issue for us. Help!?
On 24/09/2004 at 22:05, xxxxxxxx wrote:
Could really benefit from a solution here. This is a production issue. RUnning out of time.
On 25/09/2004 at 01:26, xxxxxxxx wrote:
Sorry for the delay. I have already verified that
Bool straight = FALSE;
BaseContainer rdata = doc->GetActiveRenderData()->GetData();
RenderDocument(doc, rdata, NULL, NULL, bmp, 0, NULL);
doesn't seem to be enough to render an alpha channel. The question also arises if it's possible to render other multipass channels with RenderDocument(). I'll get back to you when I get a response from the developers.
On 26/09/2004 at 00:08, xxxxxxxx wrote:
Alphas and Multipass channels are automatically added by C4D, but also destroyed after the rendering is finished if no B3dBitmap was passed. Unfortunately the B3dBitmap (which is derived from BaseBitmap) cannot be accessed / created by the SDK yet. (For urgent needs and as a hack it should be possible to access the buffers in the Videopost though. Just inject your own custom Videopost and catch the buffers at the end.)
On 26/09/2004 at 07:15, xxxxxxxx wrote:
So I have caught the buffers. I don't understand what to do with them. Write them myself? Sorry, just don't understand the idea.
On 27/06/2006 at 03:06, xxxxxxxx wrote:
The idea is to create a VideoPostData that uses for example Execute() at vp==VP_FRAME/open==FALSE, then look at vps->render->GetBuffer(VPBUFFER_xxx) to access the multipass buffers during the rendering. This is an example of doing this in vpcolorize.cpp (Execute() function) :
if (vps->vp == VP_FRAME && !vps->open)
VPBuffer* buf = vps->render->GetBuffer(VPBUFFER_RGBA, 0);
MultipassBitmap* mpb = reinterpret_cast<MultipassBitmap*>(buf);
MultipassBitmap* alpha = mpb->GetAlphaLayerNum(0);
alpha->Save(GeGetStartupPath() + "alpha.b3d", FILTER_B3D, NULL, 0);