Forum

problem with a qsg tut

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

Moderator: InsideQC Admins

problem with a qsg tut

Postby hondobondo » Fri Jun 18, 2010 9:39 pm

I got something that i've tried to fix on my own but i'm completely stuck. I added colored dynamic lighting and static lighting to the engine, and i got nearly everything working ok along with cel shading, but when I used the quake standards group tut on dynamic entity lighting i added a bug that makes all the models really dark unless lit directly by some dynamic light or colored light. the ambient white lights don't seem to light up the models.

GL_DrawAliasBlendedFrame in gl_rmain.c
l[i] = shadelight[i] * ( shadedots[verts1->lightnormalindex] + (blend * d[0]) ); // shade as usual

if i change shadelight[i] to shadelight[3] the models are lit, but not colored. if i leave it shadelight[i] they're colored but not lit by ambient light.

no idea what to do

http://www.moddb.com/members/hondobondo/downloads/superduper-quake-engine-092
hondobondo
 
Posts: 207
Joined: Tue Sep 26, 2006 2:48 am

Postby Spike » Fri Jun 18, 2010 9:52 pm

there's no ambient light term
the front will be lit, but anything facing away from the light will be pure black.
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby mh » Fri Jun 18, 2010 10:44 pm

Oh, there's lots of problems with those QSG light tutorials. I could work over them and make a fixed coloured light version of BJP in maybe half an hour, but it's late and I'm tired. ;)
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


Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest