RenderTarget


RenderTarget This node provides a render target which saves the render output and provides it as a texture.
RenderTarget Reference This node provides the possibility to reuse a render target and additionally write different render outputs to one single render target.

A RenderTarget node is used to render all following nodes in the scene hierarchy into a texture instead of the screen. The RenderTarget can be used like any other texture and is the basis for creating special effects such as Glow, Blur and even Screen Shaping.

Use of RenderTargets is currently not supported by the intersection handling that is required for using any of the Interaction Nodes.


Texture Resolution and Quality

A RenderTargets texture resolution can be defined in width and height in addition to the multisampling quality of the texture. The default resolution settings for a RenderTarget texture is the current render screen resolution.

Try to keep the number of RenderTarget Nodes and their respective resolution to a minimum. They consume a substantial amount of graphics card memory and switches between them are one of the most expensive rendering operations there is.


Although the width/height properties list only multiples of two, it is possible to set a RenderTarget to arbitrary values by using an Integer node and binding it to the width/height properties. Note however that the maximum texture size restrictions of the graphics card still apply. In most cases 8096 pixels width or height is the maximum modern graphics cards can handle.


To reduce the amount of alias ("pixelation") when doing any rendering (whether into a texture or onto the screen), graphics cards can render in a higher resolution internally and the re-sample down to the target resolution. This process is called Multisampling, sometimes referred to as anti-aliasing. There are three places the multisampling quality can be specified:


Ventuz defines the following quality settings:

If the whole scene is rendered into a RenderTarget and that texture is simply mapped to the screen via an Overlay Rectangle, multi-sampling should be activated in the RenderTarget and deactivated in the Project Properties. Multi-sampling the rendering to the screen when the Texture is already multi-sampled would only unnecessarily increase memory consumption and decrease render performance because textures (in our case the render target) are not multisampled at all! Only edges of geometries are affected!

Sharing and Referencing

To save graphics card memory and improve performance, the memory allocated by a RenderTarget node can be shared by assigning a common ShareID different than -1 to all RenderTargets that should share a texture. RenderTarget sharing only works if the according RenderTarget nodes match in all parameters (like size and multisampling quality).

The following example shows two RenderTarget Nodes that share the same memory. Since the output texture of Target1 is used before Target2 is reached in the render order, Target2 can clear and re-use the same memory without any visual difference to using two separate RenderTargets. To avoid clearing the content of a shared render target use a Viewport node as the first node behind the render target and disable all clear options of it.


Each RenderTarget node will clear the output texture before rendering the first piece of geometry to the texture. The Render Target Reference can also be used to share a RenderTarget texture but will not clear the texture. Therefore the content below the reference will be added to the output texture.

Another good reason for sharing render targets is if many scenes require a single render target and all scenes must be held in memory. Imagine a TV show with hundreds of different graphic templates sharing the same visual effect (such as glow). If every scene used an individual render target the GPU memory would overload immediately. Sharing the render target is the solution here.

The Render Target Reference node is a simplified way to share render targets within the same scene whereas the ShareID technique is used for cross-scene sharing.


Advanced Properties

A RenderTarget can be told to not create a Depth buffer when allocating its internal data structure. This saves memory but puts all the responsibility for handling the overdrawing of objects on the user.

The RenderMode properties can be used to change the update behavior of a RenderTarget. By default, a RenderTarget will re-render its hierarchy content to its texture every frame.