Page 1 of 1

monster w/ glowing parts

Posted: Tue May 09, 2006 13:32
by Eriance
Does GZdoom support sprites were a certain color is always bright? Duke 3d has monsters where their eyes or all the red colors or green colors glow (uneffected by light). Cant Gzdoom do this, maybe through PNG's and alpha channels?

Posted: Tue May 09, 2006 13:51
by Paul
In Software renderer, which relies on the colormap, that is possible. Colormap is a lump that matches specific pallette's indexes (colors) onto colors in the game, depending on the light level the color is in (in light diminishing. Technique used in Build's games, Doom games and RoTT. Prolly something else as well).
In plain english-Colormap lump informs the engine that white, in darkness, becomes grey, then black. If one would adjust the colormap so specific colors (like red) are mapped as the same color despite the light level-then you would achieve full bright color in all light values, which would produce your desired effect.

DSV 5 uses this:
http://www.doomworld.com/idgames/index.php?id=12361

In OpenGL (in Gzdoom) the renderer doesn't use the colormap to produce the light sourcing, which results in much better visuals. The sacrifice is the fullbright pixels effect (that and colormap-based fog, though fog can be still done in OpenGL).

Sorry, impossible :(

Posted: Tue May 09, 2006 14:04
by Enjay
Perhaps impossible via a colormap, but surely other ways would be possible? eg JDoom has some way of defining parts of certain textures to be able to glow (eg the little green and red pixels on some of the TEKWALL textures have a light associated with them somehow). Perhaps the same principle can be extended to sprites?

Posted: Tue May 09, 2006 14:07
by Graf Zahl
It would be possible with overlays. But you'd have to create a second texture for each object that uses such an effect.

Posted: Tue May 09, 2006 15:06
by Enjay
I guessed that would be the case. Presumably it'd be something like a sprite of the same size but all black, or transparent, or something, and with the appropriate part picked out in suitable colours? Fairly quick to do for textures, a bit of a tedious task for full sprite sets (although I guess most would only require gun flashes and so on), but not difficult and certainly something I'd like to have as an editing option.

Posted: Tue May 09, 2006 15:29
by Paul
Not really that hard to make, even for a full set of sprites. I second NJ there.

Posted: Tue May 09, 2006 16:27
by Nash
I would certainly like glowing parts for monster models as well.

I guess the only way to do this is if GZDoom supports Quake 3-style shaders?

Posted: Tue May 09, 2006 17:24
by DaniJ
Theres no reason why this can't be done automatically by the engine. For example, you already have the palatte colour translation working in hardware (correct?) so you could do something similar which then creates the "mask" dynamically and then use multitexturing.

Sure, an intergrated Quake3 style shader (!fragment shader) system would allow for this and be more flexible.

Another option is (as mentioned) to use addtional geometry + texture + blend mode. Or you could write only those glowing pixels to a color buffer, grab the buffer as a texture, and then do a fullscreen additive pass. You could save a copy of the buffer, blur and then combine with the other buffer and then do the fullscreen pass to get a bloom effect too 8)

In theory you could also write a fragment shader for this too.

Posted: Tue May 09, 2006 17:41
by Paul
DaniJ wrote:(...)8)
You sir rule :)

Posted: Tue May 09, 2006 18:40
by wildweasel
I've wanted something like this on weapons for who knows how long. With this, I could make a weapon with little lights and displays on it that glow in the dark (like the ones in Doom 3).

Posted: Wed May 10, 2006 3:42
by Zeg-Vok
Alpha Channels perhaps?

Posted: Wed May 10, 2006 17:30
by Nash
I'd use this for special effets on monsters.

Got the inspiration while playing Prince of Persia - The Two Thrones.

The bloom effets will probably make the CPU crawl though. :/