Index | FAQ | Search | Memberlist | Usergroups | Profile | Log in to check your private messages | Log in | Register

Bullehole tutorial???? Goto page 1, 2 Next

| Inside3d Forums Forum Index -> QuakeC Programming

View previous topic :: View next topic
Author | Message
--- | ---
Stealth Kill Joined: 29 Dec 2006 Posts: 83 |

Posted: Sun May 27, 2007 9:03 am Post subject: Bullehole tutorial???? |

There are lots of tutorials but i can´t find a Bullehole tutorial. Where can i find one?

Back to top |

FrikaC Site Admin Joined: 08 Oct 2004 Posts: 947 |

Posted: Sun May 27, 2007 6:05 pm Post subject: |

Hrm. No one has ever written one apparently (I looked over on both MDQNet and QCX's tutorial lists, didn't check AI Cafe, but that's not exactly Coffee's main forte, so I doubt he'd have one).

Back to top |

leileilol Joined: 15 Oct 2004 Posts: 1321 |

Posted: Sun May 27, 2007 7:10 pm Post subject: |

TomazMod had bulletholes. Hipnotic had bulletholes too, but they sucked. XWAR also had bullet holes, but its decal system qc looks like decompiled code (hrm)

Back to top |

Sajt Joined: 16 Oct 2004 Posts: 1026 |

Posted: Sun May 27, 2007 9:01 pm Post subject: |

Hehe... xwar. Didn't finalquake-real have bulletholes, at least on the railgun? They were a little crappy though... edit: Durr.. speaking of fqreal, Cheapy can you hit me up with that too? I love you. _________________ F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.

Back to top |

leileilol Joined: 15 Oct 2004 Posts: 1321 |

Posted: Sun May 27, 2007 10:01 pm Post subject: |

http://mancubus.net/~cheapy/lostmods/2000/fqreal.zip They did have QC code available but i lost it :/

Back to top |

Boss429 Joined: 03 Dec 2006 Posts: 22 |

Posted: Mon May 28, 2007 6:41 am Post subject: |

DarkPlaces has bullet holes. Does anybody know how to change the texture of them though?

Back to top |

leileilol Joined: 15 Oct 2004 Posts: 1321 |

Posted: Mon May 28, 2007 8:46 am Post subject: |

particlefont.tga

Back to top |

Stealth Kill Joined: 29 Dec 2006 Posts: 83 |

Posted: Mon May 28, 2007 11:25 am Post subject: |

Hmmmm I´m trying to modifie the bloodsplat on wall tut.

Back to top |

Dr. Shadowborg Inside3D Staff Joined: 16 Oct 2004 Posts: 726 |

Posted: Mon May 28, 2007 5:23 pm Post subject: |

The main things to keep in mind: 1. Keep track of how many you actually have. This way, you can remove the oldest ones and not get packet overflows / edict death. 2. Use traceline's trace_plane_normal to properly align your bullethole sprite's angles along the wall. This is actually quite easy if you're using just hitscan weapons, somewhat less easy (but still easy) when using projectiles.
I might put up my finalized rebovec function later if you really, really need it. (It's configured so that you can get a decent ricochet angle or just the trace_plane_normal)
_________________
"Roboto suggests Plasma Bazooka."

Back to top |

redrum Joined: 28 Mar 2007 Posts: 367 Location: Long Island, New York |

Posted: Tue Nov 13, 2007 4:55 am Post subject: |

Stealth, did u ever get the bulletholes to work? _________________ Welcome to the Overlook Hotel 69.113.123.178:27500

Back to top |

Nash Joined: 19 Oct 2007 Posts: 95 Location: Kuala Lumpur, Malaysia |

Posted: Tue Nov 13, 2007 1:01 pm Post subject: |

It's a pity that it's not possible to do true clipped decals like in Half-Life for example. All of the "decal" QC mods I've seen so far look cheap (cheaplol) because they don't wrap around the world's surface.

Back to top |

leileilol Joined: 15 Oct 2004 Posts: 1321 |

Posted: Tue Nov 13, 2007 1:14 pm Post subject: |

do you have any idea how hard that is _________________

Back to top |

Spike Joined: 05 Nov 2004 Posts: 944 Location: UK |

Posted: Tue Nov 13, 2007 4:38 pm Post subject: |

leileilol wrote:
do you have any idea how hard that is

Yeah, what you do, is you take a copy of the world. And you get 6 planes forming a bounding box. Gradually, you clip away every single surface in the entire world from this bounding box. Then, for each point in the resulting clipped triangle mesh, you assign an alpha value based on its distance from the original surface place, and you assign texture coords based on its relative distance along/up the original plane. You then have a clipped away triangle mesh which looks pretty. Obviously the front and back places of your bounding box are copies of the original surface place, just moved a bit further forwards/back. The side/up planes are also fun to calculate, so you generally need a rotation around the original plane too. Of course, this is an expensive operation, so you really do need to cache the results.
Oh wait... You wanted it in QC.
That's a whole 'nother story then!
_________________
What's a signature?

Back to top |

Stealth Kill Joined: 29 Dec 2006 Posts: 83 |

Posted: Tue Dec 18, 2007 9:46 pm Post subject: |

I have decompiled the fqreal progs.dat and here is my tutorial vor bullet holes. Download this bullet.qc http://www.file-upload.net/download-563593/bullet.qc.html And this for the bullet hole sprites http://mancubus.net/~cheapy/lostmods/2000/fqreal.zip
Add this to defs.qc

Code:
entity nullentity; // system entity bulletholes; // system entity lastbullet; // system float numbulletholes; // system entity rocketmarks; // system
entity lastmark; // system
float numrocketmarks; // system
.entity lastvictim;

And in Weapons.qc replace your firebullets function with this one

Code:
================ FireBullets Used by shotgun, super shotgun, and enemy soldier firing Go to the trouble of combining multiple pellets into a single damage call. ================
*/
void(float shotcount, vector dir, vector spread) FireBullets =
{
local float r;
local vector direction;
local vector src;
local float bullet;
bullet = 0;
makevectors(self.v_angle);
src = self.origin + v_forward * MOVETYPE_BOUNCE;
src_z = self.absmin_z + self.size_z * 0.7;
ClearMultiDamage();
while (shotcount > 0)
{
direction = dir + crandom() * spread_x * v_right + crandom() * spread_y * v_up;
traceline(src, src + direction * FL_WATERJUMP, 0, self);
if (trace_fraction != 1)
{
TraceAttack(MOVETYPE_STEP, direction);
}
if (!bullet && trace_ent == world)
{
r = random();
if (r < 0.33)
{
sound(trace_ent, CHAN_AUTO, "weapons/ric2.wav", 1, ATTN_NORM);
}
else
{
if (r < 0.66)
{
sound(trace_ent, CHAN_AUTO, "weapons/ric1.wav", 1, ATTN_NORM);
}
else
{
sound(trace_ent, CHAN_AUTO, "weapons/ric3.wav", 1, ATTN_NORM);
}
}
placebullethole(trace_endpos);
bullet = 1;
}
shotcount = shotcount - 1;
}
ApplyMultiDamage();
/*
bprint (trace_ent.classname);
bprint (".state = ");
bprint (ftos (trace_ent.state));
bprint ("\n");
*/
};
/*

my firebullets function is only for shotgun bulletholes you can make it yourself for rocktmarks.
here is the full decompiled weapons.qc from Final Quake Real
http://www.file-upload.net/download-563607/weapons.qc.html

Back to top |

redrum Joined: 28 Mar 2007 Posts: 367 Location: Long Island, New York |

Posted: Wed Dec 19, 2007 3:45 am Post subject: |

Need the PlaceBullethole(); function. _________________ Welcome to the Overlook Hotel 69.113.123.178:27500

Back to top |

Display posts from previous:

| Inside3d Forums Forum Index -> QuakeC Programming | All times are GMT Goto page 1, 2 Next
Page 1 of 2

Jump to:

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 © 2004 phpBB Group