Archived

This topic is now archived and is closed to further replies.

Emilio

Vertex Color and Lighting

Recommended Posts

here''s the prob... the color of my vertices are not used on the lighting calculations... how can i fix it?? thanks in advance

Share this post


Link to post
Share on other sites
enable lighting, enable a light, set the light color, position, etc. set the normal for the vertices. end of discussion.

if you want more information on lighting, check out the OpenGL programmer''s guide. http://ask.ii.uib.no/ebt-bin/nph-dweb/dynaweb/SGI_Developer/OpenGL_PG/

To the vast majority of mankind, nothing is more agreeable than to escape the need for mental exertion... To most people, nothing is more troublesome than the effort of thinking.

Share this post


Link to post
Share on other sites
hi, thanks for the link...

now, i dont think you got what the prob is... lets say i have a mesh with all colors in red... if i disable lighting, it shows it all red, with the ligh enabled, its not even a lil bit red, so im assuming im missing something.

Share this post


Link to post
Share on other sites
well i''m not sure. things to check for, would be, where is your light in the world space? what is your light color (ambient & diffuse)? do you have face culling enabled? if so, back face culling, front face culling? what''s front face, clockwise, counter clockwise? are your normals set properly? if your not using color material, disable it?

if you want to paste some source, it may help?

To the vast majority of mankind, nothing is more agreeable than to escape the need for mental exertion... To most people, nothing is more troublesome than the effort of thinking.

Share this post


Link to post
Share on other sites
>> the color of my vertices are not used on the lighting calculations<<

see the faq at www.opengl.org (section lighting + MATERIALS )

http://uk.geocities.com/sloppyturds/gotterdammerung.html

Share this post


Link to post
Share on other sites