Material colors and lighting

View previous topic View next topic Go down

Material colors and lighting

Post  matt on Wed Oct 01, 2008 6:15 pm

When I enable lighting using glEnable(GL_LIGHTING), material colors seem to be ignored. I'm not an OpenGL expert, so: is this correct?

Best,
Matt

Edited: I meant material colors, not vertex colors.

matt

Posts : 155
Join date : 2008-09-30

View user profile http://elfrun.net

Back to top Go down

Re: Material colors and lighting

Post  sio2interactive on Thu Oct 02, 2008 6:00 am

Try to use the build in lighting method that I demonstrate in the tutorial08.
avatar
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 37
Location : Shanghai

View user profile http://sio2interactive.com

Back to top Go down

Re: Material colors and lighting

Post  matt on Thu Oct 02, 2008 3:34 pm

Thanks, the important thing was to use sio2LampEnableLight. It seems to work now for materials which only have a color. A textured object isn't colored by a lamp at all. Do you have another clue what I should look after?

Best,
Matt

matt

Posts : 155
Join date : 2008-09-30

View user profile http://elfrun.net

Back to top Go down

Re: Material colors and lighting

Post  sio2interactive on Thu Oct 02, 2008 4:17 pm

Hummm maybe review tutorial08 and try to find out what you are doing differently... Cuz in that tutorial as you can see the floor & walls are textured and you can see the difference when the light pass on top of it. Maybe double check your face normals? And use "set smooth" or "set solid" depending on region and the appropriate type of normal will be exported.
avatar
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 37
Location : Shanghai

View user profile http://sio2interactive.com

Back to top Go down

Re: Material colors and lighting

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum