Can Torque handle this?
by Zen_Budha · in General Discussion · 03/31/2005 (11:28 pm) · 10 replies
I know in the older Torque FPS demo that the crossbow had ballistic's in that it arc'd when fired. Yet in the new Torque demo it seems to have been removed?
What I am wondering is can Torque handle (if done right) weapon ballistic's and collision for high speed projectile's?
Such as rifle rounds moving at realistic speeds and trajectories? I imagine getting the trajectories right would take some effort, but i have seen other engines that run into collision problems with such high speed projectiles.
Such as a projectile moving at 2700 feet per second (converted to torque units of course). Given if I have to crank them back a little so long as I can keep the proper flight path that'll be ok as well.
Also I'm assuming it does but once again I've used engines that don't support a way (without 30 tricks) to affect projectile accuracy?
Basically I am hoping and planning to have authentic weapon ballistic's as well as authentic weapon performance. I have these weapons on hand and am a NRA bolt action rifle marksman so testing to get things accurate isn't a problem so long as torque will handle it.
I'm also planning on having two modes of aiming (if possible which I'm sure it is or I'll pay a programmer to make it so) one ation style aiming like any old FPS yet with a less than precise crosshair to keep close confrontations fluid, and fun. As well as a second style of aiming with real sights like Operation Flashpoint or America's Army for more precision long range aiming.
What I am wondering is can Torque handle (if done right) weapon ballistic's and collision for high speed projectile's?
Such as rifle rounds moving at realistic speeds and trajectories? I imagine getting the trajectories right would take some effort, but i have seen other engines that run into collision problems with such high speed projectiles.
Such as a projectile moving at 2700 feet per second (converted to torque units of course). Given if I have to crank them back a little so long as I can keep the proper flight path that'll be ok as well.
Also I'm assuming it does but once again I've used engines that don't support a way (without 30 tricks) to affect projectile accuracy?
Basically I am hoping and planning to have authentic weapon ballistic's as well as authentic weapon performance. I have these weapons on hand and am a NRA bolt action rifle marksman so testing to get things accurate isn't a problem so long as torque will handle it.
I'm also planning on having two modes of aiming (if possible which I'm sure it is or I'll pay a programmer to make it so) one ation style aiming like any old FPS yet with a less than precise crosshair to keep close confrontations fluid, and fun. As well as a second style of aiming with real sights like Operation Flashpoint or America's Army for more precision long range aiming.
About the author
#2
And no problems with collision at those speeds? For example 3D Rad anything much faster than a paintball gun it has collision problems, and I was using Reality Factory (with good results) but even still extremely fast projectiles cause problems. No built in variable for inncuracy, and gravity was poor which meant no ballistic's.
04/01/2005 (12:03 pm)
Yes that is true about arc. They're all the same except for speed, and drag. Wow thats a simple answer and what I was hoping to see about implementing those features.And no problems with collision at those speeds? For example 3D Rad anything much faster than a paintball gun it has collision problems, and I was using Reality Factory (with good results) but even still extremely fast projectiles cause problems. No built in variable for inncuracy, and gravity was poor which meant no ballistic's.
#3
Chaingun rounds weren't ballistic, but they were fast projectiles (with built-in inaccuracy), and I don't remember any collision problems with them. And I remember some mods with ballistic sniper rifles (with gravity drop), I never heard of any problems like that with those.
Just about any physics problem that was standard for an FPS 3-4 years ago, Torque should handle fine. More modern stuff (like ragdoll physics, true aerodynamics, or variable surface friction), you'd probably have to add.
04/01/2005 (9:07 pm)
In Tribes at least ballistic weaponry was pretty common. Tribes 1 had a few odd collision issues (if a ballistic projectile hit a vertex *just* right, it could fall through, but it only seemed to happen with Mortar rounds that hadn't fused yet, but were just sitting on the ground rather than moving around), but I think those all got cleared up for Tribes 2 (Torque is the continued development of the engine for those games).Chaingun rounds weren't ballistic, but they were fast projectiles (with built-in inaccuracy), and I don't remember any collision problems with them. And I remember some mods with ballistic sniper rifles (with gravity drop), I never heard of any problems like that with those.
Just about any physics problem that was standard for an FPS 3-4 years ago, Torque should handle fine. More modern stuff (like ragdoll physics, true aerodynamics, or variable surface friction), you'd probably have to add.
#4
The problem was that projectiles fired via game code automatically calculated their trajectory to hit whatever object was at the center of the crosshair. If you spawned the projectile it didn't include that calculation and aimed the weapon at the center of the crosshair at infinity.
I hand calculated tables to correct it in Tribes 1... Fun Fun.
04/01/2005 (9:27 pm)
One interesting thing most people never knew about T1, if you spawned a projectile using the scripting system... the projectile didn't fire where you expected it to go, usually it fired down and to the right.The problem was that projectiles fired via game code automatically calculated their trajectory to hit whatever object was at the center of the crosshair. If you spawned the projectile it didn't include that calculation and aimed the weapon at the center of the crosshair at infinity.
I hand calculated tables to correct it in Tribes 1... Fun Fun.
#5
04/01/2005 (11:27 pm)
If I recall correctly, Tribes 1 projectiles used the collision impact system like rigid shapes... and in Tribes 2 they began using ray casts.
#6
04/02/2005 (2:28 pm)
Nope, T2 used collision impact also. You could use ray casts if you wanted, but none of the projectile weapons did.
#7
04/02/2005 (3:11 pm)
I thought that LinearProjectile used raycasts?
#8
This straight line approximation of a ballistic projectile would only be a problem if gravity were way high. If gravity is a reasonable value then the curve will always be well approximated by the per-server-tick line segment.
04/02/2005 (4:01 pm)
The projectile code does use raycasts for collision...but not a single raycast. Each server tick it calculates a line segment representing the projectiles current location and its next location. Any object intersecting this line segment (uses raycast...) collides with the projectile.This straight line approximation of a ballistic projectile would only be a problem if gravity were way high. If gravity is a reasonable value then the curve will always be well approximated by the per-server-tick line segment.
#9
And since modelling rifle shots only makes sense over long range (otherwise you wouldn't notice the difference vs. a single raycast) I'm thinking Zen_Buddha might need to at least experiment with different tick rates to make sure he's getting accurate results.
04/03/2005 (8:13 am)
This is also a situation where error tends to accumulate, so if you're interested in very accurate physics, long ranges could be problematic as well as high gravity.And since modelling rifle shots only makes sense over long range (otherwise you wouldn't notice the difference vs. a single raycast) I'm thinking Zen_Buddha might need to at least experiment with different tick rates to make sure he's getting accurate results.
#10
To generate an impact spread (inaccuracy), I randomized the initial weapon vector in script. This too seems to work pretty well. I haven't tested this with well-aimed shots using an iron sight because I don't know how to do iron sights yet, but the numbers are easily changed to tighten/lossen the impact spread. Theoretically, the numbers produce inaccuracy in MOA increments, but I haven't confirmed this with measured test firing yet. (I'm having trouble figuring out how to make the calculations from measured data at impact point, but that's another story.)
Bottom line is you can do what you're talking about in terms of ballistics. And, I would bet that this is even better then AA because I think they just use the "isProjectile" tag in UnrealScript, which does a straightline shot. i.e, I don't think their rifle shots are actually ballistic. I remember being able to tag somebody from a Km with the sniper rifle aimed dead center. That just isn't right, even with a sniper rifle, you would expect a mil or two of drop at that range. This is just me guessing, but I think the ballistics capability in Torque exceed what you see in AA.
10/07/2005 (11:24 am)
I've modelled an M-16 round at 853 mps with a true ballistic arc with air resistance included and it works fine. Torque has no problem with high speed projectiles. I've tested it from 100 m all the way to maximum range (about 3600 m) and it behaves as expected. To generate an impact spread (inaccuracy), I randomized the initial weapon vector in script. This too seems to work pretty well. I haven't tested this with well-aimed shots using an iron sight because I don't know how to do iron sights yet, but the numbers are easily changed to tighten/lossen the impact spread. Theoretically, the numbers produce inaccuracy in MOA increments, but I haven't confirmed this with measured test firing yet. (I'm having trouble figuring out how to make the calculations from measured data at impact point, but that's another story.)
Bottom line is you can do what you're talking about in terms of ballistics. And, I would bet that this is even better then AA because I think they just use the "isProjectile" tag in UnrealScript, which does a straightline shot. i.e, I don't think their rifle shots are actually ballistic. I remember being able to tag somebody from a Km with the sniper rifle aimed dead center. That just isn't right, even with a sniper rifle, you would expect a mil or two of drop at that range. This is just me guessing, but I think the ballistics capability in Torque exceed what you see in AA.
Torque Owner Mike Kuklinski
The ballistic support, you can just compare the old datablock and the new if you really think there is a difference--- for inaccuracy, there is a resource somewhere on GG that tells you how to implement that.
Note, that when working with ballistic arcs... theoretically all projectiles should have the same arc, since gravity effects them all the same (Approx. -9.8m/s). The length of the arc from beginning to end would of course depend on the projectiles speed---air density and resistance would be negligable, although if you want wind to be taken into account, you might have to code that into the projectiles code yourself, I am not sure if that is already in or not.