🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Lighting 3D objects created with 3D Explorer

Started by
2 comments, last by steve_bruce 24 years ago
Has anyone had any problems getting lighting to work on objects created using 3D Explorer. Textured objects I have converted using 3D Explorer and used in an OpenGL app seem to be evenly lit all over and adding lights to the scene doesn''t seem to affect the objects, even though textured objects I create manually are affected by the lights in the scene. However when I convert an object using 3D Explorer that doesn''t have any textures are affected by the light and look properly lit in the scene. Has anyone had the same problems or know if I''m doing something wrong.
Advertisement
I don''t know anything about 3d Explorer, but it sound like you just need to change the texture environment so the texture doesn''t overwrite the lighting colors.

I responded to a similar problem (the opposite actually) on a different board and thread:

Topic : Mandatory OpenGL gamma on textures?

Similar explanation, except that you want to change to GL_MODULATE so the texture is blended over the lit vertex colors.

glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);

Here''s a man page on glTexEnv that gives more details on other env_modes if you''re interested. (it''s 1.1 so it doesn''t talk about ARB multitexture like I mentioned in the other post)

glTexEnv man page


Of course, the problem could be something else (not converting normals with tex coords), but this is worth checking.



Scott Franke [druid-]
sfranke@gljournal.org
druid-'s GL Journal
http://www.gamedev.net/opengl
there is a struct for texture properties in the code if you outputted to a display list. i had noticed that the datatype that defined the vector for EMISSION properties was set to <1.0, 1.0, 1.0>, and i had turned this down to <0,0,0> and it reflected the textures properly. apparently, when i converted to open gl code, the emission was set to fully on, but i''m not sure if this is the case for every export that is performed. check it out and see if i''m right.

a2k
------------------General Equation, this is Private Function reporting for duty, sir!a2k
Excellent.

Thanks a lot. You were right. I turned the emission down to 0.0f,0.0f,0.0f and it worked like a dream.

This topic is closed to new replies.

Advertisement