In this project I tried to create a villain.I took the idea from Batman  villain- "Two Face".I tried to replicate the villainous and evil look  of Two Face , it doesn't look that scary but its ok for the moment. I also added a wall cutting the face which can be made to disappaer by pressing '2'.It has a shimmering effect added to it. Also the villain is made to fall in the pit of darkness using animation, which is true for all villains, they end up in pits.
I used 7 shaders in total - 3 Vertex Shaders and 4 Fragment Shaders, they are listed below:-

Face1.vert
Face1.frag

Used for environmental mapping , also for accessing various parts of the face  for modification.
I used them as base shaders where effects from all other shaders were combined.


Face2.frag

Toon shader file modified to  make the face cutting wall (See screenshots below) disappear for low intensity areas. Also I vary the toon colour based on intensity values and add a sine function to it to give a fluctuating,reddish,glowy light effect.

Face2.vert

Vertex Shader for bump mapping with shimmering effect(not passing the  light position produces the shimmering effect).

Face3.frag

This shader uses "Lena Image" as texture to produce really greatly "skin looking" texture.I got this by combining the texture color with the fragments color.(Mentioned  at http://www.lighthouse3d.com/opengl/glsl/index.php?textureComb).

Face3.vert

This is the modified particle system vertex file used  to produce falling animation.

Face4.frag

This file is the bump mapping fragment shader.




RAJAT_MAHAJAN_Project 1.rar RAJAT_MAHAJAN_Project 1.rar
Size : 4484 Kb
Type : rar


I was able to compile these under Windows Vista using Visual C++ 2008 by making a command line project and adding glut.h, glut32.lib, glut32.dll, GL/glew.h, glew32.lib, glew32.dll to the project directory, and adding glew32.lib and glut32.lib to Object/library modules inside visual studio.

To compile under visual studio 2008 under Vista I needed to grab glext.h and add it into the standard visual studio include files. I added -DCONF_NO_PNG -DCONF_NO_JPG to the C/C++ section of the Project settings so the object loader wouldnt need those libraries.

Make a Free Website with Yola.