Archive for March 6th, 2009

Parallax Occlusion Mapping with Adaptive Shadows

parallax-occlusion

The wall has only two polygons. The illusion of depth is done by ray tracing in texture tangent space. Note how the stones occlude each other even if there is no geometry.

Notice also how the shadows adapt to the depth as well. This is done by using virtual displacement of position in shadow mapping.

The second image is debug visualization of the parallax occlusion mapping effect.

The whole pipeline is using deferred shading, which enables scenes with high number of simultaneous dynamic lights (up to 100s). The shadow map rendering code uses caching to eliminate need for rendering shadow maps frequently. This enables that even all lights in the scene are able to cast dynamic shadows.

 

HDR-Rendering Pipeline Visualization

hdr-pipeline

multiRender has full high dynamic range rendering pipeline and both deferred and forward shading renderers. This image shows the G-buffer visualization of HDR deferred rendering pipeline. The ‘gray buffers’ are scaled down textures of average and adapted scene luminance, which are used together to simulate eye’s adaption to environment.

 

Ambient Occlusion (SSAO)

ao_intermediate

This is intermediate phase (before blurring) of screen space ambient occlusion (SSAO) effect. Benefit of SSAO is that it does not require ambient occlusion baked in the textures, so it

  1. Saves ram (valuable especially on consoles and mobile)
  2. Saves development time as no precomputation is needed
  3. Works with dynamic scenes which is a major benefit (see physics-sim.mpg).
 

Ambient Occlusion, With vs. Without

ao_intermediate

Comparison shows how ambient occlusion increases sense of depth and shape in low-lighting scenes.

 

Physics Simulation Setup

physics-sim

Physics simulations with, for example, hinge-joints and custom contact friction, can be setup within 3dsmax and tested in stand-alone content Viewer within seconds. Physics parameters are not set directly, but templates are used instead. This enables more consistent content creation. Think about, for example, following scenario: You want to make all certain type of doors in your game 2kg heavier. If all settings would be set directly within 3dsmax, this would be tedious task. But when you’re using templates, you can simply modify the template of that door type.

Notice in this screenshot also how ambient occlusion works also with dynamic objects, for example, when the sphere and the box are near each other. This gives nice illusion of global illumination (and very cheaply).

Here’s video (MPG) of the real-time simulation in the engine:
physics-sim

 

3D Content Viewer for Artists

3d-viewer-controls

Tweaking and debugging is essential part of 3D-content creation as well, and if you provide good tools for the artist you can trust they will be thankful for it. And that is, in turn, great for your game since happy artist means good content. :) The multiRender Viewer here supports also scripting and physics, so a lot of the content can be prototyped here without even launching the game. The Viewer can also be launched within 3dsmax to provide as smooth workflow as possible.

 

3dsmax Pipeline

3dsmax-pipeline

Often problem in content pipelines is that it is more or less cumbersome to get content from 3D-content creation application to the game. You might need 10 steps to get a simple object in game. Often a lot of configuration, for example, export time dialog boxes with exactly correct configuration, is needed. multiRender uses different approach: The content is moved from modeling package as is, and as far down the pipeline as needed all the way up to the rendering level (if needed). This reduces greatly the need for configuration since the usage context is known already when you still have the full data. This also enables fully different level of batch processing, basically all content can be batch-exported and processed (overnight if needed) to the game with a single button press.