On this page

Houdini’s 3D viewport has the ability to produce an interactive version of many lighting effects found in offline renderers. In addition, color correction through Lookup Tables (LUTs) and gamma correction can be applied.

Lighting in the Viewport

Many of the light types in Houdini have been modeled with OpenGL shaders. These light shaders produce a good approximation to the final rendered result so that lighting can be adjusted interactively. By default, most lights are rendered as point and spot lights, including area and environment lights. High Quality Light Shading, found on the 3D Viewer Display Options Effects tab and on the right toolbar, is used to enable the more complex shaders for these lights.

Area and environment lights require multisampling of the light source, and the Area Samples parameter in the 3D Viewer Display Options controls their rendering quality (default 16 samples). Increasing the value improves the quality, but slows down rendering.

High Quality Light Shading also enables an infinite number of lights in the viewport, avoiding the limited number of OpenGL lights (usually 8 or 16). Greater numbers of lights will gradually impact performance.

Ramp-based light attenuation is also available in High Quality Light Shading mode, as is cone light soft edge falloff and projected light textures.

Finally, screen space ambient occlusion is only available when High Quality Light Shading is turned on. This emulates ambient occlusion by darkening edges and impressions, but it cannot do occlusion from more distant objects. It respects the Unit Length of the hip file when determining distances for occlusion shadowing.

Shadows are also supported from all light types. They can be enabled on the Effects tab of the 3D Viewer Display Options, or by using the Shadows toggle button on the right toolbar. While point lights cast hard shadows, environment and area lights can cast softer shadows.

The shadow quality can be changed from basic hard-edged shadows for all lights to smoothed, soft area shadows by clicking the Shadows icon or using the Quality option in the 3D Viewer Display Options. Area shadows do not affect point lights, they will always use point shadows. Shadowmaps for lights are cached and only regenerated when the light’s casting area changes, or when the geometry producing shadows changes.

Tip

The higher quality shadow options can affect interactivity when adjusting lights or geometry in the scene. It is recommended that you reduce the shadow quality or turn them off altogether if the scene becomes choppy when modeling or positioning lights.

Note

High Quality Lighting only runs in perspective views. Normal quality lighting will be used when orthographic projections (Top, Left, Front) are active. Flat shading is also unsupported; smooth shading will always be used.

Materials

The default shader used by the viewport has support for basic lighting, multiple textures and light-based textures. The Mantra Surface Material has these properties built in, but they can be added through the Edit Rendering Parameters interface for other shaders. The viewport rendering parameters can be found in the SHOP/OGL subfolder.

Bump and normal mapping are supported for adding surface detail. Diffuse, specular and reflection maps are supported for color sampling. An opacity map is also supported to provide ease of transparency when multiple diffuse textures are used (otherwise, the first diffuse layer can specify opacity).

In terms of shader processing, the final normal is computed from either the interpolated vertex normals or the normal map if supplied. A bump map will further perturb the normals.

The normal and viewing direction is then used to compute the specular reflection. A specular map may used to tint the specular highlight, multiplied by the constant material specular color. The shininess factor can be encoded in the alpha channel and mapped to a shininess range using the Specular Map parameter set. If a reflection map is used, the specular color is further multiplied by a lookup into the reflection map using the reflection vector.

The diffuse color is a combination of the interpolated vertex color (if any), multiplied by the diffuse map (if any), multiplied by the constant material diffuse color.

The opacity is determined by the interpolated vertex alpha (if any), multiplied by the constant material alpha, multiped by the opacity map (if any) and finally multiplied by the first diffuse layer’s alpha channel (if any, and the diffuse texture has an alpha channel).

Custom GLSL shaders may be used in the viewport as well, though they need to follow a few guidelines to work properly in all cases. See How to write an OpenGL Shader .

Transparent Objects

Houdini draws transparent objects separately in a transparent pass after all opaque objects have been drawn when the Transparency display option is on. Objects are considered to be transparent if they have the following:

  • point or vertex color and alpha

  • a material applied with an alpha value other than 1.0 or 0.0

  • a material applied that references a diffuse RGBA texture with alpha values other than 1.0 or 0.0

  • a material applied with an opacity map

  • a material with a custom GLSL shader that has the ogl_alpha uniform defined

  • sprites

  • volumes

Only those parts of the object which meet the above criteria will be considered transparent, so some primitives within a geometry model may be drawn in the opaque pass if they do not qualify.

If the Transparency option is off, cutouts are used instead. Any pixel with a final alpha value of 0.0 will not be drawn, otherwise the pixel will be drawn as if it were opaque.

When the Transparency display option is enabled, the Transparency may be set to Low Quality, Medium Quality or High Quality. These modes greatly improve the quality of transparent surfaces, especially overlapping transparent surfaces. However, High Quality Lighting is not applied to transparent objects for performance reasons. If you wish to see the effect of area or environment lighting on transparent surfaces, disable Transparency.

Low Quality transparency draws transparent objects front-to-back after all opaque objects have been drawn. Intersecting transparent objects will not render correctly, as will some overlapping object cases where the bounding boxes overlap.

Medium Quality transparency draws a limited number of layers, sorted on a per-pixel level. Shadows are not cast on transparent objects and normal quality lighting is performed.

High Quality transparency allows more layers to be drawn, which produces a better result for many overlapping transparent objects. Shadows can also be cast onto transparent objects.

Sprites

Particle systems can be rendered as sprites if a Sprite POP is present. Sprites are always drawn as transparent objects. A sprite is a small texture that always faces the camera, centered at the particle. Sprites are drawn after all other transparent objects except for volumes when in Medium Quality or High Quality transparency mode.

Volumes

Volumes can be rendered at a variety of quality levels which improve the look of the volume at the expense of performance. Volumes do not cast or receive shadows, nor does ambient occlusion affect them. Volumes can be rendered without transparency, producing a solid outline of the volume.

Volumes are limited to using a 128×128×128 8 bit 3D texture by default. For larger datasets, this limit can be adjusted on the Optimization ▸ Textures page of the display options.

Volumes are drawn in the final pass of the beauty render.

Managing Performance and Graphics Memory

Houdini allows for high quality display of many different aspects of the viewport rendering, including lights, shadows and materials. However, it is not advisable to set all of these features to the maximum quality setting at the same time, even on high-end graphics hardware. Many of these features are designed to improve image quality for specific situations, such as evaluating the contribution of lights or viewing a volume in great detail. Pushing everything to high quality can end up reducing viewport interactivity to the point where making changes is painfully slow.

There are several quick ways to return to interactive frame rates if the viewport is sluggish, if these display options are active:

  1. Turn off High Quality Lighting

  2. Reduce Volume Quality to Low

  3. Turn off Transparency

  4. Reduce Shadow Quality to Point

  5. Reduce Scene Antiaiasing to None

  6. Disable Textures

  7. Turn off HDR Rendering

Note

The following sections go into greater detail on performance and memory use.

Viewport Performance

Performance in the viewport is affected by two things: what you are displaying (the model), and how you are displaying it (display options). Turning off Material Shaders on the Effects tab of the 3D Viewer Display Options is a good way to determine if the model is the constraining factor, as this will disable most of the advanced viewport effects.

If the model does appear to be the limiting factor, you can try a variety of things:

  1. Turn off the display flags some objects.

  2. Display the non-subdivided geometry, if a Subdivide SOP is used. Turn on the render flag on the Subdivide SOP, and the display flag of the SOP before it.

  3. Turn on some culling options on the Optimization ▸ Culling tab of the 3D Viewer Display Options, such as Remove Backfaces (backface culling) and Cull by drawing 'x' primitives out of every 'x' (polygon reduction).

If the display options are the limiting factor, you can reduce the quality of the displayed geometry. This is more common on graphics hardware with fewer shaders or earlier generations. All of the following options are found on the Effects tab of the 3D Viewer Display Options.

  1. High Quality Light Shading is the most performance-intensive quality enhancement available. Disabling this will provide the highest performance increase, especially if many lights are in the scene, and complex lights like area, geometry, environment or portals are used. It is not enabled by default.

  2. If many volumes are shown, reducing the Volume Quality will improve interactivity. Turning off Transparency may help as well, though at a fairly large quality decrease.

  3. Transparency causes more passes to be rendered and can result in slower rendering, if transparent objects are present. Volumes, sprites, materials with alpha less than one, and RGBA textured materials will all cause a transparency pass to be rendered. Try lowering the Transparency Quality first, then disable it if needed.

  4. Shadows can slow down the system, especially if there are many lights in the scene, or if area lights or portals are used and the Shadow Quality is set to Area or above. Try reducing the shadow quality first. You can also disable a light from rendering in the viewport by disabling the Enable Light in Viewport parameter in the Light object.

  5. Try using a non-shaded mode such as Hidden Line Ghost or Wireframe.

=== Viewport Memory Management ==

Graphics hardware has a limited pool of on-board memory (VRAM). Exceeding this limit will result in geometry, textures, and framebuffers swapping in and out of system memory. This can be observed as a frame rate stutter which may gradually correct itself.

There are several ways which VRAM can be used by Houdini:

  1. Geometry - models and particle systems.

  2. Textures - 2D textures on materials and for shadow maps; cube textures for environment maps on environment and area lights, plus omnidirectional light shadows; 3D textures for volumes.

  3. Framebuffers - textures and windows used to display information on the screen.

Geometry can be reduced in several ways, as stated above in Viewport Performance.

Texture usage can be reduced by disabling mipmapping, on the Effects tab, or by changing the settings found on the Optimization ▸ Textures page. Reducing the maximum size of a texture, or its default bit depth, can decrease the overall memory use of material textures. Finally, material textures can be reduced by disabling Multi Texturing or removed entirely by disabling Display Textures n the Effects tab.

Textures used for shadows can be reclaimed by turning shadows off, or by reducing the shadow Quality to Point if many area lights are used on the Effects tab.

Framebuffer usage can be reduced by lowering Scene Antialiasing or disabling HDR Rendering. Scene Antialiasing increases the framebuffer size by the antialiasing factor (2x, 4x, 8x) and can be a major source of VRAM use. HDR Rendering increases the framebuffer size by 50%.

Framebuffer memory increases as the size of the Houdini window increases. A high resolution display, such as the 2560×1536 resolution found on many 30" monitors, will consume much more VRAM than a smaller resolution. Using multiple monitors will double or triple the framebuffer use as well.

Note

While many graphics cards can run multiple displays at high resolution, they may not have enough installed VRAM to also display a scene with heavy geometry, textured and lit with high quality HDR lighting. It is recommended that a graphics card have over 512MB for a single display and at least 1GB for multiple displays when using these features.

Basics

Getting started

Next steps

Customization

Guru-level