[quake2] overbright models

Discuss programming topics that involve the OpenGL API.
Barnes
Posts: 232
Joined: Thu Dec 24, 2009 2:26 pm
Location: Russia, Moscow
Contact:

Re: [quake2] overbright models

Post by Barnes »

marcelo_20xx wrote: Its almost the same of what Barnes posted, btw Barnes where do I put the calls?

Code: Select all

void R_DrawAliasModel (entity_t *e, qboolean weapon_model)
{
-----------

R_SetVertexOverbrights(true);

GL_DrawAliasFrameLerpAmbient(paliashdr, shadelight);

R_SetVertexOverbrights(false);
----------
}
marcelo_20xx
Posts: 10
Joined: Sat Nov 12, 2011 2:05 am

Re: [quake2] overbright models

Post by marcelo_20xx »

Thanks Barnes, I will try that and see if that works, I assume those calls are only for weapons, what about npcs, and items? Thanks in advance.

EDIT: That section of the code works for all models I think. A million thanks for the answers, it worked at last :D.
Barnes
Posts: 232
Joined: Thu Dec 24, 2009 2:26 pm
Location: Russia, Moscow
Contact:

Re: [quake2] overbright models

Post by Barnes »

it work for all ingame alias models
also try use this for hud pics))
Knightmare
Posts: 63
Joined: Thu Feb 09, 2012 1:55 am

Re: [quake2] overbright models

Post by Knightmare »

Overbrights is a bit of misnomer for this, as it's actually RGB scaling. I later renamed this option from Vic's code. Real overbright bits are used in the Quake3 engine, you can see this in the Q3 and RtCW sources. It actually involves bit shifting of the color values in textures and lightmaps.
marcelo_20xx wrote:KmQuake2 already implemented overbright in models but since their project and their webpage is dead I cant find how they did it :(.
KMQuake2 isn't dead, I'm still working on it :wink: It's just currently orphaned and needs a new home.
marcelo_20xx wrote:I already took a look at KMQuake2 source and they changed a lot of stuff to get overbrights on models but I wasnt very sure how they implemented this, since the vanilla source and theirs are too much different.
Yep, my model rendering code is a complete rewrite. It's actually indexed array-based md3 rendering code with the md2's loaded into a md3 structure, so there's no duplicate coding of rendering features for md2 and md3.
Post Reply