Forum

gelmap

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

gelmap

Postby leileilol » Mon Oct 25, 2010 12:32 am

d_polyse.c has this funny dummied out code with a 256 byte lookup table found under a #if 0. If you initialize it and try it, it'll remap the color of the model to a shade initialized by the gel lookup, sort of like an early colormod. Comment out the line before it, and it's an instant blend.

Is it useful for anything? (other than perfectly recreating the same exact lost Quake menu effect unseen in ports and official versions for 11 years since v1.08 came out and took it away)
Image


Makes me wonder what id software was planning with that. Transparent spawns? Blood splatter? (the commented "/* 64 */" suggests that)

maybe it was used for item_deathball
i should not be here
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Postby scar3crow » Mon Oct 25, 2010 12:46 am

Oooh that looks very nifty, I'll see if I can ask Romero about that.

I love visuals like that, probably part of why I love ZDoom.
...and all around me was the chaos of battle and the reek of running blood.... and for the first time in my life I knew true happiness.
User avatar
scar3crow
InsideQC Staff
 
Posts: 1054
Joined: Tue Jan 18, 2005 8:54 pm
Location: Alabama

Postby leileilol » Mon Oct 25, 2010 12:57 am

I know! Palette lookup tables are FUN when they work the way you want them to!
i should not be here
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Postby mh » Mon Oct 25, 2010 1:17 am

Yeah, there's some really cool things you can do with software Quake that GLQuake just isn't in the same league of; at least without pixel shaders (you actually can't accurately replicate software Quake's renderer in any hardware API without pixel shaders.....)
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Postby Downsider » Mon Oct 25, 2010 2:04 am

Actually the PSP has a nifty 32-bit index weird thingie in it's API that let's you achieve black-and-white/nightvision/other colormod effects with some obscure commands. I don't know much about it but I do know that some rendering libs for the PSP make use of it.
User avatar
Downsider
 
Posts: 621
Joined: Tue Sep 16, 2008 1:35 am

Postby qbism » Mon Oct 25, 2010 4:46 pm

Would be a good way to indicate invisibility, along with some wooshy sound effect. Or maybe I watched LOTR too many times.

And green for enviro suit etc. etc. Might be easier on the eye than the hazy-green effect.
User avatar
qbism
 
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am

Postby frag.machine » Mon Oct 25, 2010 4:53 pm

This blue tint would be a good visual effect for "quad damage vision".
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2090
Joined: Sat Nov 25, 2006 1:49 pm

Postby scar3crow » Mon Oct 25, 2010 10:12 pm

John Romero wrote:i remember seeing the effect during dev but we had no place to use it
...and all around me was the chaos of battle and the reek of running blood.... and for the first time in my life I knew true happiness.
User avatar
scar3crow
InsideQC Staff
 
Posts: 1054
Joined: Tue Jan 18, 2005 8:54 pm
Location: Alabama

Postby mh » Mon Oct 25, 2010 10:52 pm

There would be problems with blending different colour shifts together - what would happen if you had both the Quad and the Pent, for example?

Might be useful for a night goggles effect though.
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Postby qbism » Mon Oct 25, 2010 11:05 pm

Quad and the Pent
Purple, according to Blues Clues :p
User avatar
qbism
 
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am

Postby Spike » Tue Oct 26, 2010 1:54 am

Beware the purple glow!

Thing is though, that most things can be done by shifting the palette. Its really only useful when you want to shift the palette without affecting the hud, I suppose.
So its use for quad/etc is easier/faster by switching palette slightly.
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: gelmap

Postby mankrip » Sat Nov 20, 2010 4:18 pm

leileilol wrote:[...] perfectly recreating the same exact lost Quake menu effect [...]
Image

Are you sure? There's a big loss of detail in that screenshot. I've just googled for some old Quake menu screenshots, and found none.

I thought Id Software used to just remap the pixels in realtime, like I did here, which would also explain why they removed it later. If that's not the case, then maybe they removed it due to the loss of detail in the gelmap table.

[edit] Found a decent screenshot at a warez site. Yeah, they used the gelmap.
Ph'nglui mglw'nafh mankrip Hell's end wgah'nagl fhtagn.
==-=-=-=-=-=-=-=-=-=-==
Dev blog / Twitter / YouTube
User avatar
mankrip
 
Posts: 915
Joined: Fri Jul 04, 2008 3:02 am

Postby leileilol » Sat Nov 20, 2010 9:52 pm

I think they killed the menu tint in 1.07 because WinQuake was in progress, and Scitech MGL *HATES* lookups. There is a definite huge performance hit if you don't use -dibonly.

I only illustrated it in blue to show that it works and can be changed.
i should not be here
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Postby Sajt » Sun Nov 21, 2010 3:46 pm

You don't have to use lookups, of course, if you do it the hard way... (only stuff that would be slower is stuff that doesn't normally use colormap, like water and sky and maybe sprites)
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
Sajt
 
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Postby mankrip » Sun Nov 21, 2010 4:18 pm

I'm going to implement lit sprites, so this shouldn't be a problem for them.

But yeah, water and skies can be tricky. One alternative is to recalculate the color blending maps so they include the color shifting, but this won't work for opaque and stippled liquids/skies.

For the opaque/stippled ones, the best way is probably to create separated drawing functions that uses the colormap, so the engine can switch to those functions when the tinting effect is active.

[edit] Actually, the HUD would require some alternate drawing functions too.
Ph'nglui mglw'nafh mankrip Hell's end wgah'nagl fhtagn.
==-=-=-=-=-=-=-=-=-=-==
Dev blog / Twitter / YouTube
User avatar
mankrip
 
Posts: 915
Joined: Fri Jul 04, 2008 3:02 am

Next

Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest