Hi all,
here my second request, howto give a surface a metalic effect, but not as blinking as chrome.(like the metal of a CD-Deck)
Thanx,
Daniel.
Hi all,
here my second request, howto give a surface a metalic effect, but not as blinking as chrome.(like the metal of a CD-Deck)
Thanx,
Daniel.
same as before. use chroming approach.
metallic appearance is primarily perceived from the shininess of a surface, in particular from the size of the specular highlights.
moreover, metallic surfaces have a highlight color depending also on the material.
dielectrics like plastic instead have the highlight color equal to that of the light shining on them.
normally
let’s try to simulate a copper appearance.
use a diffuse texture where the average color is about (0.8,0.51,0.33)
the chrome texture has to be blended with the metallic specular color, about (1,0.7,0.6).
the previous code will became something like:
glDepthFunc(GL_LEQUAL);
glDisable(GL_TEXTURE_2D);
glDisable(GL_BLEND);
glDisable(GL_TEXTURE_GEN_S);
glDisable(GL_TEXTURE_GEN_T);glColor3f(0.8,0.51,0.33);
glEnable(GL_TEXTURE_2D);
glEnable(GL_BLEND);
glBlendFunc(GL_ONE,GL_ONE);
glEnable(GL_TEXTURE_GEN_S);
glEnable(GL_TEXTURE_GEN_T);
glTexGeni(GL_S,GL_TEXTURE_GEN_MODE,GL_SPHERE_MAP);
glTexGeni(GL_T,GL_TEXTURE_GEN_MODE,GL_SPHERE_MAP);
glBindTexture(GL_TEXTURE_2D,texid_chrome);glColor3f(1,0.7,0.6);
note that there is not a way to be sure that a particular metodology of rendering will show up a desired appearance.
in computer graphics, quantities such as colors, lighting and the like have to be tested and optimized to achieve the best result.
Dolo//\ightY
[This message has been edited by dmy (edited 03-13-2000).]
Again Tahnk you,
regards,
Daniel.