GLfloat LightAmbient[]= { 0.1f, 0.1f, 0.3f, 1.0f };
GLfloat LightDiffuse[]= { 0.5f, 0.5f, 0.5f, 1.0f };
GLfloat LightSpec[]= { 0.6f, 0.6f, 0.6f, 1.0f };
GLfloat LightPosition[]= { 0.0f, 0.0f, 50.0f,1.0f};
glLightfv(GL_LIGHT0, GL_AMBIENT, LightAmbient);
glLightfv(GL_LIGHT0, GL_DIFFUSE, LightDiffuse);
glLightfv(GL_LIGHT0, GL_SPECULAR, LightSpec);
glLightfv(GL_LIGHT0, GL_POSITION,LightPosition);
GLfloat Inf_LightAmbient[]= { 0.9f, 0.9f, 0.9f, 1.0f };
glLightModelfv(GL_LIGHT_MODEL_AMBIENT, Inf_LightAmbient);
glEnable(GL_LIGHT0);
glEnable(GL_LIGHTING);
The scene is under a sky-dome of dimensions: 50 High, 250 wide.
At the moment the scene looks Ok but lacks a natural regular brightness, one side under the skydome is darker than the other. I need advice on setting a global light setting than will light the whole scene naturally. Thanks.
Lighting Advice
I need to light a very large open sea scene. At the moment I`m using:
I want to do the source right !
I need to light a very large open sea scene. At the moment I`m using:
The scene is under a sky-dome of dimensions: 50 High, 250 wide.
At the moment the scene looks Ok but lacks a natural regular brightness, one side under the skydome is darker than the other. I need advice on setting a global light setting than will light the whole scene naturally. Thanks.
I need to light a very large open sea scene. At the moment I`m using:
GLfloat LightAmbient[]= { 0.1f, 0.1f, 0.3f, 1.0f };GLfloat LightDiffuse[]= { 0.5f, 0.5f, 0.5f, 1.0f };GLfloat LightSpec[]= { 0.6f, 0.6f, 0.6f, 1.0f };GLfloat LightPosition[]= { 0.0f, 0.0f, 50.0f,1.0f}; glLightfv(GL_LIGHT0, GL_AMBIENT, LightAmbient); glLightfv(GL_LIGHT0, GL_DIFFUSE, LightDiffuse); glLightfv(GL_LIGHT0, GL_SPECULAR, LightSpec);glLightfv(GL_LIGHT0, GL_POSITION,LightPosition);GLfloat Inf_LightAmbient[]= { 0.9f, 0.9f, 0.9f, 1.0f };glLightModelfv(GL_LIGHT_MODEL_AMBIENT, Inf_LightAmbient);glEnable(GL_LIGHT0);glEnable(GL_LIGHTING);
The scene is under a sky-dome of dimensions: 50 High, 250 wide.
At the moment the scene looks Ok but lacks a natural regular brightness, one side under the skydome is darker than the other. I need advice on setting a global light setting than will light the whole scene naturally. Thanks.
dont use lighting on your skydome.
for your sea have one directional light in your scene that'll serve as the sun
someit like
GLfloat LightAmbient[]= { 0.1f, 0.1f, 0.1f, 1.0f };
GLfloat LightDiffuse[]= { 1.5f, 1.5f, 1.5f, 1.0f };
GLfloat LightPosition[]= { 0.0f, 1.0f, 0.5f, 0.0f };
maybe make the 1.0 above -1.0
Edited by - zedzeek on September 18, 2000 6:30:46 PM
for your sea have one directional light in your scene that'll serve as the sun
someit like
GLfloat LightAmbient[]= { 0.1f, 0.1f, 0.1f, 1.0f };
GLfloat LightDiffuse[]= { 1.5f, 1.5f, 1.5f, 1.0f };
GLfloat LightPosition[]= { 0.0f, 1.0f, 0.5f, 0.0f };
maybe make the 1.0 above -1.0
Edited by - zedzeek on September 18, 2000 6:30:46 PM
"one side under the skydome is darker than the other"
Looks like you're lighting the skydome, glPushAttrib(GL_LIGHTING_BIT) the lights and draw the skydome, after that do glPopAtrib() and draw other stuff.
Ah, zedzeek was 3 min earlier
Edited by - richardve on September 18, 2000 6:33:51 PM
Looks like you're lighting the skydome, glPushAttrib(GL_LIGHTING_BIT) the lights and draw the skydome, after that do glPopAtrib() and draw other stuff.
Ah, zedzeek was 3 min earlier
Edited by - richardve on September 18, 2000 6:33:51 PM
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement