Forum

[quake2] overbright models

Discuss programming topics that involve the OpenGL API.

Moderator: InsideQC Admins

Re: [quake2] overbright models

Postby Barnes » Wed Nov 16, 2011 7:36 am

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);
----------
}
User avatar
Barnes
 
Posts: 216
Joined: Thu Dec 24, 2009 2:26 pm
Location: Russia, Moscow

Re: [quake2] overbright models

Postby marcelo_20xx » Wed Nov 16, 2011 7:53 am

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.
marcelo_20xx
 
Posts: 10
Joined: Sat Nov 12, 2011 2:05 am

Re: [quake2] overbright models

Postby Barnes » Wed Nov 16, 2011 12:14 pm

it work for all ingame alias models
also try use this for hud pics))
User avatar
Barnes
 
Posts: 216
Joined: Thu Dec 24, 2009 2:26 pm
Location: Russia, Moscow

Re: [quake2] overbright models

Postby Knightmare » Sat Feb 11, 2012 7:34 am

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.
Knightmare
 
Posts: 61
Joined: Thu Feb 09, 2012 1:55 am

Previous

Return to OpenGL Programming

Who is online

Users browsing this forum: No registered users and 1 guest