My Account


RSS
oZone3D.Net RSS Feeds»RSS 2.0 Feeds

Blogs
»Demoniak3D Blog
»JeGX's Infamous Lab

Sponsors


Link to Us

oZone3D.Net 100% Realtime 3D

»All Site's Network

Visitors Map

 
Vertex Displacement Mapping using GLSL

By Jerome Guinot aka 'JeGX' - jegx [at] ozone3d (dot) net

Initial draft: March 26, 2006
Update 3: September 30, 2008
Update 2: November 22, 2006
Update 1: November 5, 2006


[ Index ]

Introduction | Page 2 | Page 3 | Page 4 | Conclusion

»Next Page



Stumble it! | | | |





1 - Introduction

2 - Displacement Principle

3 - Displacement Vertex Shader

4 - The problem of Normals

5 - Conclusion

6 - Further Resources

7 - Downloads




1 - Introduction

Vertex Displacement Mapping or simply Displacement Mapping is a technique allowing to deform a polygonal mesh using a texture (displacement map) in order to add surface detail. The principle is not new, it is even the basis of number of terrain generation algorithms (see the Terrain Generator GLUT project). The new thing is the use of the GPU to achieve in real time the mesh deformation.


Update: November 5, 2006:

The displacement mapping involves a graphics controller that allows to access at least to one texture unit inside the vertex shader. The access to a texture inside the vertex shader is called Vertex Texture Fetching. The shader model 3.0 imposes that at least 4 texture units are accessible inside the vertex shader. Currently, only the graphics controllers based on nVidia Geforce 6, Geforce 7 and higher support the Vertex Texture Fetching. ATI graphics controllers do not support the Vertex Texture Fetching even for the latest high-end models such as the X1950XTX (for more explanation see here: ATI X1900XTX and VTF).


Update: November 22, 2006:

It seems that there are some problems with the Forceware graphics drivers 91.xx and 93.xx. The older drivers (84.xx) or the latest (96.xx) work properly (see the following topic for more detail: Vertex Displ. Mapping on Demoniak3D Forum).


Update: September 30, 2008:

Vertex texture fetching is now available on radeon: ATI Catalyst 8.10 Fixes the Displacement Mapping Bug in OpenGL @ Geeks3D.

The GPU Caps Viewer tool will allow you to quickly know the number of accessible texture units inside a vertex shader :



Fig. 1 - Number of Texture Units Inside a Vertex Shader

This information can be get in OpenGL using the constant:
GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB.

Figure 2 shows the rendering of the project that comes with this tutorial (available at the end of this page). We will use the Demoniak3D platform in order to quickly code the displacement mapping demo.



Fig. 2 - DEMO_displacement_mapping.xml

The different demos use the GLSL (OpenGL Shading Language) for shaders coding.

OpenGL.org





[ Index ]

Introduction | Page 2 | Page 3 | Page 4 | Conclusion

»Next Page







Language:

3D Graphics Search Engine:

The Geeks Of 3D



Demoniak3D
Current Version: 1.23.0
»Demoniak3D
»Download
»Libraries and Plugins
»Demos
»Online Help - Reference Guide
»Codes Samples


GPU Caps Viewer
Current Version: 1.7.0
»GPU Caps Viewer
»GPU DB Submissions


FurMark
Current Version: 1.6.5
»FurMark
»Benchmark Submissions


PhysX FluidMark
Current Version: 1.0.0
»PhysX FluidMark
»Benchmark Submissions


Geeks3D News


Misc
»Texture DataPack #1
»Asus Silent Knight CPU Cooler


Announces


Modul8: real time video mixing and compositing

Page generated in 0.088652849197388 seconds.