On 23/01/2016 at 04:51, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R17
Platform: Mac ;
Language(s) : C++ ;
---------
I'm looking at writing a plugin somewhat analogous to Lightwave's surface bake camera, which (as I understand it) lets you render out a scene to a texture using a specified mesh and UV map. I believe the way this works is that the raster space is basically mapped onto the 2D UV texture, and then the camera rays are fired downwards towards the mesh so that the rays are parallel to the polygon (or phong?) normal, hitting anything down along the way. This basically lets you bake out things like floating geometry or high poly models to low poly models by controlling the distance from the surface at which the camera rays are spawned. Modo seems to have a very similar feature that works quite well.
I know C4D has the "bake texture" tag, but this feature hasn't been touched in years (decades?) and doesn't support baking out floating geometry or stacked materials applied via polygon selections or alpha masks. I need to be able to do these things, preferably inside C4D, which means I guess I'm gonna have to write my own plugin to do it.
Anyways, what I'm wondering is where I should be starting with this... I know you can manipulate the camera rays in C4D as I'm pretty sure Per-Anders' Degamma plugin does this as a part of his VR rendering solution. What I don't know is what kind of plugin type is required to actually do this (and I can't find a demo of Degamma anywhere).
Can anyone offer any kinds of pointers on where to begin with something like this? I will ultimately need to control where the camera rays originate from and their vector, presumably before anything is actually rendered. I think I can handle the rest, I just don't really know where to begin.
Thanks,
-CMPX