Rectangle Geometries

Rectangle A flat, rectangle shaped mesh primitive. By far the most frequently used geometry in a typical Ventuz scene.
Rounded Rectangle Similar to Rectangle but each corner individually can be made either rounded or sharp.
Gradient Rectangle Similar to Rectangle but can be assigned two color values to create a resolution independent gradient.
Overlay Rectangle Special rectangle that is always screen-aligned and fits the size of the output.

Rectangle

The Rectangle is easily the most often used primitive, usually in conjunction with a texture assigned to it. It is great for rendering buttons, menu bars or other navigational elements which are more easily created in a 2D painting application than with a 3D modeling program.

Normalization

There are a number of situations where the user may want to map different images to a Rectangle but the specific size of the images is not known in advance. By activating the Normalize Property, the Rectangle automatically adjusts its size so that the larger of the two X/Y properties is scaled down to one and the other follows proportionally. This way the actual rectangle geometry will always be somewhere in the unit square around the origin.

Usually this is used by binding the X/Y size properties of the Rectangle to the X/Y output properties of an Image Loader node. Regardless of what dimension the loaded image is, the image will always be mapped with the correct aspect ratio in the unit square around the origin.

Rounded Rectangle

The Rounded Rectangle inherits most of its Properties from the standard Rectangle. In addition, it provides four Boolean flags that indicate whether or not each of the four corners should be rounded. The radius of the rounded corner is specified by RoundedSize.

The construction of the Rounded Rectangle is more similar to a rectangle with a boundary around it than a rectangle from which the corners have been subtracted. Using the Filled flag, the inner part can be removed to use the Rounded Rectangle for example as an image frame.

Texturing

A number of Texture modes have been added to address certain use cases:

The idea behind the latter two is to create a texture which contains a 3D button and by using the two texture modes, the geometry can be adjusted while the button correctly stretches.

Gradient Rectangle

Instead of baking a gradient into a texture and mapping it onto a Rectangle, a Gradient Rectangle can be used directly. The main advantage is that the Gradient Rectangle does not use a texture but rather assigns color values to the vertices of the tessellation and lets the hardware worry about smoothly interpolating between those values.

Overlay Rectangle

The Overlay Rectangle is not like the other three rectangles. It does not create some form of rendering mesh that can be positioned in 3D space. Instead, it is specially designed for the case where the user wants to map a texture to the whole screen. This can be either a texture loaded from a file, generated by a RenderTarget or any other source that generates a texture. Common cases of usage are adding a nice background to a scene which is independent of the 3D geometry or mapping a movie to the complete screen. As an alternative, the Viewport/Backgound Node can also map a texture to the whole screen but offers additional stretch behaviors.

The Overlay Rectangle ignores all Color and Material node settings and is always rendered in white.


The Overlay Rectangle does not perform any depth testing and neither reads from nor writes to the Z-Buffer. It provides a property AlphaMode for simple selection of the alpha blending used to render the overlay. There are five different presets:

Value Description Source Factor Dest Factor Function
No Setup The Overlay Rectangle does not change any alpha blending setting. The current settings of any previous Alpha Blending node will be used. - - -
Alpha Blended (default) The default alpha blending is used. Texture applied on the Overlay Rectangle uses their alpha to perform normal transparency. Source Alpha Inverse Source Alpha Add
Additve All pixels are added to the background. This mode is useful for effects such as glow and lens flares. One One Add
Overwrite All pixels overwrite the background. Pixels with alpha value 0 may not be drawn due to the Alpha Testing. One Zero Add
Premultiplied Alpha Useful if the texture applied on the Overlay Rectangle contains premultiplied alpha. This mode is often used if the texture is a Render Target. One Inverse Source Alpha Add

The ScreenAligned property has only effect if a Render Setup configuration with more than one machine is active. It can have three states: Inherit, Yes and No. In Multi-Machine Rendering it specifies if a machine should display the complete texture on the Overlay Rectangle (No) or only the part of the texture according to the Render Setup configuration (Yes). In case of Inherit a parent node defines the state.