Author Topic: OpenGL Fullbright textures?  (Read 5792 times)

sfx1999

  • *
  • Posts: 1142
    • View Profile
OpenGL Fullbright textures?
« 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.

mirex

  • *
  • Posts: 1645
    • View Profile
    • http://mirex.mypage.sk
OpenGL Fullbright textures?
« Reply #1 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 ?

qwerty

  • *
  • Posts: 251
    • View Profile
OpenGL Fullbright textures?
« Reply #2 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?

Cyberman

  • *
  • Posts: 1572
    • View Profile
Re: OpenGL Fullbright textures?
« Reply #3 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

sfx1999

  • *
  • Posts: 1142
    • View Profile
OpenGL Fullbright textures?
« Reply #4 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.

Cyberman

  • *
  • Posts: 1572
    • View Profile
OpenGL Fullbright textures?
« Reply #5 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