VTK/MultiPass Rendering: Difference between revisions
No edit summary |
|||
Line 15: | Line 15: | ||
* [http://www.vtk.org/doc/nightly/html/classvtkRenderState.html vtkRenderState] | * [http://www.vtk.org/doc/nightly/html/classvtkRenderState.html vtkRenderState] | ||
* [http://www.vtk.org/doc/nightly/html/classvtkSequencePass.html vtkSequencePass] (allow run-time combinations of passes) | * [http://www.vtk.org/doc/nightly/html/classvtkSequencePass.html vtkSequencePass] (allow run-time combinations of passes) | ||
= Elementary passes = | |||
* [http://www.vtk.org/doc/nightly/html/classvtkCameraPass.html vtkCameraPass] | |||
* [http://www.vtk.org/doc/nightly/html/classvtkClearZPass.html vtkClearZPass] | |||
* [http://www.vtk.org/doc/nightly/html/classvtkLightsPass.html vtkLightsPass] | |||
* [http://www.vtk.org/doc/nightly/html/classvtkDefaultPass.html vtkDefaultPass] | |||
** [http://www.vtk.org/doc/nightly/html/classvtkOpaquePass.html vtkOpaquePass] | |||
** [http://www.vtk.org/doc/nightly/html/classvtkTranslucentPass.html vtkTranslucentPass] | |||
** [http://www.vtk.org/doc/nightly/html/classvtkVolumetricPass.html vtkVolumetricPass] | |||
= Existing passes = | = Existing passes = |
Revision as of 19:50, 19 June 2009
WORK IN PROGRESS
Overview
Modifying the logic of the rendering pipeline of VTK is cumbersome: it requires to modify several existing classes, and often requires a full understanding of most of the rendering classes. Modifying the rendering logic is really sensitive and error-prone. It's easy to break the code. More importantly, it also means that it is impossible from an external project to modify the rendering pipeline.
The multi-pass rendering framework try to address these issues by providing a hook in the vtkRenderer class where you can plug your own rendering algorithms (passes) and combine them with other algorithms at compile-time (statically) or a run-time (dynamically).
The approach is, even if the VTK source code is freely available (published under a (non-copyleft) free software license), to think of it as a closed-source package and see how it could be extended by relying only on its public API.
Fundamental classes
The following classes are the building blocks of the multi-pass rendering framework:
- vtkRenderPass
- vtkRenderState
- vtkSequencePass (allow run-time combinations of passes)
Elementary passes
Existing passes
The following classes are provided with VTK. The key is they could have been written out of VTK. It demonstrates that you can customize and extent the rendering VTK pipeline in an external project without modifying VTK:
- vtkDepthPeelingPass
- vtkShadowMapPass
- post-processing image passes: