Fuzzy Spotlight

Hi, i’m a Student diong an internship, i have a research assignment where the goal is to make a OpenGL 3D reprisentation of 2D MRI scanner data.
I am at the point that i have the model and all, but since the reprisentation is a hart chamber (left ventrikular) it’s in 1 color. The single color prevented seing depth, so i started working with lighting.

I have ambient light (works fine), and a stationary spotlight to create a shade in order to get depth. This works good but when i rotate the object arround the x or y axis then i see that the other side does not get illuminated even though the light is shining directly on it. It does however work with rotations arround the Z axis (unless already dark).

An example from another company of this viewing module can be found here : http://www.medis.nl/MainFrameProducts/Products/MriMass/MainFrameMASS.htm

The bands of the model are made up out of triangle strips and fan’s. and i do not use culling or resize or anything like that that could invalidate the normals.

Plz help me,… i tried everything.
I can’t find a solution

Just use 2 directional lights - each pointing in opposite directions.
Also, in your render loop, are you setting the lights position every frame? After your modelview rotation?

Originally posted by knackered:
Just use 2 directional lights - each pointing in opposite directions.
Also, in your render loop, are you setting the lights position every frame? After your modelview rotation?

i’m clearing the screen each frame and then create the model, do the rotation and then call the lighting display list

and i want to make the color differnces clear, but also not white or brown/black, i just hope to preserve a reddish color on the hart model while keeping a 3D look. I don’t know if this will work with directional lights

Set the light direction/position at modelview identity to get a headlight effect.

Originally posted by knackered:
Set the light direction/position at modelview identity to get a headlight effect.

At modelview identity ?
I need coordinates for the location so by setting it to the modelview identity do you mean the location of the ‘viewscreen’ ?

Here is some of the source code :
All OpenGL related code is in these 2 files
http://asp2.net/ravenmaster/view.c http://asp2.net/ravenmaster/LVA3DVMain.c