Inside3D!
     

GLQuake: Per Poly Collision (not new)

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Programming Tutorials
View previous topic :: View next topic  
Author Message
Baker



Joined: 14 Mar 2006
Posts: 1538

PostPosted: Tue Aug 10, 2010 2:42 pm    Post subject: GLQuake: Per Poly Collision (not new) Reply with quote

http://www.telefragged.com/thefatal/q_tutorials/quake_perpoly_collision.txt

Team Xlink linked me up this once. Didn't want to lose the URL forever ...

Note: I don't see anything GLQuake specific in there.
_________________
Tomorrow Never Dies. I feel this Tomorrow knocking on the door ...
Back to top
View user's profile Send private message
frag.machine



Joined: 25 Nov 2006
Posts: 728

PostPosted: Tue Aug 10, 2010 4:05 pm    Post subject: Reply with quote

Great tutorial, I used this to add per-poly collision on Q2K4.
_________________
frag.machine - Q2K4 Project
http://fragmachine.quakedev.com/
Back to top
View user's profile Send private message Visit poster's website
reckless



Joined: 24 Jan 2008
Posts: 390
Location: inside tha debugger

PostPosted: Tue Aug 10, 2010 5:33 pm    Post subject: Reply with quote

ah aye remember that one Smile

also a rudimentary version of a shadow volumes tutorial from rich allthough i newer got it working quite right (misses collison detection).

did look quite stunning for its time though Wink
Back to top
View user's profile Send private message
Baker



Joined: 14 Mar 2006
Posts: 1538

PostPosted: Tue Aug 10, 2010 11:18 pm    Post subject: Reply with quote

Well, does this actually work?

I was shooting the air next to an ogre with the nail gun and getting blood sprites in Q2K4.

I was curious as to see this in action. Or am I doing something wrong?

sv_perpoly_collision was 1.

This one has me so curious that I am dying to see it in action. In particular the excitement is that I notice it isn't GL specific and I'm wondering about the possibilities of a server using it.
_________________
Tomorrow Never Dies. I feel this Tomorrow knocking on the door ...
Back to top
View user's profile Send private message
frag.machine



Joined: 25 Nov 2006
Posts: 728

PostPosted: Wed Aug 11, 2010 1:19 am    Post subject: Reply with quote

Baker wrote:
Well, does this actually work?

I was shooting the air next to an ogre with the nail gun and getting blood sprites in Q2K4.

I was curious as to see this in action. Or am I doing something wrong?



Yes, indeed it works. Problem is that PPC actually won't work with rockets and nails because this:

Code:

float   MOVETYPE_FLYMISSILE      = 9;   // fly with extra size against monsters


Try to use the shotgun or the thunderbolt and you can see it in action.
_________________
frag.machine - Q2K4 Project
http://fragmachine.quakedev.com/
Back to top
View user's profile Send private message Visit poster's website
Baker



Joined: 14 Mar 2006
Posts: 1538

PostPosted: Wed Aug 11, 2010 2:03 am    Post subject: Reply with quote

frag.machine wrote:
Baker wrote:
Well, does this actually work?

I was shooting the air next to an ogre with the nail gun and getting blood sprites in Q2K4.

I was curious as to see this in action. Or am I doing something wrong?



Yes, indeed it works. Problem is that PPC actually won't work with rockets and nails because this:

Code:

float   MOVETYPE_FLYMISSILE      = 9;   // fly with extra size against monsters


Try to use the shotgun or the thunderbolt and you can see it in action.


I'll play with it some more then.
_________________
Tomorrow Never Dies. I feel this Tomorrow knocking on the door ...
Back to top
View user's profile Send private message
Baker



Joined: 14 Mar 2006
Posts: 1538

PostPosted: Wed Aug 11, 2010 2:48 am    Post subject: Reply with quote



Darn, looks like it is only certain types of collision.

I was hoping it was all alias vs. alias model, but I am standing on the top of the grunt.

Projectiles --- I can understand but maybe that can be altered ... a task for a rainy day.

[One gem I noticed that your interpolation doesn't have the classic "load a game and see frame 0 for a split second problem" -- JoeQuake doesn't either but I haven't been able to determine what change or why from there.]
_________________
Tomorrow Never Dies. I feel this Tomorrow knocking on the door ...
Back to top
View user's profile Send private message
reckless



Joined: 24 Jan 2008
Posts: 390
Location: inside tha debugger

PostPosted: Wed Aug 11, 2010 3:44 am    Post subject: Reply with quote

hmm not sure tbh mh made some fixes to the interpolation code quite early and it was adopted into several engines like the nailgun spindown fix. (as early as mhquake 5 i believe).

and yup the ppc code worked but still had a few rough edges try nightmare with it on Razz good luck Twisted Evil
Back to top
View user's profile Send private message
frag.machine



Joined: 25 Nov 2006
Posts: 728

PostPosted: Wed Aug 11, 2010 12:17 pm    Post subject: Reply with quote

Baker wrote:
[One gem I noticed that your interpolation doesn't have the classic "load a game and see frame 0 for a split second problem" -- JoeQuake doesn't either but I haven't been able to determine what change or why from there.]


It's very likely that I applied some fix from someone else for the original interpolation tutorials (Tomaz I suppose, Q2K4 borrowed a lot of features from TomazQuake and QBism), I don't remember. I apologize to the author for my lack of credits in the README Very Happy
_________________
frag.machine - Q2K4 Project
http://fragmachine.quakedev.com/
Back to top
View user's profile Send private message Visit poster's website
Sajt



Joined: 16 Oct 2004
Posts: 1026

PostPosted: Wed Aug 11, 2010 3:05 pm    Post subject: Reply with quote

frag.machine wrote:
Problem is that PPC actually won't work with rockets and nails because this


Whoa, you scared me for a minute there. I thought you meant PPC as in PowerPC (old Macs, Xbox, etc), as in endianness issues.

Baker wrote:
I was hoping it was all alias vs. alias model, but I am standing on the top of the grunt.


Here is an interesting scenario for you to ponder before you try that. Something sits on a grunt's arm. Then due to animation the grunt's arm moves upward.
_________________
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
Baker



Joined: 14 Mar 2006
Posts: 1538

PostPosted: Thu Aug 12, 2010 12:46 pm    Post subject: Reply with quote

Sajt wrote:
Here is an interesting scenario for you to ponder before you try that. Something sits on a grunt's arm. Then due to animation the grunt's arm moves upward.


Heheh ... ok then!
_________________
Tomorrow Never Dies. I feel this Tomorrow knocking on the door ...
Back to top
View user's profile Send private message
Spike



Joined: 05 Nov 2004
Posts: 944
Location: UK

PostPosted: Thu Aug 12, 2010 4:46 pm    Post subject: Reply with quote

to be fair, that applies even if its a rocket or nail, sometimes it'll just move through without hitting anything at all. Thus tracelines are really the only reliable use.
Bones or whatever can have a radius and would thus permit non-instant hitmodel stuff, plus they can be directly controlled too, and with ragdoll it all works out.
In DP and FTE, hitmodel is activated based upon SV_Move/Traceline flags (in the nomonsters argument), rather than being an extra argument to SV_Move/foced by traceline.
QuakeWorld generally doesn't load non-bsp models, but NQ should already load that stuff anyway (which is why vanilla glquake -dedicated crashes).
_________________
What's a signature?
Back to top
View user's profile Send private message Visit poster's website
Baker



Joined: 14 Mar 2006
Posts: 1538

PostPosted: Thu Aug 12, 2010 5:31 pm    Post subject: Reply with quote

Spike wrote:
to be fair, that applies even if its a rocket or nail, sometimes it'll just move through without hitting anything at all. Thus tracelines are really the only reliable use.


Even with these limitations the lightning gun and the shotgun are the most insidiously evil weapons in multiplayer Quake.

It might be interesting to add this + enable as a dedicated server option to up the ante on those weapons.
_________________
Tomorrow Never Dies. I feel this Tomorrow knocking on the door ...
Back to top
View user's profile Send private message
Sajt



Joined: 16 Oct 2004
Posts: 1026

PostPosted: Thu Aug 12, 2010 6:22 pm    Post subject: Reply with quote

The other thing about hitmodel (for tracelines) is that it increases lag's game-ruiningness. As a (not so) extreme example, If you have a 200 ping, and the grunt is moving his arm upward or doing some other lateral-to-the-player's-line-of-sight movement, the player is going to have no chance of hitting his arm, except by accident, or if he memorizes the monster animations in detail and predicts them himself. It ends up with arbitrary-seeming hit or miss decisions, which are frustrating to players. Of course, in real life nobody should be expected to be able to hit a moving arm like that. But this situation exists in all subtler cases.

I don't know how much "unlagged" would alleviate this, but it probably would help. The other option (other than doing weapon traces client-side like Cube) would be I guess to use fattened hitboxes...

Half-Life had hitboxes roughly per limb in singleplayer, but used single big Quake-style bboxes in multiplayer, presumably because of this problem.

Just another complication to makes one cherish more the simpler days of 1996.
_________________
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
Baker



Joined: 14 Mar 2006
Posts: 1538

PostPosted: Fri Aug 13, 2010 3:34 am    Post subject: Reply with quote

Sajt wrote:
The other thing about hitmodel (for tracelines) is that it increases lag's game-ruiningness. As a (not so) extreme example, If you have a 200 ping, and the grunt is moving his arm upward or doing some other lateral-to-the-player's-line-of-sight movement, the player is going to have no chance of hitting his arm, except by accident, or if he memorizes the monster animations in detail and predicts them himself. It ends up with arbitrary-seeming hit or miss decisions, which are frustrating to players. Of course, in real life nobody should be expected to be able to hit a moving arm like that. But this situation exists in all subtler cases.

I don't know how much "unlagged" would alleviate this, but it probably would help. The other option (other than doing weapon traces client-side like Cube) would be I guess to use fattened hitboxes...

Half-Life had hitboxes roughly per limb in singleplayer, but used single big Quake-style bboxes in multiplayer, presumably because of this problem.

Just another complication to makes one cherish more the simpler days of 1996.


Realistically or even not, I shouldn't be able to shoot the air above an ogre or fiend and get a hit. It is entirely silly. This effect is largely diminished by the fact that most ppl would never do that since they don't know and would aim for the body.

Collision at a minimum at least among non-map models shouldn't involve "hits" well above or to the side of a non-Shambler sized monster. Admittedly this is a non-problem in non-coop mods as the Quake player model aligns rather well to the sizing of presumably that hull size.
_________________
Tomorrow Never Dies. I feel this Tomorrow knocking on the door ...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Programming Tutorials All times are GMT
Page 1 of 1

 
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