My Account


RSS
oZone3D.Net RSS Feeds»RSS 2.0 Feeds

Blogs
»The Geeks Of 3D
»Demoniak3D Blog
»JeGX's Infamous Lab

Sponsors

Modul8: real time video mixing and compositing


Link to Us

oZone3D.Net 100% Realtime 3D

»All Links

Search
Google
Web
oZone3D.Net

Web Partners

www.benchmarkhq.ru
www.tdt3d.com
www.steph3d.net
www.g-truc.net
www.worldpcspecs.com


Banners Exchange

cgindia.blogspot.com
grapejuice.c.la
www.game-lab.com
www.cooki3d.org


Links Exchange

»CYGAD's 3DXtra
 
Vertex Displacement Mapping using GLSL

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

Initial draft: March 26, 2006
Update: November 5, 2006
Update: November 22, 2006


[ Index ]

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

»Next Page



2 - Principle of Displacement

The basic element for the deformation is the vector queried from the displacement map. This vector usually holds either a RGBA-color or a scalar color (gray level height map). We will use this vector and more precisely the sum of its components as a factor to change the vertex position. One of the common methods is to move the vertex position along its normal proportionately to the previous factor.



Fig. 3 - Displacement principle

The schema of the figure 3 can be summed up by the following relation:

P1 = P0 + (N * df * uf)

where P0 is the original position of the vertex, P1 the vertex position after displacement, N the vertex normal vector, df the normalized displacement factor (i.e [0.0; 1.0]) and uf an user scaling factor. df can be get with the following relation which converts a RGB value to a grey value:

df = 0.30*dv.x + 0.59*dv.y + 0.11*dv.z

where dv is the vector fetched from the displacement map for the current processed vertex.

Now that the theory is okay, let's go to the practice...





[ Index ]

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

»Next Page







Language:


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


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


FurMark
Current Version: 1.3.0
»FurMark
»Benchmark Submissions
Page generated in 0.11806392669678 seconds.