Plugin Cafe Homepage
Forum Home Forum Home > Plugin Cafe > General Discussion
  New Posts New Posts
  FAQ FAQ  Forum Search   Register Register  Login Login

Need to create camera plugin using the c++

 Post Reply Post Reply
Author
Message
amlendra View Drop Down
Member
Member


Joined: 2018 Feb 01
Online Status: Offline
Posts: 43
Post Options Post Options   Quote amlendra Quote  Post ReplyReply Direct Link To This Post Topic: Need to create camera plugin using the c++
    Posted: 2018 Feb 01 at 3:37am
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.


Edited by amlendra - 2018 Feb 01 at 9:58am
Back to Top
Andreas Block View Drop Down
Forum Moderator
Forum Moderator
Avatar

Joined: 2014 Oct 01
Location: Hannover
Online Status: Offline
Posts: 1785
Post Options Post Options   Quote Andreas Block Quote  Post ReplyReply Direct Link To This Post Posted: 2018 Feb 02 at 7:25am
Hi,

welcome to Plugin Café forums Smile

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.



Edited by Andreas Block - 2018 Feb 02 at 7:25am
Cheers,
Andreas
SDK Support Engineer
Back to Top
amlendra View Drop Down
Member
Member


Joined: 2018 Feb 01
Online Status: Offline
Posts: 43
Post Options Post Options   Quote amlendra Quote  Post ReplyReply Direct Link To This Post Posted: 2018 Feb 06 at 10:02am
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? 
Back to Top
Andreas Block View Drop Down
Forum Moderator
Forum Moderator
Avatar

Joined: 2014 Oct 01
Location: Hannover
Online Status: Offline
Posts: 1785
Post Options Post Options   Quote Andreas Block Quote  Post ReplyReply Direct Link To This Post Posted: 2018 Feb 07 at 9:48am
For rendering the stereoscopic camera can indeed be configured with multiple cameras. See our online docs on Calculating Stereoscopic Images.
Cheers,
Andreas
SDK Support Engineer
Back to Top
amlendra View Drop Down
Member
Member


Joined: 2018 Feb 01
Online Status: Offline
Posts: 43
Post Options Post Options   Quote amlendra Quote  Post ReplyReply Direct Link To This Post Posted: 2018 Feb 10 at 5:41am

Smile 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.

Edited by amlendra - 2018 Feb 12 at 1:36am
Back to Top
amlendra View Drop Down
Member
Member


Joined: 2018 Feb 01
Online Status: Offline
Posts: 43
Post Options Post Options   Quote amlendra Quote  Post ReplyReply Direct Link To This Post Posted: 2018 Feb 19 at 4:00am
Is there any API in c++ to create the planes (like near, focal and far) for a camera in cinema4D?
Back to Top
Andreas Block View Drop Down
Forum Moderator
Forum Moderator
Avatar

Joined: 2014 Oct 01
Location: Hannover
Online Status: Offline
Posts: 1785
Post Options Post Options   Quote Andreas Block Quote  Post ReplyReply Direct Link To This Post Posted: 2018 Feb 27 at 7:58am
Hi,

terribly sorry, I almost forgot you... Cry

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.

Cheers,
Andreas
SDK Support Engineer
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.61 [Free Express Edition]
Copyright ©2001-2009 Web Wiz

This page was generated in 0.109 seconds.