Re: Materials with textured objects.

New Message Reply Date view Thread view Subject view Author view

From: Desmond Germans (desmond++at++nat.vu.nl)
Date: 11/30/2000 04:53:12


> I read the descriptions in the OpenGL book about specular color and shininess, etc. I understand that for colored objects. Is is possible to do anything useful with the material, if it is a textured object?
>
> Does it depend on the texenv settings?
>
> Thanks.

For non-textured objects, the diffuse and specular lighting is
calculated per vertex. If you apply texture to this (with any glTexEnv
setting), the texture will be applied _after_ these calculations. What
you want is to have the lighting be calculated in two parts, one for
diffuse and one for specular reflection, and in _between_ there apply
texturing. OpenGL does not support this by default, but if your system
supports the EXT_separate_specular_color extension, you can play with
that to achieve correct lighting, with textures.

Grtz,
                Desmond.
                

----
Desmond Germans                            VR Research / Dept. of
Physics-Applied Computer Science
desmond++at++nat.vu.nl                                                      
Vrije University Amsterdam
                                                                                  
The Netherlands


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Thu Nov 30 2000 - 04:53:43 PST

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.