You are on page 1of 11

Technical Brief

CineFX 3.0 The Next Wave of Stunning Visual Effects

The Next Wave of Stunning Visual Effects

The third-generation NVIDIA CineFX engine unleashes the power of the new NVIDIA GeForce 6 Series of graphics processing units (GPUs) and streamlines the creation of visual effects for emerging PC games. Through the power of Microsofts DirectX 9.0 Shader Model 3.0 and SGIs OpenGL 1.5 software, programmers can develop shader programs without any hardware-imposed length limits. Developers can also take advantage of increased flow control options, as well as technologies such as Multiple Render Targets (MRTs), to create the next generation of cinematic special effects. With the power of CineFX 3.0, these effects can be created, without compromising performance, to deliver innovative visual experiences (Figure 1). The CineFX 3.0 engine contains the industrys only true 32-bit shading power throughout the entire pipeline and delivers more processing power than ever before. CineFX 3.0 gives programmers the ability to create the most complex digital worlds to date. Advanced real-time effects that can fool the eye of the most discerning gaming enthusiastsuch as displacement mapping, complex shadows, and real-time skin and haircan all be realized with the new GeForce 6 Series.

2004 NVIDIA Corporation

Figure 1. Advanced real-time effects made possible with CineFX 3.0 technology.
TB-01206-001_v01 03/26/04 2

CineFX 3.0: The Next Wave of Stunning Visual Effects

Full Support for Evolving Standards


NVIDIA delivers complete support for DirectX 9.0 Vertex Shader Model 3.0 and Pixel Shader Model 3.0, as well as OpenGL shader program conventions, so game developers can easily access the power and precision of the CineFX 3.0 engine. The most complete support for high-level shader languagesincluding Microsoft HighLevel Shader Language (HLSL), OpenGL Shader Language (GLSL), and the Cg shading environmentgives programmers a choice for developing games that comply with either DirectX or OpenGL interfaces.

Vertex Shader 3.0


NVIDIA CineFX 3.0 introduces virtually infinite-length1 vertex programs and dynamic flow control, removing previous limits on the complexity and structure of shader programs. With complete programming freedom and the exceptional performance of the latest NVIDIA GeForce GPUs, developers can take advantage of new vertex shader features, such as displacement mapping and a frequency divider for vertex program streams.

Infinite-Length Vertex Programs


Vertex shader programs now have no length limits. Previously, complex effects had to be written as a combination of shader programs in order to comply with program length limitations. In some cases, the overhead for ending one program and starting another caused performance degradations that slowed the game and made the effect impractical to deploy. Now, without length limits on shader programs, complex effects can be written to extract the most performance out of gaming platforms. Even though longer programs take more time to process than shorter programs, the technology and speed of the CineFX 3.0 engine ensure that longer programs will run blazingly fast.

Dynamic Flow Control


Additional looping/branching options and new subroutine call/return functions give programmers even more choices for writing efficient shader programs. No length limitation, plus enhanced flow control, gives programmers unprecedented freedom that can unleash a new level of creativity in the gaming world.

The operating system or APIs can impose limits, but the hardware is not limited to shader program length.

TB-01206-001_v01 03/26/04

CineFX 3.0: The Next Wave of Stunning Visual Effects

The new flow control includes these capabilities: New instructions (IFC/BREAKC, IF/BREAK/CALLNZ) A unified eight-deep stack for return addresses and address registers: Branch, call Push, pop address register Condition code selection

Displacement Mapping
Programmers can also take advantage of a new CineFX 3.0 capabilityvertex processing with texturesto bring more depth and realism to every component, surface, and character in a scene. In real time, texture information can be mapped onto vertices with simple-to-use texture load-to-register instructions. This technique, also known as displacement mapping, eliminates the smooth surfaces that developers were either forced to work around with pixel shader level techniques (like bump mapping) or to leave as smooth surfaces in their 3D environments. Displacement mapping takes computer-generated worlds a step closer to being visually on par with the worlds captured on film. Subtle changes in a models geometry can have greater visual impact because each vertex can interact with all the various lights in a scene, with only a very small computational cost as compared to previous 3D generation techniques. In Figure 2, notice the initial model without displacement mapping. The image on the left shows a dinosaur head with part of the 3D model of mesh highlighted. The image on the right represents a material color applied to a 3D model of the same head.

Figure 2. Dinosaur head with part of 3D model of mesh highlighted (left), and with material color applied (right).

TB-01206-001_v01 03/26/04

CineFX 3.0: The Next Wave of Stunning Visual Effects

After displacements are added to the mesh of the model, the dinosaur head reveals ridges, valleys, and detailed textures (Figure 3). The detail reacts to the light source, giving a more realistic model, but with little computational cost.

Figure 3. Displacements added to mesh of model in Figure 2.

Vertex Frequency Stream Divider


CineFX 3.0 lets programmers specify multiple frequencies or offsets for reading different types of vertex information, such as animation and displacement information. An effect can be efficiently applied to multiple characters or objects, providing individuality when models are otherwise identical. Imagine an army of soldiers, each with a unique motion as they move down the field of battle. In this example, the individual animation parameters can be uniquely applied to each copy, making each soldier stand out and look unique. This effect can be implemented very efficiently. Programmers can batch animation parameters to all the models in the scene, making it practical to deliver complex effects throughout an entire scene to achieve stunning visual interest.

TB-01206-001_v01 03/26/04

CineFX 3.0: The Next Wave of Stunning Visual Effects

Pixel Shader 3.0


Advancements in CineFXs technology have raised the capabilities of pixel shaders so theyre on par with vertex shader capabilities. With increased control at the pixel level, programmers can dramatically enrich their games, bringing more lifelike qualities to every character, object, and scene. The native 32-bit processing abilities of the GeForce 6 Series of GPUs also increase overall pixel shading precision, taking pixel shaders to new levels of unsurpassed image quality.

Infinite-Length Pixel Shaders


No longer forced to restrict each pixel shader program to 96 instructions, programmers are now free from hardware2 limitations, and can implement more complex effects at the pixel level.

Dynamic Flow Control


Full support for subroutines, loops, and branchesincluding loop counter registers and condition codesand a new back/face register gives complete control to the programmer.

Flexible Data Support


Floating point operands can be treated in native 32-bit or optional 16-bit format, which are the standard formats in the film industry. Although both modes deliver equivalent performance, the 32-bit floating point mode uses twice as much memory to store the operands. Programmers can choose between native 32-bit mode and the optional 16-bit mode to achieve the required level of precision in each case. Plus, they can efficiently manage memory usage in situations where space is a consideration. Other data formats are also supported.

Multiple Render Targets


Multiple Render Target (MRT) technology allows the pixel shader to save per-pixel data in multiple buffers. These buffers can then be used as parameters for photorealistic lighting shaders. With this approach, lighting can be applied after all the geometry is rendered, and without multiple passes through the scene. This is also referred to as deferred shading. Some typical information stored in these kinds of surfaces includes position, normal, color, and material.

The operating system or APIs can impose limits, but the hardware is not limited to shader program length. .

TB-01206-001_v01 03/26/04

CineFX 3.0: The Next Wave of Stunning Visual Effects

Figures 5 through 7 illustrate the MRT technique used to generate a high dynamicrange scene. In the first rendering pass, three output buffers are createda color map, a normal map, and a depth map. In the second pass, the lighting is calculated using the normal and depth map combined with lighting terms. Next, the scene is accurately lit with the color map. Finally, in the third pass, the superhigh-intensity light values that were outside the 0 to 1 range are brought into the scene. The calculation involves blooming the pixels around areas of high-intensity pixels. The result of this pass is an incredible glow effect (Figure 7).

2004 NVIDIA Corporation

Figure 5. Color buffer (left) and depth buffer (right) of unlit scene.

TB-01206-001_v01 03/26/04

CineFX 3.0: The Next Wave of Stunning Visual Effects

2004 NVIDIA Corporation

Figure 6. Normal buffer of unlit scene (left), and lit scene thats the result of external lighting using normal buffer and depth buffer (right).

2004 NVIDIA Corporation

Figure 7. Color map and image combination (left), and final glow effect (right).
Because MRT was used, multiple passes were saved while creating the breathtaking final scene in Figure 7. As pixel shaders become increasingly complex, deferred shading implementations become more valuable because they avoid unnecessary processing time for pixels that do not contribute to the visible portions of the image.

TB-01206-001_v01 03/26/04

CineFX 3.0: The Next Wave of Stunning Visual Effects

Additional Visual Effects


The increased horsepower and new technology of the CineFX 3.0 engine empower programmers to create features and effects that are more unique than ever, including these: Subsurface scattering. Skin and surfaces take on depth, with variations that show realistic translucent qualities (Figure 8). Soft shadows. Shadows take on a less harsh look with this technique. The shadows edges that are created from the lighting and objects in the scene are softened, more accurately depicting the visual look that would occur (Figure 9). Environmental and ground shadows. Shadows can be cast onto environmental surfaces, such as grasses and other vegetation, without introducing eye-catching anomalies or slowing performance. The 32-bit pipeline allows ground shadows to accurately move as the viewers point of view changes. Global illumination. One of the biggest differences between prerendered and real-time graphics is lighting. To produce the most realistic imagery possible, film renderers spend hours determining how light bounces between objects in a scene. With support for near-infinite-length pixel shaders, and floating point filtering and blending, these incredibly complicated effects can be approximated in real time, bringing higher levels of photorealism to real-time applications.

Model courtesy of De Espona Infographica

Figure 8. Translucency and varied levels of light penetration can be created using subsurface scattering effects.

TB-01206-001_v01 03/26/04

CineFX 3.0: The Next Wave of Stunning Visual Effects

Figure 9.

CineFX 3.0 enables effects like soft shadows.

Conclusion
NVIDIA CineFX 3.0 is poised to unleash an unprecedented level of programming creativity. With full DirectX 9.0 Shader Model 3.0 support, the latest GeForce GPUs will soon power a new generation of games with unmatched realism, digital worlds with mind-blowing complexity, and lifelike characters that move through cinematic-quality environments. Previously, highly complex effects were not possible without sacrificing performance and precision. One cause was long shader programs that required many computational passes. Now, with the NVIDIA GeForce 6 Series, NVIDIA CineFX 3.0, and DirectX 9.0 Shader Model 3.0, groundbreaking effects can be created without compromising performance.

TB-01206-001_v01 03/26/04

10

Notice ALL NVIDIA DESIGN SPECIFICATIONS, REFERENCE BOARDS, FILES, DRAWINGS, DIAGNOSTICS, LISTS, AND OTHER DOCUMENTS (TOGETHER AND SEPARATELY, MATERIALS) ARE BEING PROVIDED AS IS. NVIDIA MAKES NO WARRANTIES, EXPRESSED, IMPLIED, STATUTORY OR OTHERWISE WITH RESPECT TO THE MATERIALS, AND EXPRESSLY DISCLAIMS ALL IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE. Information furnished is believed to be accurate and reliable. However, NVIDIA Corporation assumes no responsibility for the consequences of use of such information or for any infringement of patents or other rights of third parties that may result from its use. No license is granted by implication or otherwise under any patent or patent rights of NVIDIA Corporation. Specifications mentioned in this publication are subject to change without notice. This publication supersedes and replaces all information previously supplied. NVIDIA Corporation products are not authorized for use as critical components in life support devices or systems without express written approval of NVIDIA Corporation. Trademarks NVIDIA, the NVIDIA logo, CineFX, and GeForce are trademarks or registered trademarks of NVIDIA Corporation. Other company and product names may be trademarks of the respective companies with which they are associated. Copyright 2004 by NVIDIA Corporation. All rights reserved.

NVIDIA Corporation 2701 San Tomas Expressway Santa Clara, CA 95050 www.nvidia.com