Rune Central

The Official Rune Quake Message Board
It is currently Thu Mar 28, 2024 7:25 am

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Lightning bolt glow
PostPosted: Mon Aug 23, 2004 12:42 am 
Offline

Joined: Sat Jul 31, 2004 1:33 am
Posts: 17
hum... i want to make the lightning-bolt (from shambler and lightning-gun)glow with a blue light (like in mhquake)... but i have no luck so far :(

do you have any tips for me?


Top
 Profile  
Reply with quote  
 Post subject: dynamic glow
PostPosted: Mon Aug 23, 2004 1:38 am 
Offline
quake.intertex.net
User avatar

Joined: Sat Nov 15, 2003 7:39 pm
Posts: 243
Location: Kansas City!
try this:
Code:
void CL_ParseBeam (model_t *m)
{
   int      ent, i;
   vec3_t   start, end;
   beam_t   *b;   
   
   dlight_t   *dl; // ADD THIS
   
   ent = MSG_ReadShort ();
   
   start[0] = MSG_ReadCoord ();
   start[1] = MSG_ReadCoord ();
   start[2] = MSG_ReadCoord ();
   
   end[0] = MSG_ReadCoord ();
   end[1] = MSG_ReadCoord ();
   end[2] = MSG_ReadCoord ();

   // by joe
   if (ent == cl.viewentity)
   VectorCopy (end, playerbeam_end);   
   // override any beam with the same entity
   for (i=0, b=cl_beams ; i<MAX_BEAMS ; i++, b++)
   {
      if (b->entity == ent)
         {   
            b->entity = ent;
            b->model = m;
            b->endtime = cl.time + 0.1;
            VectorCopy (start, b->start);
            VectorCopy (end, b->end);
             //LG GLOW --START
            dl = CL_AllocDlight (0);
            VectorCopy (end, dl->origin);
            dl->radius = 100;
            dl->die = cl.time + 0.1;
            dl->decay = 300;
            dl->type = lt_blue;
            //LG GLOW --END
            return;
         }
   }

// find a free beam
   for (i=0, b=cl_beams ; i<MAX_BEAMS ; i++, b++)
   {
      if (!b->model || b->endtime < cl.time)
         {
            b->entity = ent;         
            b->model = m;
            b->endtime = cl.time + 0.1;
            VectorCopy (start, b->start);
            VectorCopy (end, b->end);
            return;
         }
   }

   Con_Printf ("beam list overflow!\n");   
}


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Aug 27, 2004 3:29 pm 
Offline
User avatar

Joined: Fri Oct 24, 2003 2:09 pm
Posts: 252
Location: Hungary
excuse me, but this looks horrible when gl_flashblend is 1 (guess you use 0). The best would be the corona effect from AMFQuake, but at the moment I'm not planning to add that nor weather effects, sorry. I've added vertex lighting already, though.


Top
 Profile  
Reply with quote  
 Post subject: ugly fat glow
PostPosted: Sat Aug 28, 2004 1:10 pm 
Offline
quake.intertex.net
User avatar

Joined: Sat Nov 15, 2003 7:39 pm
Posts: 243
Location: Kansas City!
yes heh your right it basically blinds you if you use gl_flashblend 0,
and no i hadnt added corona effects either, but hmm whats vertex lighting compared to the normal way?


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Aug 28, 2004 2:55 pm 
Offline
User avatar

Joined: Fri Oct 24, 2003 2:09 pm
Posts: 252
Location: Hungary
vertex lighting only affects alias models, just check out your weapon models for example under different lighting conditions how cool it looks!


Top
 Profile  
Reply with quote  
 Post subject: vertex light
PostPosted: Sat Aug 28, 2004 6:18 pm 
Offline
quake.intertex.net
User avatar

Joined: Sat Nov 15, 2003 7:39 pm
Posts: 243
Location: Kansas City!
Ahh, ok i got ya
I tried to add colored vertex lighting to joequake but got lost
some thing that would be effected by lit files and dynamic glows :/

maybe ill try again when i learn more on that ;)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Aug 29, 2004 2:38 pm 
Offline
User avatar

Joined: Fri Oct 24, 2003 2:09 pm
Posts: 252
Location: Hungary
models are already affected by static colored lights even in this current version of joequake, but in the next release they'll be by dynamic lights as well.

by the way, the lightning sparks do work, but it freezes after changing levels, didnt this occur to you either...?


Top
 Profile  
Reply with quote  
 Post subject: lg spark
PostPosted: Mon Aug 30, 2004 2:38 am 
Offline
quake.intertex.net
User avatar

Joined: Sat Nov 15, 2003 7:39 pm
Posts: 243
Location: Kansas City!
ya I got lockup when i discharged in water...

hmmmm back to the dynamic coloredlights...

my gun doesnt change colors based on the light from lit, and EF_BLUE doesnt make entities overlay with a blue color, unless my EF_BLUE is outshined by EF_DIMLIGHT of the player carrying a CTF FLAG (IE the blue flag)

But, i wanted to make healthboxes/ammoboxes dark in shadows or lit overlayed... not important but looks cool..

Screenshots of beta?? :wink:


Top
 Profile  
Reply with quote  
 Post subject: dynamic light stuff
PostPosted: Tue Aug 31, 2004 8:20 pm 
Offline
quake.intertex.net
User avatar

Joined: Sat Nov 15, 2003 7:39 pm
Posts: 243
Location: Kansas City!
ok, ive added the vertiex lights from lits to models and also dynamic lights on models...

problem i am having is that my particle shaft emits a dynamic light lt_blue
if i aim at lets say red armor or quad model that model looses it vibrant ambientlight and is replaced with less bright blue light...
//ambient += add is the bottom line
if i ambient += (originallight / 3)
it looks ok but still i either loose the color or i loose the brightness of the environment lighting ... ill have to tweak some more...
i'll let u know if i get a viable solution... :P


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 42 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group