User panel stuff on forum
  25 posts on 1 page  1
Client Talk
2012-02-09, 03:59
Member
357 posts

Registered:
Mar 2006
This code outlines the models with a THIN black line, like a cartoon effect.

/*
R_DrawAliasOutlineFrame
*/

void R_DrawAliasOutlineFrame (aliashdr_t *paliashdr, int pose1, int pose2, qbool mtex, qbool scrolldir)
{
int *order, count;
vec3_t interpolated_verts;
float lerpfrac;
trivertx_t *verts1, *verts2;

if (r_modelalpha < 1)
return;

glCullFace (GL_BACK);
glPolygonMode (GL_FRONT, GL_LINE);

glLineWidth (1.0f);

glColor4f (0.0f,0.0f,0.0f,1);
glEnable (GL_LINE_SMOOTH);
glDisable (GL_TEXTURE_2D);

lerpfrac = r_framelerp;
lastposenum = (lerpfrac >= 0.5) ? pose2 : pose1;

verts2 = verts1 = (trivertx_t *) ((byte *) paliashdr + paliashdr->posedata);

verts1 += pose1 * paliashdr->poseverts;
verts2 += pose2 * paliashdr->poseverts;

order = (int *) ((byte *) paliashdr + paliashdr->commands);

for ( ;; )
{
count = *order++;

if (!count)
break;

if (count < 0)
{
count = -count;
glBegin(GL_TRIANGLE_FAN);
}
else
glBegin(GL_TRIANGLE_STRIP);

do
{
order += 2;

if ((currententity->renderfx & RF_LIMITLERP))
lerpfrac = VectorL2Compare(verts1->v, verts2->v, r_lerpdistance) ? r_framelerp : 1;

VectorInterpolate(verts1->v, lerpfrac, verts2->v, interpolated_verts);
glVertex3fv(interpolated_verts);

verts1++;
verts2++;
}
while (--count);

glEnd();
}

glColor4f (1, 1, 1, 1);
glPolygonMode (GL_FRONT, GL_FILL);
glDisable (GL_LINE_SMOOTH);
glCullFace (GL_FRONT);
glEnable (GL_TEXTURE_2D);
}

called in R_SetupAliasFrame,

...
GL_DrawAliasFrame (paliashdr, oldpose, pose, mtex, scrolldir);

if (r_outline.integer)
R_DrawAliasOutlineFrame(paliashdr, oldpose, pose, mtex, scrolldir);
}
2012-02-09, 09:09
Administrator
869 posts

Registered:
Jan 2006
Sounds interesting! But I would need a more explained walkthrough than this to even try it.
Join us on discord.quake.world
2012-02-09, 12:01
Member
186 posts

Registered:
Jan 2008
Like in warsow?
2012-02-09, 12:38
Member
192 posts

Registered:
Mar 2006
Screenshots?
2012-02-09, 15:14
Administrator
1022 posts

Registered:
Apr 2006
It depends on globals etc, so what engine is it made for?
2012-02-09, 19:49
Member
357 posts

Registered:
Mar 2006
That above code plugs into ezQuake. The outlines are black, though like in Warsow, can be colored the team color. There's nothing fancy about the code, other than just redrawing the model as a wireframe and culling the areas already drawn, so all you end up seeing is just the outer edges. And on machines of today, this doesnt really lose many fps.

heres what it looks like

http://quakeone.com/qrack/ss/qrack337.jpg
2012-02-09, 21:15
Administrator
1847 posts

Registered:
Feb 2006
Btw, what happened to the cell-shading someone was doing for ezQuake?
2012-02-09, 22:28
Member
622 posts

Registered:
Jan 2006
i want this, and i want this for EDGES !
http://upload.foppa.dk/files/edges.png
2012-02-10, 03:23
Member
357 posts

Registered:
Mar 2006
Lol I started thinking, what is "EDGES"? Then I looked at your pic again and saw u drew over the edges of the map.
Ya this is also do-able...just ran through the surface routine instead of alias models.

I can post cel shading code later, it wont use GLSL like someone once posted pics of but runs fast enough if your card was made since 2005.
2012-02-11, 00:50
Member
1026 posts

Registered:
Feb 2006
this is a pretty good idea, but if you choose to add black edges to map i think it's better to have 2 variables: one for entity (player models, items) outlines, one for map outlines
god damn hippies >_<
2012-02-11, 13:13
Member
229 posts

Registered:
Jan 2006
could be nice
2012-02-11, 14:08
Administrator
1247 posts

Registered:
Jan 2006
looking forward for this! with some "flat" textures, the visuals would change alot!
never argue with an idiot. they'll bring you back to their level and then beat you with experience.
2012-02-11, 20:03
Member
123 posts

Registered:
Mar 2006
I think this is mainly a NQ thing, they are OK with outlines but don't like skins. Go figure.
2012-02-12, 05:02
Member
357 posts

Registered:
Mar 2006
NQ players are a little more "touchy " about things like this, which is why in NQ I use team colored outlines that are affected by world lighting, meaning in dark areas (dm2 corner) the outlines dont glow in the dark! But black doesnt have this condition and is faster to render.
For dual cvar, it wouldnt be needed, just r_outline 1 = players/items only r_outline 2 = all including world. r_outline 3 could be just world outlines solely.
2012-04-24, 10:40
Member
76 posts

Registered:
Oct 2009
Nvm, havent checked images,

(Edited 2012-04-24, 10:41)
2012-04-25, 01:02
Administrator
1847 posts

Registered:
Feb 2006
SputnikUtah wrote:
I can post cel shading code later, it wont use GLSL like someone once posted pics of but runs fast enough if your card was made since 2005.


Bring the code already!
2012-06-06, 00:40
Member
371 posts

Registered:
Sep 2009
WTFFFF!!! VERY NICE!!!!! using with proper(or NO) textures would improve AIM a lot!

I downloaded the source-code of ezquake, but which .c do I insert this, and where?

share some "howto", please!!!

(Edited 2012-06-06, 01:04)
(QW Nickname: AL.Kernell)
2012-06-06, 11:45
Member
622 posts

Registered:
Jan 2006
wernerml, its already coded into ezquake in the newest beta release, r_* commando to enable it i think.
2012-06-06, 15:33
Member
371 posts

Registered:
Sep 2009
NICE, got it: r_outline, with the Nighlty Build version!
at small distances it's very nice, but to be nice with far distances I had to set: r_outline_width 1 (instead of 2)

now the most amazing would be this working with the whole MAP!!!
(QW Nickname: AL.Kernell)
2012-06-08, 11:18
Member
124 posts

Registered:
Apr 2012
Looks really nice :>

An observation that... probably needs fixing, though?

Using Carmack's trick to not clear the zbuffer (gl_ztrick), you can actually see the outlines of armors/players through walls at short distances (like around corners) if your cl_maxfps is a high enough value. It'll flicker enough to be noticeable.

Tested in Linux, but it should be the exact same for other platforms. Why not ditch gl_ztrick altogether in the ezquake code? It's kind of pointless on modern video cards. :p
2012-07-01, 06:48
Moderator
383 posts

Registered:
Jan 2006
Last nightly build does not have this commands.
With best wishes, B1aze.
2012-07-01, 06:53
Moderator
383 posts

Registered:
Jan 2006
.

(Edited 2012-07-02, 03:04)
With best wishes, B1aze.
2012-11-01, 20:28
Member
18 posts

Registered:
Aug 2006
So its not fix'ible with 2.1 Stable Version (build 3330) ? We cant add the r_outline and gl_outline (for console settings) to other versions? Im no hacker and do not understand much of this things, but If its able to fix the skins like in the pic I would love to have that information (msg me plz). :{ feel abit ashame since I feel I dont know what im talking about. :{ peace!
2012-11-04, 07:08
Member
357 posts

Registered:
Mar 2006
With fullbright skins in QW i really dont think outlines would be much of a benefit.
The fullbright colors out-wash the outlines.... plus fb_skins render faster than outlines....
The screenshots u see in this post do not use fullbright skins.

I guess its just a matter of preference but, after almost a year later in retrospect this feature is kinda useless
2013-02-19, 04:44
Member
129 posts

Registered:
Apr 2007
but it looks so gooood.. -________-
  25 posts on 1 page  1