Inside3D!
     

Bullehole tutorial????
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> QuakeC Programming
View previous topic :: View next topic  
Author Message
Stealth Kill



Joined: 29 Dec 2006
Posts: 83

PostPosted: Sun May 27, 2007 9:03 am    Post subject: Bullehole tutorial???? Reply with quote

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

Where can i find one?
Back to top
View user's profile Send private message
FrikaC
Site Admin


Joined: 08 Oct 2004
Posts: 947

PostPosted: Sun May 27, 2007 6:05 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
leileilol



Joined: 15 Oct 2004
Posts: 1321

PostPosted: Sun May 27, 2007 7:10 pm    Post subject: Reply with quote

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
View user's profile Send private message
Sajt



Joined: 16 Oct 2004
Posts: 1026

PostPosted: Sun May 27, 2007 9:01 pm    Post subject: Reply with quote

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
View user's profile Send private message
leileilol



Joined: 15 Oct 2004
Posts: 1321

PostPosted: Sun May 27, 2007 10:01 pm    Post subject: Reply with quote

http://mancubus.net/~cheapy/lostmods/2000/fqreal.zip

They did have QC code available but i lost it :/
Back to top
View user's profile Send private message
Boss429



Joined: 03 Dec 2006
Posts: 22

PostPosted: Mon May 28, 2007 6:41 am    Post subject: Reply with quote

DarkPlaces has bullet holes. Does anybody know how to change the texture of them though?
Back to top
View user's profile Send private message Visit poster's website
leileilol



Joined: 15 Oct 2004
Posts: 1321

PostPosted: Mon May 28, 2007 8:46 am    Post subject: Reply with quote

particlefont.tga
Back to top
View user's profile Send private message
Stealth Kill



Joined: 29 Dec 2006
Posts: 83

PostPosted: Mon May 28, 2007 11:25 am    Post subject: Reply with quote

Hmmmm I´m trying to modifie the bloodsplat on wall tut.
Back to top
View user's profile Send private message
Dr. Shadowborg
Inside3D Staff


Joined: 16 Oct 2004
Posts: 726

PostPosted: Mon May 28, 2007 5:23 pm    Post subject: Reply with quote

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
View user's profile Send private message
redrum



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

PostPosted: Tue Nov 13, 2007 4:55 am    Post subject: Reply with quote

Stealth, did u ever get the bulletholes to work?
_________________
Welcome to the Overlook Hotel 69.113.123.178:27500
Back to top
View user's profile Send private message Send e-mail
Nash



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

PostPosted: Tue Nov 13, 2007 1:01 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
leileilol



Joined: 15 Oct 2004
Posts: 1321

PostPosted: Tue Nov 13, 2007 1:14 pm    Post subject: Reply with quote

do you have any idea how hard that is
_________________
Back to top
View user's profile Send private message
Spike



Joined: 05 Nov 2004
Posts: 944
Location: UK

PostPosted: Tue Nov 13, 2007 4:38 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Stealth Kill



Joined: 29 Dec 2006
Posts: 83

PostPosted: Tue Dec 18, 2007 9:46 pm    Post subject: Reply with quote

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
View user's profile Send private message
redrum



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

PostPosted: Wed Dec 19, 2007 3:45 am    Post subject: Reply with quote

Need the PlaceBullethole(); function.
_________________
Welcome to the Overlook Hotel 69.113.123.178:27500
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    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