monster w/ glowing parts

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

Locked
User avatar
Eriance
Posts: 150
Joined: Wed Mar 29, 2006 19:36
Location: Everywhere and nowhere
Contact:

monster w/ glowing parts

Post 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?
User avatar
Paul
DRD Team Admin (Inactive)
Posts: 1058
Joined: Thu Jun 30, 2005 13:30
Location: Poland - Grojec / Radom
Contact:

Post 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 :(
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post 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?
User avatar
Graf Zahl
GZDoom Developer
GZDoom Developer
Posts: 7148
Joined: Wed Jul 20, 2005 9:48
Location: Germany
Contact:

Post 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.
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post 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.
User avatar
Paul
DRD Team Admin (Inactive)
Posts: 1058
Joined: Thu Jun 30, 2005 13:30
Location: Poland - Grojec / Radom
Contact:

Post by Paul »

Not really that hard to make, even for a full set of sprites. I second NJ there.
User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

Post 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?
DaniJ
Posts: 130
Joined: Sat Oct 08, 2005 19:22

Post 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.
User avatar
Paul
DRD Team Admin (Inactive)
Posts: 1058
Joined: Thu Jun 30, 2005 13:30
Location: Poland - Grojec / Radom
Contact:

Post by Paul »

DaniJ wrote:(...)8)
You sir rule :)
User avatar
wildweasel
DRD Team Admin (Inactive)
Posts: 2132
Joined: Wed Jun 29, 2005 22:00
Location: the Admincave!
Contact:

Post 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).
User avatar
Zeg-Vok
Posts: 233
Joined: Wed Sep 21, 2005 18:04
Location: Up the creek without a paddle
Contact:

Post by Zeg-Vok »

Alpha Channels perhaps?
User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

Post 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. :/
Locked

Return to “GZDoom”