THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/10/2005 at 12:26, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 9.1
Platform: Windows ;
Language(s) : C++ ;
---------
Hi All,
I've developed custom camera's for Mental Ray by using Lens Shaders that I would now like to migrate to Cinema 4D. This is my first exposure to the C4D SDK so I'm hoping someone can point me in the right direction. The way Mental Ray Lens Shaders work is: I define a callback function that mental ray executes for each ray that leaves the camera. Mental Ray tells the function things like rendered image size, which pixel (x,y) in the image it's working on, and the 3D vector for the ray emanating from the camera. My custom camera functions use that information and some math to reroute the camera's ray origin and direction before passing that info back to Mental Ray to continue it's rendering as normal. Is something similar possible in Cinema 4D? Does anyone have sample code I can work from?
Thanks