|
FuhQuake
https://fuhquake.net
|
View previous topic :: View next topic |
Author |
Message |
DeathLace
Joined: 02 May 2003
Posts: 38
|
Posted: Sat Mar 13, 2004 7:45 am Post subject: Rocket Trail/Light |
|
|
is there any chance we could get that rocket trail/light |
|
Back to top |
|
|
Up2nOgOoD[ROCK]
Joined: 10 Nov 2002
Posts: 239
Location: California :)
|
Posted: Sat Mar 13, 2004 11:10 am Post subject: |
|
|
https://fuhquake.net/forum/viewtopic.php?t=2502
_________________
P4 1.5ghz, Gf2Pro, WinXPro, Audigy 1
Command Line:
-width 1280 -height 1024 -conwidth 800 -conheight 600 -bpp 32 +set vid_displayfrequency 60 -mem 64 -zone 1024 +set s_khz 44 +set cl_confirmquit 0 -dinput |
|
Back to top |
|
|
DeathLace
Joined: 02 May 2003
Posts: 38
|
Posted: Sat Mar 13, 2004 1:11 pm Post subject: |
|
|
yes I found out about that after, is that really a problem? wtf...
It was never answered to, so I thought it would be good like this. |
|
Back to top |
|
|
DeathLace
Joined: 02 May 2003
Posts: 38
|
Posted: Tue Mar 16, 2004 6:06 am Post subject: |
|
|
ok... so fuh said it's easy to edit particles... I don't feel the same after looking into it.
Anyways this is the rockettrail code from the Q2 engine:
Code: |
/*
=================
CL_RocketTrail
=================
*/
void CL_RocketTrail (vec3_t start, vec3_t end){
particle_t *p;
int flags = 0;
vec3_t move, vec;
float len, dist;
if (!cl_particles->integer)
return;
if (CL_PointContents(end) & MASK_WATER){
if (CL_PointContents(start) & MASK_WATER)
CL_BubbleTrail(start, end, 16);
return;
}
// Flames
VectorCopy(start, move);
VectorSubtract(end, start, vec);
len = VectorNormalize(vec);
dist = 1;
VectorScale(vec, dist, vec);
while (len > 0){
len -= dist;
p = CL_AllocParticle();
if (!p)
return;
p->shader = cl.media.flameParticleShader;
p->time = cl.time;
p->flags = PARTICLE_ROTATE;
p->org[0] = move[0] + crand();
p->org[1] = move[1] + crand();
p->org[2] = move[2] + crand();
p->vel[0] = crand() * 5;
p->vel[1] = crand() * 5;
p->vel[2] = crand() * 5 + (25 + crand() * 5);
p->accel[0] = 0;
p->accel[1] = 0;
p->accel[2] = 0;
p->color[0] = 1.0;
p->color[1] = 1.0;
p->color[2] = 1.0;
p->colorVel[0] = 0;
p->colorVel[1] = 0;
p->colorVel[2] = 0;
p->alpha = 1.0;
p->alphaVel = -1.0 / (0.2 + frand() * 0.1);
p->radius = 3 + (1.5 * crand());
p->radiusVel = 0;
p->length = 1;
p->lengthVel = 0;
p->rotation = rand() % 360;
VectorAdd(move, vec, move);
}
// Smoke
flags = PARTICLE_ROTATE;
if (cl_particleVertexLight->integer)
flags |= PARTICLE_VERTEXLIGHT;
VectorCopy(start, move);
VectorSubtract(end, start, vec);
len = VectorNormalize(vec);
dist = 10;
VectorScale(vec, dist, vec);
while (len > 0){
len -= dist;
p = CL_AllocParticle();
if (!p)
return;
p->shader = cl.media.smokeParticleShader;
p->time = cl.time;
p->flags = flags;
p->org[0] = move[0] + crand();
p->org[1] = move[1] + crand();
p->org[2] = move[2] + crand();
p->vel[0] = crand() * 5;
p->vel[1] = crand() * 5;
p->vel[2] = crand() * 5 + (25 + crand() * 5);
p->accel[0] = 0;
p->accel[1] = 0;
p->accel[2] = 0;
p->color[0] = 0;
p->color[1] = 0;
p->color[2] = 0;
p->colorVel[0] = 0.75;
p->colorVel[1] = 0.75;
p->colorVel[2] = 0.75;
p->alpha = 0.5;
p->alphaVel = -(0.2 + frand() * 0.1);
p->radius = 3 + (1.5 * crand());
p->radiusVel = 15 + (7.5 * crand());
p->length = 1;
p->lengthVel = 0;
p->rotation = rand() % 360;
VectorAdd(move, vec, move);
}
}
|
Now this is the code for fuhquake rocket trail (I believe this is all of it???)
Code: |
case ROCKET_TRAIL:
default:
p->ramp = (rand() & 3);
p->color = ramp3[(int) p->ramp];
p->type = pt_fire;
for (j = 0; j < 3; j++)
p->org[j] = point[j] + ((rand() % 6) - 3);
break;
}
|
and
Code: |
void R_ParticleTrail (vec3_t start, vec3_t end, vec3_t *trail_origin, trail_type_t type) {
#ifdef GLQUAKE
if (qmb_initialized && gl_part_trails.value)
QMB_ParticleTrail(start, end, trail_origin, type);
else
#endif
Classic_ParticleTrail(start, end, trail_origin, type);
}
|
and
Code: |
void QMB_ParticleTrail (vec3_t start, vec3_t end, vec3_t *trail_origin, trail_type_t type) {
col_t color;
switch (type) {
case GRENADE_TRAIL:
AddParticleTrail(p_smoke, start, end, 1.45, 0.825, NULL);
break;
case BLOOD_TRAIL:
case BIG_BLOOD_TRAIL:
AddParticleTrail(p_blood3, start, end, type == BLOOD_TRAIL ? 1.35 : 2.4, 2, NULL);
break;
case TRACER1_TRAIL:
color[0] = 0; color[1] = 124; color[2] = 0;
AddParticleTrail (p_trailpart, start, end, 3.75, 0.5, color);
break;
case TRACER2_TRAIL:
color[0] = 255; color[1] = 77; color[2] = 0;
AddParticleTrail (p_trailpart, start, end, 3.75, 0.5, color);
break;
case VOOR_TRAIL:
color[0] = 77; color[1] = 0; color[2] = 255;
AddParticleTrail (p_trailpart, start, end, 3.75, 0.5, color);
break;
case ALT_ROCKET_TRAIL:
AddParticleTrail(p_dpfire, start, end, 3, 0.26, NULL);
AddParticleTrail(p_dpsmoke, start, end, 3, 0.825, NULL);
break;
case ROCKET_TRAIL:
default:
color[0] = 255; color[1] = 56; color[2] = 9;
AddParticleTrail(p_trailpart, start, end, 6.2, 0.31, color);
AddParticleTrail(p_smoke, start, end, 1.8, 0.825, NULL);
break;
}
VectorCopy(trail_stop, *trail_origin);
} |
and lastly??
Code: |
__inline static void AddParticleTrail(part_type_t type, vec3_t start, vec3_t end, float size, float time, col_t col) {
byte *color;
int i, j, num_particles;
float count, length, theta = 0;
vec3_t point, delta;
particle_t *p;
particle_type_t *pt;
if (!qmb_initialized)
Sys_Error("QMB particle added without initialization");
assert(size > 0 && time > 0);
if (type < 0 || type >= num_particletypes)
Sys_Error("AddParticle: Invalid type (%d)", type);
pt = &particle_types[particle_type_index[type]];
VectorCopy(start, point);
VectorSubtract(end, start, delta);
if (!(length = VectorLength(delta)))
goto done;
switch(type) {
case p_trailpart:
count = length / 1.1;
break;
case p_blood3:
count = length / 8;
break;
case p_smoke:
count = length / 3.8;
break;
case p_dpsmoke:
count = length / 2.5;
break;
case p_dpfire:
count = length / 2.8;
break;
default:
assert(!"AddParticleTrail: unexpected type");
break;
}
if (!(num_particles = (int) count))
goto done;
VectorScale(delta, 1.0 / num_particles, delta);
for (i = 0; i < num_particles && free_particles; i++) {
color = col ? col : ColorForParticle(type);
INIT_NEW_PARTICLE(pt, p, color, size, time);
switch (type) {
case p_trailpart:
VectorCopy (point, p->org);
VectorClear(p->vel);
p->growth = -size / time;
break;
case p_blood3:
VectorCopy (point, p->org);
for (j = 0; j < 3; j++)
p->org[j] += ((rand() & 15) - 8) / 8.0;
for (j = 0; j < 3; j++)
p->vel[j] = ((rand() & 15) - 8) / 2.0;
p->size = size * (rand() % 20) / 10.0;
p->growth = 6;
break;
case p_smoke:
VectorCopy (point, p->org);
for (j = 0; j < 3; j++)
p->org[j] += ((rand() & 7) - 4) / 8.0;
p->vel[0] = p->vel[1] = 0;
p->vel[2] = rand() & 3;
p->growth = 4.5;
p->rotspeed = (rand() & 63) + 96;
break;
case p_dpsmoke:
VectorCopy (point, p->org);
for (j = 0; j < 3; j++)
p->vel[j] = (rand() % 10) - 5;
p->growth = 3;
p->rotspeed = (rand() & 63) + 96;
break;
case p_dpfire:
VectorCopy (point, p->org);
for (j = 0; j < 3; j++)
p->vel[j] = (rand() % 40) - 20;
break;
default:
assert(!"AddParticleTrail: unexpected type");
break;
}
VectorAdd(point, delta, point);
}
done:
VectorCopy (point, trail_stop);
} |
I honestly tried to do it, and make it myself, since fuh said it was easy. But I sadly am not able to do it . If someone could PLEASE help me here, it would be greatly appreciated, thanks!
|
|
Back to top |
|
|
Mick
Joined: 05 Apr 2003
Posts: 151
|
Posted: Tue Mar 16, 2004 10:37 pm Post subject: |
|
|
DeathLace how do I get Quake2 to look like that ? with hud and stuff ?
_________________
mick.starthotel.dk
#zfl #quakeworld #fuhquake #serv-u |
|
Back to top |
|
|
maehor
Joined: 11 Mar 2003
Posts: 32
|
|
Back to top |
|
|
Mick
Joined: 05 Apr 2003
Posts: 151
|
Posted: Wed Mar 17, 2004 2:05 am Post subject: |
|
|
Is it a mod ? or just some nice graphic/hud client thing like fuhquake is for qw
_________________
mick.starthotel.dk
#zfl #quakeworld #fuhquake #serv-u |
|
Back to top |
|
|
Connor
Joined: 03 Oct 2002
Posts: 64
Location: Toronto,Canada
|
Posted: Wed Mar 17, 2004 4:46 am Post subject: |
|
|
I tried q2 evolved...its great, but the trails look sorta lame ingame compared to the screens...I like the Fuh's qmb modified trails better.
1024 image scaled to 512
To me ingame the trails look nothing like the pics...I was thinking I had to get the newer version, untill I looked at the screens I took. |
|
Back to top |
|
|
Torn
Joined: 04 Nov 2003
Posts: 7
|
Posted: Fri Mar 19, 2004 11:20 pm Post subject: |
|
|
It would be cool if you could control the transparency of explosions and trails! |
|
Back to top |
|
|
|
|
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 vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|