Game Development Community

Decal textures with lighting?

by Eric Hartman · in Technical Issues · 08/07/2005 (4:52 pm) · 2 replies

This is for my LEGO game, [url="http://www.blockland.us"]Blockland[/url].

What I'm trying to do is have a decal painted on the lego guy's chest and be able to change the color of his chest independantly of the decal texture.

The way I'm doing it right now is :
glEnable(GL_COLOR_MATERIAL);
glColor4f(<the color I want his chest to be>);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);
Then the texture decal texture has an alpha channel that allows the color to show through.
It works, but the problem is that the decal texture glows in the dark
www.blockland.us/blockland/decalprob.jpg
I understand that this is the just way GL_DECAL works, so my question is: Is there another way to achieve this effect that will avoid the "glow in the dark" problem.

#1
08/07/2005 (6:35 pm)
Cool, the Lego license must have been a fortune tho?
#2
08/09/2005 (2:39 pm)
Thats not really the issue here, but I think I have the license issues worked out. I'll know for sure next week.