On 29/04/2014 at 15:33, xxxxxxxx wrote:
User Information:
Cinema 4D Version:
Platform:
Language(s) :
---------
Hi all,
I'm trying to create a custom camera using VideoPostData, overriding CreateExtendedRay and setting GetRenderInfo to return VIDEOPOSTINFO_CUSTOMLENS_EXTENDED.
I've got the plugin registered, and it appears in the list of effects in render settings and I can apply it, but it seems to make no difference to the render and may not even be getting called (Nothing shows up when I add GePrint statements within the create ray function).
There's a whole bunch of questions which occur, so apologies if there's too much, but I'm not at all familiar with Cinema4D.
First is, is this even the correct type of plugin in order to make a custom camera (where I control the ray direction)? It was hard to tell as the examples say VideoPostData plugins are called after rendering in the comments at the top (which makes the idea of controlling ray direction in one seem like it wouldn't work, but there's an API for it, so I figured it should).
How do I get access to the camera and render settings from within the Create*Ray functions? At the moment I'm only using extended in order to know the range of x and y.
What space is the created ray in? If it's not in the camera's local space, how can I grab the transform matrix from camera space to whatever space the ray is expected in? (This kinda ties into the last question)
Is the renderer linked into the executable? i.e. is the cinema4d executable what I should be attaching my debugger to in order to debug shaders?
Cheers,
Alan.