Qhimm.com Forums

Miscellaneous Forums => Scripting and Reverse Engineering => Topic started by: sfx1999 on 2004-09-14 05:04:59

Title: OpenGL Fullbright textures?
Post by: sfx1999 on 2004-09-14 05:04:59
Does anyone know how to do fullbright textures in OpenGL? Like in Quake when a player moves into a shadow, you can still see light-emitting stuff around his eyes that don't actually emit light.
Title: OpenGL Fullbright textures?
Post by: mirex on 2004-09-14 08:32:18
Hmm one idea that comes to my mind (i dont know if it is possible on OpenGl) that texture is paletted, and palette values are changed depending on light, but one palette colour (red eyes) aren't changed.
I know that Quake1 was software rendered and later there was OpenGl release, does it work in both versions ?
Title: OpenGL Fullbright textures?
Post by: qwerty on 2004-09-14 13:24:38
Hmm... I didn't know OpenGL even supported fullbrights. :-?

Fullbrights are just a lighting feature though. They just seem to emit light in shadows but look the same in light. Am I right?
Title: Re: OpenGL Fullbright textures?
Post by: Cyberman on 2004-09-14 16:16:34
Quote from: sfx1999
Does anyone know how to do fullbright textures in OpenGL? Like in Quake when a player moves into a shadow, you can still see light-emitting stuff around his eyes that don't actually emit light.

You have a few options for this.  I suggest the Texture Blending option. IE blend two textures together. In this case you have a texture that's darkened by shading. You just need to 'white' out the eye area and apply your full bright texture.  If you are using OGL's light shading this won't work though.

The next option is to use a seperate set of polygons with the bright eyes and disable shading for when those are sent to the screen.  The texture needs to be transparent save where the eyes glow. It sounds simple BUT you need a new set of polygons firstly, secondly they need to float just in front of where they are glowing.

Either way adds complication to what you are doing of course.

Cyb
Title: OpenGL Fullbright textures?
Post by: sfx1999 on 2004-09-14 22:36:05
Man I am such an idiot. Why did I post this and not look at the source code which I already downloaded?

Anyway, Mirex, yes there is a palette that defines what is fullbright, but GLQuake works on cards without support for paletted textures.

I just looked at Quake code and couldn't figure it out. I guess it might just change the lightmap dynaically. As for models and brush entities, I'm stumped. They are rendered differently.
Title: OpenGL Fullbright textures?
Post by: Cyberman on 2004-09-15 05:47:21
Didn't they leave some GL quake bits in there?
Hmmmm I'll have to looked at the Quake source floating around.
This reminds me of when the source for duke nukem came out.
I died laughing when I saw shots from a Linux box of Duke blowing things away. Gosh that makes me happy :)

Are you attempting to make a Quake Engine or one that's Quake like?

Cyb