As requested, we will describe some implementation details of our water rendering solution. This will not be a complete step-by-step introduction – there are already many articles out there (see Water Rendering Resources ). Instead, we will briefly describe all relevant parts, link to the relevant literature and go into detail where we have added something new.
Rendering a body of water, like a river or an ocean, is nothing special anymore. Many game engines support it directly or have a water sample. And implementing water is not too hard. I guess, an experienced graphics programmer should be able to take a sample from the internet and get it running in his/her engine of choice in less than a day. However, adding a comprehensive, general-purpose water rendering solution to an engine, creating a simple API and integrating water with other engine features (such as dynamic lighting or fog) is more challenging.
We have recently added water support to DigitalRune Graphics. …
Here is a video demonstrating our new water rendering tech. Enjoy!
In the previous article we have shown that occlusion culling can drastically reduce the number of objects that need to be rendered per frame. In this article we go one step further and extend this idea to shadow rendering.
Rendering shadow maps can be expensive in large scenes. Directional lights, like the sun, usually cover the entire level. Modern shadow mapping algorithms, such as cascaded shadow maps, limit the distance up to which shadows are rendered. Still, this may leave us with hundreds or thousands of shadow casting objects that need to be rendered into a shadow map. Shadow caster culling reduces the number of shadow casters further by removing shadow casters that do not contribute to the final image.
Hill and Collin  explain how to implement hierarchical Z-buffer (HZB) occlusion culling and how to extend the method to cull shadow casters. Darnell  has posted a sketch illustrating the idea. Here is a summary of the general ideas in our own words:
(1) Light Frustum Culling: As a first step, we can calculate the light frustum and test the bounds of the shadow casters against the light frustum. Shadow casters that do not intersect with the light frustum can be removed.
(2) Light Occlusion Culling: The occluders are rendered from the light's perspective and the bounds of the shadow casters are tested against the occluders. Shadow casters that are occluded from the light's perspective can be removed.
The next DigitalRune Engine release will support GPU-based occlusion culling. The implementation is based on the algorithm by Stephen Hill and Daniel Collin.
Occlusion culling is available for XNA (Windows, Xbox 360) and MonoGame.
The next update of DigitalRune Graphics will include a new major feature: occlusion culling.
Occlusion culling determines which objects are visible from a certain viewpoint. It greatly reduces the number of objects that need to be drawn per frame. In the following test the number of objects is reduced from a few thousand to a few hundred objects.
This new feature is available for the XNA Framework (desktop, Xbox 360) and MonoGame.
This article provides background information for the ParallaxMappingSample of the DigitalRune Engine.
The DigitalRune Engine provides several predefined materials for normal mapping, mesh skinning, transparent objects, alpha-cutout, matcaps, etc. (see Predefined Effects). However, you are not limited to these materials. You can create your own material effects.
Materials in DigitalRune Graphics are fully data-driven. That means, you only need to write a new DirectX effect (.fx file) and add a new material definition (*.drmat file), which can then be assigned to any mesh.
You do not need to write special C# code to use the material. To learn how to create your own materials, just get the HLSL code of the predefined materials from the Premium Downloads and use them as a starting point.
C# code is only needed if you want to dynamically change effect parameters at runtime. Thanks to our effect binding system (see Effects and Effect Bindings ), this is a lot easier than in most game engines. The use of effect bindings is demonstrated in several of the DigitalRune Engine samples.
The new ParallaxMappingSample shows how to add a new materials that support Parallax Mapping with Offset Limiting and Parallax Occlusion Mapping. The sample C# and HLSL code is included with the DigitalRune Engine. (Only available in Premium Downloads.)
Parallax mapping is an enhancement of normal mapping. While normal mapping makes bumps and dents appear under lighting, parallax mapping gives the material the appearance of depth – as shown in the following screenshots:
The latest DigitalRune Engine release contains the new RefractionSample, which demonstrates a few interesting aspects:
This article provides additional background information and explanations.
This article provides background information for the EnvironmentLightSample of the DigitalRune Engine. The EnvironmentLightSample shows how to implement a new light type which adds environment map reflections to all materials in the scene.
Our old deferred rendering samples show various materials, but none of them uses environment mapping  to show reflections. Time to change this and make things shiny!
Here are some screenshots from the new EnvironmentLightSample. Several objects show reflections. (The reflected environment map is the same as the sky box.)
The DigitalRune Engine supports procedural cloud layers, as shown here: Cloud Layer.
In this article we discuss an alternative, much simpler technique for cloud rendering:
The result looks like this:
Important blog articles are collected in the DigitalRune Knowledge Base.
Weingartenstrasse 35, 4452 Ternberg