Quake3World.com Forums
     Programming Discussion
        Made Q3A's gibs look crazy.


Post new topicReply to topic
Login | Profile | | FAQ | Search | IRC




Print view Previous topic | Next topic 
Topic Starter Topic: Made Q3A's gibs look crazy.

The Afflicted
The Afflicted
Joined: 21 Apr 2005
Posts: 514
PostPosted: 09-19-2017 07:38 PM           Profile Send private message  E-mail  Edit post Reply with quote


Make sure you play it in some higher quality mode so you actually see the blood. Looks way better. The gibs were always my least favorite part of Q3 and Q4.





Top
                 

Cool #9
Cool #9
Joined: 01 Dec 2000
Posts: 43140
PostPosted: 09-19-2017 11:18 PM           Profile   Send private message  E-mail  Edit post Reply with quote


In EntityPlus I changed the marks on walls setting from an on/off boolean into a duration setting so the player can choose to have bullet marks and blood splatters remain visible longer. Add that to this and you can truly paint the walls red.




Top
                 

The Afflicted
The Afflicted
Joined: 21 Apr 2005
Posts: 514
PostPosted: 09-26-2017 03:31 PM           Profile Send private message  E-mail  Edit post Reply with quote


Cool. I'd be pretty cool if I could make better blood splatters, too. They always looked really ugly to me. I might mess with the rocket explosion next and make it way more random, though.

Any idea how to raise the limit of local entities so that they don't disappear when others spawn like that?




Top
                 

Cool #9
Cool #9
Joined: 01 Dec 2000
Posts: 43140
PostPosted: 09-28-2017 12:26 AM           Profile   Send private message  E-mail  Edit post Reply with quote


I think you'll need to edit such limits in the engine code itself and I'm not sure how hardwired everything is.




Top
                 

The Afflicted
The Afflicted
Joined: 21 Apr 2005
Posts: 514
PostPosted: 10-02-2017 03:03 PM           Profile Send private message  E-mail  Edit post Reply with quote


Hmmm. Yeah, I tried using r_maxpolys 1,000,000 and that hasn't done anything. Look at how fucked this railtrail is:




Top
                 

The Afflicted
The Afflicted
Joined: 21 Apr 2005
Posts: 514
PostPosted: 10-03-2017 08:59 PM           Profile Send private message  E-mail  Edit post Reply with quote


Cool, I upped the max polys TO 768 and this was the result:





I was considering making modifications to the railtrail code so that it deteched smoke puffs that were too close, but I didn't even really change the amount of objects in the rail trail. I just turned cg_oldrail off, then changed the asset used, and replaced the old rail beam with the lightning beam, and set cg_railtrailtime to something like 50ms.

My main goal is to make the Q3 effects look as realistic as possible without actually adding any new assets. I replaced effects from the sg, mg, and plasma too, and they look WAAAY better. The size of plasma projectiles are randomized, so they flicker. MG bullets emit randomized small lights when hitting surfaces, and the duration is about 100ms, instead of whatever ridiculously large number they were before.

I also replaced the default rocket launcher with something much nicer using randomized particle effects, but I won't show it since it's not 100% done. They actually look really, really nice imho. Way better than the default rocket launcher effects, imho, which are nostalgic, but never made any real sense. I actually really want to make like a smoke entity list, so that if you shoot rockets or rails past any smoke, they'll all get pushed away from the oncoming projectile, or explosion. That'd be sweet.

Thanks for the super technical reply. I don't really know about the renderer at all. I've been trying to mess with it for my VR mod (https://www.youtube.com/watch?v=ua75r1zfuzg&t=14s), but I haven't figured out how to get warping right. I don't know anything about image buffers or anything like that. :(

Btw, are you working on an ET project? If you are, and are looking for someone to mess with default effects, let me know. I'm also fully competent in character creation, though my interests have always been in getting a really good IK and animation system set up with Q3A movement speed. I enjoy character art, but am more in love with making art look really really nice using code.

Here's the new railtrail code:

Code:
void CG_RailTrail (clientInfo_t *ci, vec3_t start, vec3_t end) {
   vec3_t axis[36], move, move2, next_move, vec, temp;
   float  len;
   int    i, j, skip;

   float groupRand;
   localEntity_t *le;
   refEntity_t   *re;

   float scaleRand;
   float posOffs;
   float posRand;
   float colRand;
   int randomize;
   int randomizeRadius;
   int randomizeDistance;
   int randomizeMaxDist;
   int lastRandDist;
   int shift;
   float lerp;
   float oldScale;
   float oldDist;
   
   float scale;

#define RADIUS   4
#define ROTATION 1
#define SPACING  5

   oldScale = 0;
   shift = 0;
   start[2] -4;
   VectorCopy (start, move);
   VectorSubtract (end, start, vec);
   len = VectorNormalize (vec);
   PerpendicularVector(temp, vec);


   for (i = 0 ; i < 36; i++) {
      RotatePointAroundVector(axis[i], vec, temp, i * 10);//banshee 2.4 was 10
   }

   le = CG_AllocLocalEntity();
   re = &le->refEntity;

   le->leType = LE_FADE_RGB;
   le->startTime = cg.time;
   le->endTime = cg.time + cg_railTrailTime.value;
   le->lifeRate = 1.0 / (le->endTime - le->startTime);

   re->shaderTime = cg.time / 1000.0f;
   re->reType = RT_RAIL_CORE;
   //re->customShader = cgs.media.railCoreShader;
   re->customShader = cgs.media.lightningShader;

   VectorCopy(start, re->origin);
   VectorCopy(end, re->oldorigin);

   re->shaderRGBA[0] = ci->color1[0] * 255;
    re->shaderRGBA[1] = ci->color1[1] * 255;
    re->shaderRGBA[2] = ci->color1[2] * 255;
    re->shaderRGBA[3] = 255;

   le->color[0] = ci->color1[0] * 0.75;
   le->color[1] = ci->color1[1] * 0.75;
   le->color[2] = ci->color1[2] * 0.75;
   le->color[3] = 1.0f;

   AxisClear( re->axis );

   VectorMA(move, 20, vec, move);
   VectorCopy(move, next_move);
   VectorScale (vec, SPACING, vec);

   if (cg_oldRail.integer != 0) {
      // nudge down a bit so it isn't exactly in center
      re->origin[2] -= 8;
      re->oldorigin[2] -= 8;
      return;
   }
   skip = -1;

   lastRandDist = 0;
   randomizeMaxDist = 750;
   randomizeDistance = rand() % randomizeMaxDist;

   j = 18;
   //Com_Printf("%f\n", len);
   //Com_Printf("%i\n", ((((int)len)-(((int)len) % SPACING)) / SPACING));
   //Com_Printf("%i\n\n", (((int)len) % SPACING));
    for (i = 0; i < len; i += SPACING) {
      if (i != skip) {

         if(i>randomizeDistance){
            lastRandDist = i;
            randomizeDistance = (rand() % randomizeMaxDist) + lastRandDist;

            //randomizeDistance = 0;
            if(randomizeDistance > len){
               randomizeDistance = (int)len;
            }

            shift = rand() % 360;
            //Com_Printf("%i\n", randomizeDistance);
         }

         //scaleRandomizeTime
         skip = i + SPACING;
         le = CG_AllocLocalEntity();
            re = &le->refEntity;
            le->leFlags = LEF_PUFF_DONT_SCALE;
         le->leType = LE_MOVE_SCALE_FADE;
            le->startTime = cg.time;
            le->endTime = cg.time + (i>>1) + fabs((crandom() * 2000)) + 2000;
            le->lifeRate = 1.0 / (le->endTime - le->startTime);

         //posOffs = 0;
         //randomize = 0;
         posOffs = 1;
         randomize = 1;
            
         if(randomize == 1){
            scaleRand = 1;
            posRand = 1;
            colRand = 1;
         } else {
            scaleRand = 0;
            posRand = 0;
            colRand = 0;
         }

         scaleRand = 1;

         //shift = 0;

         scale = 30;
         scale = fabs(( (.1 * sinf(DEG2RAD(i+shift)) * .25) + sinf(DEG2RAD((i/10) + shift)))) * scale;


         oldScale = LerpPositionTemp(oldScale, scale, .75);
         //Com_Printf("%f\n", (oldScale/40)-.5);

            re->shaderTime = cg.time / 1000.0f;
            re->reType = RT_SPRITE;
            re->radius = ( scaleRand * (crandom() * 1.5) * oldScale) + 10;
         re->rotation = rand() % 360;

         re->customShader = cgs.media.shotgunSmokePuffShader;

            //re->shaderRGBA[0] = ci->color2[0] * 255;
            //re->shaderRGBA[1] = ci->color2[1] * 255;
            //re->shaderRGBA[2] = ci->color2[2] * 255;

         le->radius = 100;

         groupRand = crandom();
            re->shaderRGBA[0] = (colRand  * (groupRand * 50)) +155;
            re->shaderRGBA[1] = (colRand  * (groupRand * 50)) +155;
            re->shaderRGBA[2] = (colRand  * (groupRand * 50)) +155;
            re->shaderRGBA[3] = 255;

            //le->color[0] = ci->color2[0] * 0.75;
            //le->color[1] = ci->color2[1] * 0.75;
            //le->color[2] = ci->color2[2] * 0.75;


            le->color[0] = 0.75;
            le->color[1] = 0.75;
            le->color[2] = 0.75;

            //le->color[3] = (colRand * (fabs(crandom() * .5 )-.75)) + 1;
            //le->color[3] = .75;
            le->color[3] = 1;

            le->pos.trType = TR_LINEAR;
            le->pos.trTime = cg.time;

         VectorCopy( move, move2);
            VectorMA(move2, RADIUS * ((oldScale/30) -.5) , axis[j], move2);
            VectorCopy(move2, le->pos.trBase);
         
            le->pos.trDelta[0] = axis[j][0]* ((oldScale /40) * posOffs * 50) ;
            le->pos.trDelta[1] = axis[j][1]* ((oldScale /40) * posOffs * 50) ;
            le->pos.trDelta[2] = axis[j][2]* ((oldScale /40) * posOffs * 50)  + 10;

      } 

        VectorAdd (move, vec, move);

        j = j + ROTATION < 36 ? j + ROTATION : (j + ROTATION) % 36;
   }
}




Top
                 

The Afflicted
The Afflicted
Joined: 21 Apr 2005
Posts: 514
PostPosted: 10-06-2017 02:06 PM           Profile Send private message  E-mail  Edit post Reply with quote


Made a short video with some Megadeath's 'The Punishment Due' playing in the backround. That song is insane. Wtf. (it's loud as fuck)




Top
                 

Grunt
Grunt
Joined: 20 Feb 2011
Posts: 57
PostPosted: 07-03-2019 06:12 AM           Profile Send private message  E-mail  Edit post Reply with quote


What's with that crazy camera movement? Does the weapon model move based on the camera movement?




Top
                 
Quake3World.com | Forum Index | Programming Discussion


Post new topic Reply to topic


cron
Quake3World.com
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group