Thursday May 24, 2012 12:40 AM AEST

Inside a next-gen 3D engine

By Logan Booker
10:59 Apr 6, 2006
Tags: game | pc | 3d | fps | action | nvidia | ati
«  »
Inside a next-gen 3D engine

 

LEFT: Specular mapping off. RIGHT: Specular mapping on.

Specular Mapping
This extends the functionality of HDR and specular bloom to models. In Offset, artists can assign areas on a texture a 'specularity' rating and depending on that rating an area while be more or less affected by HDR lighting. It's great for making the armour on Offset's ogre shine in the light while his skin remains dull.

'[Specular mapping] allows us to use one common material for each object rather then having to break it up into two or more different materials depending on the specular values - therefore increasing rendering efficiency for the model,' explains Green.

Performance hit: 'Low; extra shader pass.' With HDR in the pipeline it's a simple matter of including it with everything else.

Difficulty/Time to implement: 'This is an example of an effect which required no additional programmer effort to support. The Offset Engine's shader architecture allows artists to apply this effect at their own discretion, by hooking up a texture to the shading model's "Specular" slot in the material editor.'

 

LEFT: Shadowing off. RIGHT: Shadowing on.

Shadowing
Since the dawn of 3D gaming, shadowing has always been a tricky issue. Several ways exist in which to generate shadows from pre-calculated shadow maps (the original Quake) to realtime calculations using z-fail - otherwise known as Carmack's Reverse (Doom 3). The Offset engine employs a technique known as texture shadowing that uses, funnily enough, a texture to portray an object's shadow. Unlike stencil shadows, which exclude areas from the scene and can be computationally expensive, texture shadows make use of the normal processing pipeline and incur a smaller performance hit. The disadvantage is that is the texture detail for the shadow is low it will look naff at higher resolutions. 'Without realtime shadows the game world will look static and fake,' says Green. Can't really argue with that.

Performance hit: 'Variable - it depends greatly on how many shadow casting lights are present in the scene, and the shadow quality settings.'

Difficulty/Time to implement: 'Moderate; implementing the basic technique in the Offset Engine was fairly straightforward. Sam McGrath employed additional techniques on top of the basic algorithm, such as displacement shadow mapping (explained later), to improve the effect.'

 

LEFT: Sub-surface scattering off. RIGHT: Sub-surface scattering on.

Sub-surface scattering
The accurate simulation of semi-translucent liquids and solids in 3D must take into account the absorption and reflection of light internal to that object.

'When light hits a surface like skin, it will usually enter the surface and bounce around, until it finally exits the surface at a different location,' explains Green.

In order to create believable skin, sub-surface scattering is essential. This is demanding to do in realtime and most engines get around this by using a static, yet complex, material shader. '[Sub-surface scattering] adds a level of realism to our characters and creatures that is amazing. Once you see a character rendered with SSS, one without just looks "plastic",' explains Green.

Performance hit: 'Moderate; it is only a material shader however the shader is a little more sophisticated then a standard Phong material with specular.'

Difficulty/Time to implement: 'The approximation the engine makes was fairly easy to implement. More accurate SSS representations can involve techniques like precomputed radiance transfer, which are more difficult to implement.'

 
«  »
 
This article appeared in the April, 2006 issue of Atomic.

Aliens: Colonial Marines in depth; Z-77 Motherboard round-up; strategy gaming special; Home Server tutorial. PLUS MUCH MORE - ON SALE NOW!
 
Atomic Magazine

Issue: 137 | June, 2012

Atomic is a magazine aimed squarely at computer enthusiasts, gamers, and serious PC upgraders.

Every month we bring you the latest reviews of new technology and PC components, in depth features on everything from overclocking to console hacking, and gaming previews and interviews.
 
Latest Comments
 
Latest User Reviews
Battlefield 3 is the new benchmark online FPS
90%
A very fun and realistic multiplayer ride.
 
Antec Kuhler 920 - liquid cool
90%
Antec Kuhler 920 silent but effientive out of the box no maintence water cooling kit
 
Antec's Lanboy Air - our new favourite case
90%
Antec Lan boy Air in red a very cool design
 
Antec's Lanboy Air - our new favourite case
90%
This product overall is awesome.
 
MSI's GT780 laptop as fast as it gets
90%
Nice laptop