collision - is this possible with 12?
by Nermion · in General Discussion · 07/04/2001 (3:21 am) · 12 replies
I'd like to know if the following is possible with V12...
Let's say I have two players, they are fighting eachother...(ie a fighting game :) What I want to do is be able to detect exactly where the players are hit. For example if one one player kicks his foot in the air and hits the other player I'd like to know what got hit, was it the arm, the head or maybe the neck that got hit? Now I want to use seamless meshes, and I know it would be much easier if I "sliced" the player characters into different pieces (hierarchically organized) for each body part that I want to be be able to pick out was exactly got hit... that is one solution but I really want the models to be seamless,
so if v12 allowed or supported something like this:
For example I could use the bones to make collision boxes. Using my characters skelleton I could define which bones were going to be checked against collision. Then I would set collision boxes around these bones and voila now I could dectect exactly what was hit... ie arm, leg, torso, head etc...
Is this possible right now in v12? If it is I am looking forward v12 :)
Ah yes one more question...
When I import my model in the engine, are bones of the model imported as well? Can I animate these by saying for example in script something like
bone = hey_get_me_that_bone(bone_name);
bone.now_rotate_this_bone_around_x_axis(90);
if so then I am really looking forward the engine :)
if not then I am really looking forward this being added later on :) so I can foxus on making my game and coding game logics, I know source code is there but I am not feeling like I want to dig in and do it all my self :)
cheeeeeers
Let's say I have two players, they are fighting eachother...(ie a fighting game :) What I want to do is be able to detect exactly where the players are hit. For example if one one player kicks his foot in the air and hits the other player I'd like to know what got hit, was it the arm, the head or maybe the neck that got hit? Now I want to use seamless meshes, and I know it would be much easier if I "sliced" the player characters into different pieces (hierarchically organized) for each body part that I want to be be able to pick out was exactly got hit... that is one solution but I really want the models to be seamless,
so if v12 allowed or supported something like this:
For example I could use the bones to make collision boxes. Using my characters skelleton I could define which bones were going to be checked against collision. Then I would set collision boxes around these bones and voila now I could dectect exactly what was hit... ie arm, leg, torso, head etc...
Is this possible right now in v12? If it is I am looking forward v12 :)
Ah yes one more question...
When I import my model in the engine, are bones of the model imported as well? Can I animate these by saying for example in script something like
bone = hey_get_me_that_bone(bone_name);
bone.now_rotate_this_bone_around_x_axis(90);
if so then I am really looking forward the engine :)
if not then I am really looking forward this being added later on :) so I can foxus on making my game and coding game logics, I know source code is there but I am not feeling like I want to dig in and do it all my self :)
cheeeeeers
#2
Jake
07/05/2001 (11:01 am)
I think that there is some functionality for this already in the engine, but I'm not sure to what extent. I do know that the sniper rifle does more damage if you tag em in the head, so there is at least some mechanism for determining if the head has been hit. But I don't know about the other body parts. Hopefully it won't be too hard to extend.Jake
#3
Currently it reports back the Verticle Position:
Head , Torso, Leg
And the quadrant the damage happened at:
front_right, front_left, back_right, back_left
There may also be:
front_middle, back_middle
07/05/2001 (12:40 pm)
T2 (and T1) both work on a quadrant system.Currently it reports back the Verticle Position:
Head , Torso, Leg
And the quadrant the damage happened at:
front_right, front_left, back_right, back_left
There may also be:
front_middle, back_middle
#4
a vertex that belongs to the head, torzo, leg etc...
so I asume somewhere in the process of making my model I will define what vertex belongs to what body part, so that the engine knows what to report back...
IF indeed this is the way it works, this is just damn coool and it more then I could have hopped for :)
Anyone from the v12 team can confirm this or provide some more info on this?!?! :)
anyways I guess AAA engine like V12 :) does indeed support what I am looking for so I am really looking forward the release... I've got this god damn game in my mind I want to make... I'll be working on the demo first, if it is recieved well I'll proceede on the making a full game out of it:)
I put up some screens on the character I modeled the other day, here take a look:
http://www.dreamwater.org/gema/titan_01.jpg
http://www.dreamwater.org/gema/titan_03.jpg
http://www.dreamwater.org/gema/titan_02.jpg
GEMA - one man army :)
07/05/2001 (3:43 pm)
So you say it reports back vertex "membership" be ita vertex that belongs to the head, torzo, leg etc...
so I asume somewhere in the process of making my model I will define what vertex belongs to what body part, so that the engine knows what to report back...
IF indeed this is the way it works, this is just damn coool and it more then I could have hopped for :)
Anyone from the v12 team can confirm this or provide some more info on this?!?! :)
anyways I guess AAA engine like V12 :) does indeed support what I am looking for so I am really looking forward the release... I've got this god damn game in my mind I want to make... I'll be working on the demo first, if it is recieved well I'll proceede on the making a full game out of it:)
I put up some screens on the character I modeled the other day, here take a look:
http://www.dreamwater.org/gema/titan_01.jpg
http://www.dreamwater.org/gema/titan_03.jpg
http://www.dreamwater.org/gema/titan_02.jpg
GEMA - one man army :)
#5
The bones are imported, or exported, from max. There currently isn't any bone transform level control from the scripting language. This type of control is done using animation sequences defined in max (rotate head, rotate arms, etc.). The animation control system allows running multiple animation sequences at once, and script interface functions are provided. If you really wanted to control individual bone transforms directly... you'll have the source :)
I not sure where the quadrant system used in tribes is being calculate, that may actually be in script code. I don't think it's using information from the actually collision engine though.
07/06/2001 (4:00 pm)
The V12 does support collision with convex polyhedrons attached to bones. The bones can also be used to animate a "skinned" vertex weighted mesh (used for the animals in Trophy Hunting) or each bone can optionally have individual static meshes attached to them (like Tribes). I think you can collide a box, line, and possible another convex polyhedron against the collision hierarchy, but I'm pretty sure you can't collide two player shapes against each other at the level your talking about. All the support functions are there though, so this wouldn't be too hard to add.The bones are imported, or exported, from max. There currently isn't any bone transform level control from the scripting language. This type of control is done using animation sequences defined in max (rotate head, rotate arms, etc.). The animation control system allows running multiple animation sequences at once, and script interface functions are provided. If you really wanted to control individual bone transforms directly... you'll have the source :)
I not sure where the quadrant system used in tribes is being calculate, that may actually be in script code. I don't think it's using information from the actually collision engine though.
#6
but if let's say if I could put collision boxes around objects I could achieve what I am
looking for without the need to dig in the source code and adding all the features
that I need my self :) (really I want to start coding the game logics asp...)
So lets say I put a collision box around each bone, so when bone is animated the collision box
that belongs to that bone is animated as well and it would only check against other collision
boxes not the actual shapes of the players... when the other box is hit I can find what box it was
and then do the appropriate action...
now does script allow for creating and putting collision boxes around objects, lets
say bones :) if not I guess at least this would not be hard to add...
07/06/2001 (6:15 pm)
Tim you say it may not be possible to collide the player shapes at the level I am looking for,but if let's say if I could put collision boxes around objects I could achieve what I am
looking for without the need to dig in the source code and adding all the features
that I need my self :) (really I want to start coding the game logics asp...)
So lets say I put a collision box around each bone, so when bone is animated the collision box
that belongs to that bone is animated as well and it would only check against other collision
boxes not the actual shapes of the players... when the other box is hit I can find what box it was
and then do the appropriate action...
now does script allow for creating and putting collision boxes around objects, lets
say bones :) if not I guess at least this would not be hard to add...
#7
07/06/2001 (7:56 pm)
The engine already supports collision boxes on the "bones". What it doesn't support is testing one set of bone boxes against another set. You would have to write a function that would loop through and test all of shape A's collsion boxes against shape B's. The functions to test the intersection are already there, it shouldn't be hard to add the loop.
#8
11/10/2001 (8:15 pm)
bump
#9
Thus,
PartCountA * PartCountB = NumCompareOps_bignumber
or
(AttackGeomA * PartCountB) + (AttackGeomB * PartCountA) = NumCompareOps_smallernumber
Let me know if you get this working. Sound way cool.
-Ken =]
10/17/2002 (9:23 pm)
Rather than colliding every part against every other, perhaps you could use a set of attack geometry (fists and feet) and collide them against the whole other body. Thus,
PartCountA * PartCountB = NumCompareOps_bignumber
or
(AttackGeomA * PartCountB) + (AttackGeomB * PartCountA) = NumCompareOps_smallernumber
Let me know if you get this working. Sound way cool.
-Ken =]
#10
01/31/2003 (3:24 pm)
Hmmm... I've been looking and I don't see where you can test for a player's bone collision. Where is it?
#11
I'd give take the current hitboxes a step further by allowing the user to define if a certain hitbox is also an attack hitbox (view the player datablock, similarly to how hitboxes sizes get defined). Then you'd probably make a script invoked function to play attack threads and check attack hitboxes on the player against players which are in the working collision list (nearby objects basically). If the attack hitbox collides with a player bounding box, you proceed to check that player's hitboxes with your box. I'm not sure of how expensive an axis aligned box to axis aligned box collion test is though. There's a function implemented in Torque for that but I think it's only used in the editor.
You'd probably only need 4 of the hitboxes to also be attach hitboxes (the lower leg ones and the forearms...maybe the head if you want headbutts). Obviously you only perform the checks when the player is playing the attack thread.
Anyhow hope that's of some help :)
01/31/2003 (4:42 pm)
Here's what I'd try (supposing you implement hitboxes similar to how I did, there's a tutorial up on my site and I think Josh Albrecht posted his one too).I'd give take the current hitboxes a step further by allowing the user to define if a certain hitbox is also an attack hitbox (view the player datablock, similarly to how hitboxes sizes get defined). Then you'd probably make a script invoked function to play attack threads and check attack hitboxes on the player against players which are in the working collision list (nearby objects basically). If the attack hitbox collides with a player bounding box, you proceed to check that player's hitboxes with your box. I'm not sure of how expensive an axis aligned box to axis aligned box collion test is though. There's a function implemented in Torque for that but I think it's only used in the editor.
You'd probably only need 4 of the hitboxes to also be attach hitboxes (the lower leg ones and the forearms...maybe the head if you want headbutts). Obviously you only perform the checks when the player is playing the attack thread.
Anyhow hope that's of some help :)
#12
01/31/2003 (7:39 pm)
Yeah, I'm pretty familiar with Josh's work. Unfortunately, that isn't quite what I need. If what Tim Gift said was correct (and I understood him correctly), and the engine already has a collision box on the "bones", that would be perfect.
Torque Owner Greg Findlay
I'd imagine you could do basically anything because everything is there to be changed.
Alcarus