University of Bergen | Faculty of Mathematics and Natural Sciences | Department of Informatics | Visualization Group
Visualization
You are here: Department of Informatics > Visualization Group > Teaching > INF359 (VISUAL2): Selected Topics in Visualization
 Visualization
 > about
 > team & contact info
 > research
 > teaching
 --- > INF359: vis-special
 > seminars
 > resources
 > network
 > events
 > links
Course INF359 (VISUAL2): Selected Topics in Visualization (utvalde emner i visualisering)
Programming assignment 1 INF359

I have 3 shaders that are working, cartoon, cool to warm and simple contours.

Cartoon shading have been implemented by changing the diffuses light.
The diffuse light from the dot-product between the light and normal
vectors define which of 3 values I set diffuse light to,
diffuse light > .8 are set to 0.8
diffuse light between .8 and .2 are set to 0.6
diffuse light below .2 are set to 0.4

Cool to warm shading is the easiest one, I used equation 2 from
gooch_npr_lighting_model paper, and set diffuse lighting to 1.0.

Simple Contours are if the dot product between lightvector and normal
are equal to zero or close to it. I have a slider for selecting limit
for contours, range from 0 to 0.5. The model can be set to white, or
one can keep the color from the color range (from environments)

The fourth selection under shader is not finished.

Its possible to lock the light in relation to the model, so that
lightvector are set to (-1, -1, 0), by using the variable LockLight



Cartoon shading with lightvector (-1, -1, 0)
cartoon_1.avi


Cartoon shading where lightvector is the same as viewvector
cartoon_2.avi


Cool to warm shading where lightvector is the same as viewvector
cooltowarm_1.avi


Cool to warm shading with lightvector (-1, -1, 0)
cooltowarm_2.avi


Contour where dotproduct <= 0.0 are black
simplecontours_1.avi


Contour where dotproduct <= 0.1 are black
simplecontours_2.avi


Contour where dotproduct <= 0.306 are black
simplecontours_3.avi




 Last change: Jean-Paul Balabanian