Cameras And Render Engines

From K-3D

Jump to: navigation, search

Cameras

Each K-3D Viewport Panel references a Camera node that determines what is visible in that Viewport. Much like a physical camera, a K-3D Camera node specifies:

  • A 3D transformation (position, orientation).
  • A viewing projection (perspective, orthographic).

In addition, each Camera provides:

  • A crop-window for restricting rendering to a subset of the visible scene.
  • A "target" point in world coordinates that is used to determine the "area of interest" for certain navigation operations.

When you "navigate" in a viewport using the mouse, you are modifying the position, orientation, and other viewing parameters of the corresponding Camera.

Render Engines

Render Engines do the work of generating the output files (mostly image files) that are K-3D's reason-for-being.

Most (but not all) K-3D render engines convert a 3D document into a 2D image. Examples include OpenGLEngine, RenderManEngine, and the YafrayEngine. In technical terms, these plugins each implement one-or-more of the k3d::icamera_preview_render_engine, k3d::icamera_still_render_engine, or k3d::icamera_animation_render_engine interfaces. As you may infer from the names, these interfaces require a camera as an argument - thus, the camera provides control over the view to be rendered, while the render engine determines the file format, resolution, render engine type, etc. of the final output.

Other render engines generate output that is less literal in nature - the GraphVizEngine "renders" an image that displays the nodes and edge in a document's Visualization Pipeline to help you see their (otherwise non-visual) relationships. The k3d::ipreview_render_engine, k3d::istill_render_engine, and k3d::ianimation_render_engine interfaces are available for render engines of this type. Because these render engines do not visualize three-space, the corresponding interfaces do not take a camera as an argument.

Note that there is an implicit many-to-many relationship among cameras and render engines: a camera does not store a reference to a specific render engine, nor does a render engine store a reference to a specific camera. The process of "pairing" a render engine with a camera (for those render engines that require a camera to render) happens on a case-by-case basis in the UI layer when the user renders.

You might want to use multiple render engines in a document with a single camera, to provide handy "presets" for preview and final render, or to render the same scene with more than one RenderMan implementation to compare the output. Conversely, you may wish to use multiple cameras with a single render engine, to tell a story using consistent render-engine settings, but from multiple angles.

Personal tools