#include <c4d_videopostdata.h>
A data class for creating video post plugins.
In a video post hook it is possible to do just everything, not just the image processing that the name implies.
It is possible to prepare information for shaders, modify image buffers, initialize hardware, output an image to an image recorder etc.
Use RegisterVideoPostPlugin() to register a video post plugin.
Execute | |
virtual RENDERRESULT | Execute (BaseVideoPost *node, VideoPostStruct *vps) |
virtual void | ExecuteLine (BaseVideoPost *node, PixelPost *pp) |
virtual void | ExecutePixel (BaseVideoPost *node, PixelPost *pp, Int32 x, Int32 subx, Int32 suby) |
Physical | |
virtual Vector | ComputeDiffuseGI (BaseVideoPost *node, VolumeData *vd, Float receive_strength) |
virtual Vector | ComputeDiffuseCaustic (BaseVideoPost *node, VolumeData *vd, Float sampleradius, Int32 accuracy) |
virtual Vector | ComputeVolumeCaustic (BaseVideoPost *node, const Vector64 &p, Int32 cpu_index) |
virtual void | CreateRay (Ray *dst, Float x, Float y) |
virtual void | CreateExtendedRay (Ray *dst, Float x, Float y, Float lensx, Float lensy, Float time) |
Stereo | |
virtual Int32 | StereoGetCameraCountEditor (BaseVideoPost *node, BaseDocument *doc, BaseDraw *bd) |
virtual Int32 | StereoGetCameraCountRenderer (BaseVideoPost *node, BaseDocument *doc, RenderData *rd) |
virtual Bool | StereoGetCameraInfo (BaseVideoPost *node, BaseDocument *doc, BaseDraw *bd, RenderData *rd, Int32 index, StereoCameraInfo &info) |
virtual Int32 | StereoGetSceneHookID (BaseVideoPost *node) |
virtual Bool | StereoMergeImages (BaseVideoPost *node, BaseBitmap *dest, const BaseBitmap *const *source, Int32 cnt, const BaseContainer &settings, COLORSPACETRANSFORMATION transform) |
Team Render/NET | |
virtual Bool | NetFrameInit (BaseVideoPost *node, BaseDocument *doc, RenderJob *job, Int32 assignedClients, const NetRenderData *renderData, MultipassBitmap *frameBmp, BaseThread *bt, Int32 &realdepth) |
virtual void | NetFrameFree (BaseVideoPost *node) |
virtual Bool | NetFrameMessage (BaseVideoPost *node, const C4DUuid &remoteUuid, const NetRenderBuffer &data, NetRenderBuffer *result) |
virtual Bool | NetCreateBuffer (BaseVideoPost *node, VideoPostStruct *vps, Int32 x, Int32 y, Int32 sizex, Int32 sizey, Int32 &id, Int32 &subid) |
Additional Inherited Members | |
Protected Attributes inherited from NodeData | |
GeListNode * | private_link |
|
virtual |
Not used!
|
virtual |
Called to request additional buffers to process.
One buffer is always there: VPBUFFER_RGBA, it is the RGB image.
Either the user (on the Multipass tab) or a video post plugin now can request more buffers (like VPBUFFER_DIFFUSE, which is the Diffuse Multipass layer) with any color resolution (8 bit, 16 bit or 32 bit for each channel).
For example:
[in] | node | The BaseVideoPost connected with the VideoPostData instance. Equal to static_cast <BaseVideoPost*>Get(). Provided for speed and convenience. Cinema 4D owns the pointed video post. |
[in,out] | render | The Render class to use to allocate additional buffers. The caller owns the pointed render. |
[in] | doc | The active document. The caller owns the pointed document. |
|
virtual |
Called to get information about the video post.
[in] | node | The BaseVideoPost connected with the VideoPostData instance. Equal to static_cast <BaseVideoPost*>Get(). Provided for speed and convenience. Cinema 4D owns the pointed video post. |
|
virtual |
Called for all video post entry and exit points: VIDEOPOSTCALL
The calling sequence is:
VIDEOPOSTCALL::FRAMESEQUENCE - open==true - Series of images starts. - <Sequence>
VIDEOPOSTCALL::FRAME - open==true - Image render starts. - <Frame>
VIDEOPOSTCALL::SUBFRAME - open==true - Sub-frame starts. - <Sub-frame>
VIDEOPOSTCALL::RENDER - open==true - Render precalculation. VolumeData not yet completely accessible.
VIDEOPOSTCALL::INNER - open==true - Render precalculation.
/@ref ExecutePixel() During rendering.
VIDEOPOSTCALL::INNER - open==false - Immediately after rendering.
VIDEOPOSTCALL::RENDER - open==false - Immediately after shader cleanup. VolumeData no longer accessible!
VIDEOPOSTCALL::SUBFRAME - open==false - Sub-frame rendering done. - </Sub-frame>
VIDEOPOSTCALL::FRAME - open==false - Frame rendering done. - </Frame>
VIDEOPOSTCALL::FRAMESEQUENCE - open==false - Complete rendering process finished. - </Sequence>
The order of calls is guaranteed, and every opening call is matched by a corresponding closing call.
VIDEOPOSTCALL::RENDER is opened immediately before shader initialization, and VIDEOPOSTCALL::INNER immediately before rendering.
Multiple sub-frames are rendered if scene motion blur or field rendering is used. In this case the number of subframes/fields is available in VideoPostStruct::subframe_cnt and VideoPostStruct::field_cnt.
Most of the times only the VIDEOPOSTCALL::RENDER and VIDEOPOSTCALL::INNER calls are of interest. In this case Execute would look like this:
[in] | node | The BaseVideoPost connected with the VideoPostData instance. Equal to static_cast <BaseVideoPost*>Get(). Provided for speed and convenience. Cinema 4D owns the pointed video post. |
[in] | vps | The video post information. The caller owns the pointed video post struct. |
|
virtual |
Called after each rendered line.
[in] | node | The BaseVideoPost connected with the VideoPostData instance. Equal to static_cast <BaseVideoPost*>Get(). Provided for speed and convenience. Cinema 4D owns the pointed video post. |
[in] | pp | The pixel buffer. The caller owns the pointed buffer. |
|
virtual |
Called for every sub-fragment (sub-pixel) that is rendered.
[in] | node | The BaseVideoPost connected with the VideoPostData instance. Equal to static_cast <BaseVideoPost*>Get(). Provided for speed and convenience. Cinema 4D owns the pointed video post. |
[in] | pp | The pixel buffer. The caller owns the pointed buffer. |
[in] | x | The main pixel X position. |
[in] | subx | The sub-pixel X position. (0 <= subx <= 15) |
[in] | suby | The sub-pixel Y position. (0 <= suby <= 15) |
|
virtual |
Called to calculate volumetric information.
Set vd->col and vd->trans.
If VIDEOPOSTINFO::CALCVOLUMETRIC is not set then CalcVolumetric is not needed. If this flag is set then CalcVolumetric is required.
Called for spans; vd->ray->p to vd->p where vd->ray->p is the entry point and vd->p is the exit point.
[in] | node | The BaseVideoPost connected with the VideoPostData instance. Equal to static_cast <BaseVideoPost*>Get(). Provided for speed and convenience. Cinema 4D owns the pointed video post. |
[in,out] | vd | The volume data to use and modify. The caller owns the pointed volume data. |
|
virtual |
Called to calculate shadow information.
If VIDEOPOSTINFO::CALCSHADOW is not set then CalcShadow is not needed. If this flag is set then CalcShadow is required.
[in] | node | The BaseVideoPost connected with the VideoPostData instance. Equal to static_cast <BaseVideoPost*>Get(). Provided for speed and convenience. Cinema 4D owns the pointed video post. |
[in,out] | vd | The volume data to use and modify. The caller owns the pointed volume data. |
|
virtual |
To ensure SDK compatibility Private.
|
virtual |
To ensure SDK compatibility Private.
|
virtual |
Called to calculate global illumination information.
If VIDEOPOSTINFO::GLOBALILLUMINATION is not set then ComputeDiffuseGI is not needed. If this flag is set then ComputeDiffuseGI is required.
[in] | node | The BaseVideoPost connected with the VideoPostData instance. Equal to static_cast <BaseVideoPost*>Get(). Provided for speed and convenience. Cinema 4D owns the pointed video post. |
[in,out] | vd | The volume data to use and modify. The caller owns the pointed volume data. |
[in] | receive_strength | The receive GI strength of the rendered materials. |
|
virtual |
Called to calculate surface caustics information.
If VIDEOPOSTINFO::CAUSTICS is not set then ComputeDiffuseCaustic is not needed. If this flag is set then ComputeDiffuseCaustic is required.
[in] | node | The BaseVideoPost connected with the VideoPostData instance. Equal to static_cast <BaseVideoPost*>Get(). Provided for speed and convenience. Cinema 4D owns the pointed video post. |
[in,out] | vd | The volume data to use and modify. The caller owns the pointed volume data. |
[in] | sampleradius | The caustics sample radius of the rendered materials. |
[in] | accuracy | The caustics sample count of the rendered material. |
|
virtual |
Called to calculate volume caustics information.
If VIDEOPOSTINFO::CAUSTICS is not set then ComputeDiffuseCaustic is not needed. If this flag is set then ComputeDiffuseCaustic is required.
[in] | node | The BaseVideoPost connected with the VideoPostData instance. Equal to static_cast <BaseVideoPost*>Get(). Provided for speed and convenience. Cinema 4D owns the pointed video post. |
[in] | p | The rendered point for volume caustics. |
[in] | cpu_index | The index of the current running thread (0 to cpu_cnt-1), so that the volume caustics calculation get this information passed. |
Called to let the video post create its own rays for the pixel at (x, y).
[in,out] | dst | The custom ray. Change the ray's parameters. |
[in] | x | The X coordinate of the pixel. |
[in] | y | The Y coordinate of the pixel. |
|
virtual |
Called to let the video post create its own extended ray for the pixel at (x, y).
Improved version of CreateRay giving additional information for motion blur and DOF that some custom lens plugins might want to use to correctly compute these effects.
[in,out] | dst | The custom ray. Change the ray's parameters. |
[in] | x | The X coordinate of the pixel. |
[in] | y | The Y coordinate of the pixel. |
[in] | lensx | The lens X. (Value is in the range 0.0 to 1.0.) |
[in] | lensy | The lens Y. (Value is in the range 0.0 to 1.0.) |
[in] | time | The time. (Value is in the range 0.0 to 1.0.) |
|
virtual |
Called to return the number of stereoscopic editor cameras.
[in] | node | The BaseVideoPost connected with the VideoPostData instance. Equal to static_cast <BaseVideoPost*>Get(). Provided for speed and convenience. Cinema 4D owns the pointed video post. |
[in] | doc | The active document. The caller owns the pointed document. |
[in] | bd | The active editor view. The caller owns the pointed view. |
|
virtual |
Called to return the number of stereoscopic cameras used for rendering.
[in] | node | The BaseVideoPost connected with the VideoPostData instance. Equal to static_cast <BaseVideoPost*>Get(). Provided for speed and convenience. Cinema 4D owns the pointed video post. |
[in] | doc | The active document. The caller owns the pointed document. |
[in] | rd | The current render settings. The caller owns the pointed render data. |
|
virtual |
Called to fill the information structure for each stereoscopic camera.
[in] | node | The BaseVideoPost connected with the VideoPostData instance. Equal to static_cast <BaseVideoPost*>Get(). Provided for speed and convenience. Cinema 4D owns the pointed video post. |
[in] | doc | The active document. The caller owns the pointed document. |
[in] | bd | The active editor view. The caller owns the pointed view. |
[in] | rd | The current render settings. The caller owns the pointed render data. |
[in] | index | The index of the stereoscopic camera: 0 <= index < StereoGetCameraCountRenderer() |
[out] | info | Fill with the stereoscopic camera information. |
|
virtual |
Called to return a scene hook ID to store mouse coordinates used for drawing.
[in] | node | The BaseVideoPost connected with the VideoPostData instance. Equal to static_cast <BaseVideoPost*>Get(). Provided for speed and convenience. Cinema 4D owns the pointed video post. |
|
virtual |
Called to merge the stereo images for rendering.
settings contains the stereoscopic render settings.
[in] | node | The BaseVideoPost connected with the VideoPostData instance. Equal to static_cast <BaseVideoPost*>Get(). Provided for speed and convenience. Cinema 4D owns the pointed video post. |
[out] | dest | The destination bitmap to fill with the merged stereoscopic image. |
[in] | source | The array of stereoscopic images. |
[in] | cnt | The number of stereoscopic images in source. |
[in] | settings | The stereoscopic render settings container. |
[in] | transform | The color space transformation: COLORSPACETRANSFORMATION |
|
virtual |
Called to enable video post effects only for certain render engines or to allow only certain render settings tabs, e.g. if the video post is a render engine itself.
For example to disable the video post effect for the Cineman renderer:
Here is how to disable some render settings tabs for a render engine plugin:
[in] | node | The BaseVideoPost connected with the VideoPostData instance. Equal to static_cast <BaseVideoPost*>Get(). Provided for speed and convenience. Cinema 4D owns the pointed video post. |
[in] | id | The ID of the render engine or the render settings tab: RENDERSETTING_STATICTAB |
|
virtual |
Called to send the current ray weight. The call is made right before each ComputeDiffuseGI().
Each ray has now a weight associated with it, basically how important the ray is. All primary rays start with a weight of 1.0 and as they get "split" their weight is reduced.
For example computing GI within blurry reflections would use much lower weight, assuming each blurry reflection uses 8 samples then the weight would be 1/8 so the GI would only use now 1/8 of the original rays.
[in] | node | The BaseVideoPost connected with the VideoPostData instance. Equal to static_cast <BaseVideoPost*>Get(). Provided for speed and convenience. Cinema 4D owns the pointed video post. |
[in] | cpu_index | The index of the current running thread (0 to cpu_cnt-1). The thread index is important as each thread might use different weight. |
[in] | weight | The current ray weight. |
|
virtual |
Called to setup all the data for a NET frame.
[in] | node | The BaseVideoPost connected with the VideoPostData instance. Equal to static_cast <BaseVideoPost*>Get(). Provided for speed and convenience. Cinema 4D owns the pointed video post. |
[in] | doc | The active document. The caller owns the pointed document. |
[in] | job | The render job. The caller owns the pointed render job. |
[in] | assignedClients | The initial client count at the moment the frame is about to be rendered. |
[in] | renderData | The NET render data. The caller owns the pointed render data. |
[in] | frameBmp | The multipass bitmap where the resulting images are expected to be stored (important if the image is to be shown in the Picture Viewer). |
[in] | bt | The render thread. The caller owns the pointed thread. |
[out] | realdepth | Assign the real image depth. |
|
virtual |
Called to clean up after rendering the NET frame has been done.
[in] | node | The BaseVideoPost connected with the VideoPostData instance. Equal to static_cast <BaseVideoPost*>Get(). Provided for speed and convenience. Cinema 4D owns the pointed video post. |
|
virtual |
Called to send NET frame messages.
[in] | node | The BaseVideoPost connected with the VideoPostData instance. Equal to static_cast <BaseVideoPost*>Get(). Provided for speed and convenience. Cinema 4D owns the pointed video post. |
[in] | remoteUuid | The client uuid. |
[in] | data | The data the client sends to the server. |
[in] | result | An optional return value if the client is expecting a result. |
|
virtual |
Called to to create specialized buffers e.g. for Normal and Position passes.
[in] | node | The BaseVideoPost connected with the VideoPostData instance. Equal to static_cast <BaseVideoPost*>Get(). Provided for speed and convenience. Cinema 4D owns the pointed video post. |
[in] | vps | The video post information. The caller owns the pointed video post struct. |
[in] | x | The X position in the buffer that needs to be filled. |
[in] | y | The Y position in the buffer that needs to be filled. |
[in] | sizex | The width in the buffer that needs to be filled. |
[in] | sizey | The height in the buffer that needs to be filled. |
[in] | id | Assign the buffer ID. |
[in] | subid | Assign the buffer sub-ID. |
|
virtual |
Called to return the motion blur information.
[in] | node | The BaseVideoPost connected with the VideoPostData instance. Equal to static_cast <BaseVideoPost*>Get(). Provided for speed and convenience. Cinema 4D owns the pointed video post. |
[in] | info | The motion blur information. |