Need to create camera plugin using the c++
-
On 01/02/2018 at 03:37, xxxxxxxx wrote:
Hi there,
I got a task to create a Visual Motion 3D Stereo Camera plugin using the C++. I am new in plugin development, I have created a sample plugin using the visual studio and c++ but I don't know how to go in a right direction for the camera plugin, so please show me the right way.
Thank you so much.
-
On 02/02/2018 at 07:25, xxxxxxxx wrote:
Hi,
welcome to Plugin Café forums
There's no such thing as a camera plugin in Cinema 4D. But there are a few options which may or may not work for you. Maybe you can explain a bit more what the "Visual Motion 3D Stereo Camera" is supposed to be, then it would be easier to provide some guidance.
First of all I want to make sure, you are aware of the stereoscopic and spherical camera options of Cinema 4D's built in camera.
First two options differ mainly in workflow and may be considered if the options of the existing camera suffice. Either a custom tag (TagData plugin) to be assigned to an existing camera and changing its parameters, or an object generator (ObjectData plugin, OBJECT_GENERATOR) creating a standard camera with the needed parameters. The second approach for example is used for Cinema 4D's Camera Crane object.
Then you could implement a VideoPostData plugin creating a custom lens (VIDEOPOSTINFO_CUSTOMLENS or VIDEOPOSTINFO_CUSTOMLENS_EXTENDED) by making use of CreateRay() or CreateRayExtended(). This works for rendered images, only (i.e. not in viewport).
Lastly we have an example VideoPostData plugin demonstrating a stereoscopic viewport in cinema4dsdk. This is already pretty advanced and we unfortunately have no documentation to help any further.
-
On 06/02/2018 at 10:02, xxxxxxxx wrote:
Thank you so much for the reply. Your comment is very helpful for me. I have seen the stereoscopic camera. It consists two cameras left and right. Is there is any API two increases the number of the camera?
-
On 07/02/2018 at 09:48, xxxxxxxx wrote:
For rendering the stereoscopic camera can indeed be configured with multiple cameras. See our online docs on Calculating Stereoscopic Images.
-
On 10/02/2018 at 05:41, xxxxxxxx wrote:
!
Smile
[URL-REMOVED] Again thanks, But it is not helpful for me. I want to create a multiview camera.There is any way in Cinema4D to create a parent camera which inherits n number of camera that shares the same planes (near plane, focal plane, and far plane).The number of cameras should be dynamic. If there is any example code or documents, it will be very helpful for me.
[URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.
-
On 19/02/2018 at 04:00, xxxxxxxx wrote:
Is there any API in c++ to create the planes (like near, focal and far) for a camera in cinema4D?
-
On 27/02/2018 at 07:58, xxxxxxxx wrote:
Hi,
terribly sorry, I almost forgot you...
The focal planes should actually be defined by the F-Stop and Focus Distance parameters of the physical camera. Or for the standard renderer by the parameters on the Details tab of the camera.
Now, for your multiview camera: This is not so easily accomplished. I think, I'd go with a combination of a CommandData plugin and a TagData plugin. The command would then set up your multiviewcamera by creating as many cameras as needed in whatever hierarchy suitable. And it would attach the custom tag to the child cameras. The custom tag then synchronizes the needed parameters by inheriting them from the parent/control camera.