Composers
Composers collect and organize render passes and can do some specific post-processing to create effects in render passes. Each scene has a Composer property that determines which composer it uses for rendering the scene. Kanzi Studio includes:
- Render passes and composers. Render Pass allows you to create the rendering result you want, while Composer and Custom Composer allow you to group render passes so that you can refer to a single composer in your scene and hook any rendering function from application code.
- Effect composers. Use effect composers to apply post-processing effects to render passes. To apply an effect, place a composer or a render pass under an effect composer. To apply multiple effects, nest composers.
Render passes and composers
Kanzi Studio comes with an empty Render Pass you can use to create the rendering result you need. To make a more complex effect, you can combine multiple render passes or use object sources and filters to tell the render pass which objects in your Kanzi application you want to render. See Using object sources.
When rendering a scene, Kanzi collects all render passes in the structure in depth-first order. Kanzi renders render passes sequentially, passing the output of each to the next render pass for input. The final state of the color buffer determines the contents of the frame.
Use Composer and Custom Composer objects as structure containers to group render passes so that you can refer to a single composer in your scene.
Additionally, Custom Composer provides a way to hook any rendering function from application code to do the compositing. A Custom Composer represents that rendering function in Kanzi Studio and allows, for example, assigning properties to the rendering function. To use a Custom Composer you need exactly one camera with the Shadow Caster Camera property and a scene with at least one mesh that has shadow mapping properties.
Effect composers
Kanzi Studio comes with several preset effect composers you can use in your project to achieve a specific rendering effect.
These effect composers are available in Kanzi Studio:
- Bloom Composer creates a bloom effect making bright objects to appear glowing. The composer creates a bloom effect on object edges that interact with light sources.
- Color Adjust Composer modifies the colors of their targets. You can use it to adjust color properties: brightness, contrast, saturation, gamma saturation, hue, and lightness.
Because this composer is computationally intensive use it mainly for prototyping. For production use you can achieve the same result by modifying the content.
- Depth-of-Field Composer creates a depth-of-field effect by blurring objects that are out of focus. You can use it to render objects at a certain distance range sharply while blurring objects outside the focus range, artificially simulating how cameras and even the human eye works.
This composer is computationally intensive. You can override this effect with camera properties.
- Partial Rendering Composer enables multi-pass rendering of stencil bounding volumes. This reduces the fill-rate if most of the scene is static, since only moving objects need to be re-rendered. You can use this composer to optimize performance of applications where only part of the displayed scene is in motion. See Using partial rendering layers.
- Render to Cube-map Composer allows for rendering dynamic cubemap textures from the viewpoint of a given object. You can use it for creating cubemaps from a 3D scene, for example, to generate dynamic reflections. See Using render to cubemap composer.
- Shadow Map Composer allows for automated shadow mapping. The shadow mapping is calculated based on a shadow caster camera. The shadow caster camera and the objects that cast or receive shadows are determined by their attached properties. Use this composer to create shadows in a scene. See Using the shadow map composer and Creating dynamic shadows.
- Stereoscopic Composer creates a stereoscopic effect for displays or accessories that can produce the stereoscopic effect. You can use it to adjust eye distance, focus distance, and to reverse eyes. You can override this effect with camera properties.
See also
Using rendering effects
Rendering best practices
Effects example
Using object sources
Open topic with navigation