PDA

View Full Version : Lighting



ssaunders
11-03-2000, 06:49 AM
Firstly, sorry for cross posting but I`m not sure if this is advanced or not !?

I am trying to create a realistic planet simulation. I have managed to get most of it to work pretty well, although the lighting is not really realistic enough.

I need to implement a lighting model that incorporates backscatter to make it truly realistic. I was wondering if anyone knows how/if it is possible to change the default lighting model in opengl.

Thanks,
Steve

Dodger
11-03-2000, 09:50 AM
what do you mean by backscatter?

ssaunders
11-03-2000, 09:58 AM
Firstly there are two vectors, (camera to point) and (sun to point). Backscatter is the idea that there is more light reflected when the angle between them is smallest.

It is required to make the planet surface realistic, as there are tiny metalic fragmets on the moons surface, that reflect some light back to where it originated.

Thanks for any help,
Steve

BBrown
11-03-2000, 10:46 AM
Sounds like you just need to set the specular reflection of these moons surfaces and its shininess.
GLfloat mat_specular[] = { 1.0, 1.0, 1.0, 1.0 };
GLfloat mat_shininess[] = { 50.0 };
glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular);
glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess);

I think this is the basic idea.

Brian