Concept:
Project 1 basically allows us to play with different variety
of shaders and implement them on a head model provided by Andy. I tried
to keep to theme of effects of heat/fire, but have not been able to integrate
the shaders to produce the theme exactly.
Tools Used:
- Microsoft Visual Studio 8
- OpenGL/ GLSL package
Description:
The project consists of a head model and different shaders
that I have used to implement some basic effects. Each effect has been
described below.
- Toon Shading with Directional Lighting
- This involves setting color of the model according
to the specular intensity of the surface. It also has a directional
lighting model which calculates the ambient, diffuse and specular value
and applies it to the model color. It has two fragment shaders written,
one for toon shading and the other for calculating light intensity consisting
of all components (ambient, diffuse and specularity) and applying it
to the toon shading colors.
- Blur
Index is value is calculated from the vertex
positions (x,y) and passed to the fragment shader where it applies
takes pixel values from 12 neighbour pixels, sums them and averages
them to give the current pixel a color from the texture map.
-
To give a Fire Effect I wrote a particle system
class which sends out 300 partilces (small quads) every frame and updates
their position according to the velocity and acceleration. The fragement
shader uses GLSL alpha map and multitexturing feature.
Problem: This was to be used to give an effect
of a burning head by trying to capture the values of colors according
to the moving textures every frame and map onto the head to give a more
real head burning effect. For this need to get the texture colors from
the fragment shader and send it to the application again and map the
texture coordinate onto a 128x128 texture.
Hence could not integrate the particle system
as per the plan.
Download:
The code can be downloaded from the following - project1
|