by date
"Destroyable objects for Torque" Pack Released
"Destroyable objects for Torque" Pack Released
| Name: | Apparatus | ![]() |
|---|---|---|
| Date Posted: | Aug 30, 2008 | |
| Rating: | 5.0 out of 5 | |
| Public: | YES | |
| Comments: | YES | |
| RSS Feed: | or Subscribe with . | |
| Profile Page: | View profile page for Apparatus |
Blog post
Ever wanted to actually affect the objects you shoot at, applying a bit of damage, maybe destroy it altogether in a ball of fire smoke and sparks, leaving only a smoking wreck behind?
Now you can.
Kaboom!Pack or Destroyable Objects for Torque will give you just that. A lot of examples to pick up from:
1. breakable objects ~ destroy an object entirely, onHit sound effect /particle effect per object;
2. breakable objects with damage states and wreck left on the map
3. explosive objects (derived from above)
BREAKABLE STRUCTURES :P ~ may seem tedious (is not really) but with a bit of work you can have your own destructive environments in Torque.
Lets explain the concept behind this pack for a little bit.
First of all, we needed a way of making things appear like they take damage. That was simple. We added onHit effects (particles and sounds) to each object.
Then we needed a way to apply 'visual' change on the object. Than could have been done by changing the texture or changing the shape altogether. Changing the shape seem the objous choice if we wanted various damage states and a broken /final model (the wreck).
Now, destroying crates is simple. Believe it or now, destroying buildings is just as simple. After all, a crate is a model and a building is a structure that can be created with many destroyable models. One simply has to design first how wants a building / structure to take damage and set out to create the parts; One of the most advanced engines around (Crytek) does things exactly the same - ok, we replaced the debris controlled by physics with debris controlled by script.
Here is a simplestructure example:

As you can see, there is a base structure model and each wall (just one in this shot) is a destroyable object.
Once we managed to destroy an object we needed to step further a bit and add more eye candy ~ after all, if you explode a barel nearby a building, you'd expect some burning / smoking debris left behind; So we added this too; After we destroyed the objects, here's how the mission looks like ~ a battlefield indeed : )

video:
YouTUBE link with alternative rock sound : )
Here are the actual changes made to the starter.fps stock 1.5.2:
SERVERSIDE CHANGES
"~/server/scripts/"
game.cs - adding execs for new files.
fxData.cs - location for shared effects (sounds, particles) new for destroyables, and generic template effects
bomb.cs
crossbow.cs
player.cs - added inventory limits for the bomb and ammo - see PlayerData(PlayerBody); commented out references to BulletAmmo, RifleAmmo, Rifle; added code for onHit style damagefx blood splatter - see function armor::Damage(), added a "damageFX" property to PlayerData(PlayerBody)
staticShape.cs - added control methods for destroyables
rigidShape.cs - moved from demo, added control methods for destroyables
"~/server/scripts/destroyables"
crate.cs
barrel.cs
tanks.cs
tree.cs
fence.cs
furniture.cs //removed chair table models
pottery.cs
simpleStructure.cs
warehouse.cs
"~/server/scripts/destroyables/rs" - example rigidshape destroyables scripts
expBoulder.cs
expCrate.cs
expBarrel.cs
CLIENT SIDE CHANGES
"~/client/scripts/"
default.bind.cs - added keybind "2" to use the bomb. Crossbow defaults to "1" DO NOT MOVE!!!
These are just additions on top of stock assets. Nothing was changed or removed.
for non-generic particle effects:
"~/data/shapes/particles/fire_A"
"~/data/shapes/particles/smoke_A"
"~/data/shapes/particles/splinterwood"
"~/data/shapes/particles/stonedebris"
"~/data/shapes/particles/spark_h3"
"~/data/shapes/particles/leaf01"
"~/data/shapes/particles/leaf02"
shared sound effects
"~/data/sound/destruction/explosion2.ogg"
"~/data/sound/destruction/destroyedcrate.wav"
"~/data/sound/destruction/woodhit.wav"
"~/data/sound/destruction/stereo/crumblewall.wav"
"~/data/sound/destruction/stereo/hitwall.wav"
"~/data/sound/destruction/stereo/hitmetal.wav"
"~/data/sound/destruction/stereo/metaldebris.wav"
for the bomb:
"~/data/special/expDecal"
"~/data/sound/h3/throw.ogg"
for crossbow:
"~/data/special/bowhit01"
"~/data/special/bowhit02"
"~/data/special/bowhit03"
"~/data/special/bowhit04"
"~/data/special/bowhit05"
"~/data/sound/destruction/quiver.ogg"
"~/data/sound/destruction/arrow_hitting.ogg"
Models breakdown list:

The pack comes with actually 2 starter.fps - a 'stock' one and a modified one courtesy of M (SilentMike) Hall. We would have liked to work more on the particle effects themselves but we decided to take the Particle editor for a fix later on, so anyone can create simple smoke or complex explosions.
All the work/scripting/coding was done by Mike. I just merely pushed the pen around complaining about everything. Much of the code is in there, ready to be discovered, cleaned up and used. Mike has a lot of experience from the Tribes days so he did a great job.
Some more screens:










Download Preview Doc Here
Product page
Special thanks to M(silentMike)Hall.
Now you can.
Kaboom!Pack or Destroyable Objects for Torque will give you just that. A lot of examples to pick up from:
1. breakable objects ~ destroy an object entirely, onHit sound effect /particle effect per object;
2. breakable objects with damage states and wreck left on the map
3. explosive objects (derived from above)
BREAKABLE STRUCTURES :P ~ may seem tedious (is not really) but with a bit of work you can have your own destructive environments in Torque.
Lets explain the concept behind this pack for a little bit.
First of all, we needed a way of making things appear like they take damage. That was simple. We added onHit effects (particles and sounds) to each object.
Then we needed a way to apply 'visual' change on the object. Than could have been done by changing the texture or changing the shape altogether. Changing the shape seem the objous choice if we wanted various damage states and a broken /final model (the wreck).
Now, destroying crates is simple. Believe it or now, destroying buildings is just as simple. After all, a crate is a model and a building is a structure that can be created with many destroyable models. One simply has to design first how wants a building / structure to take damage and set out to create the parts; One of the most advanced engines around (Crytek) does things exactly the same - ok, we replaced the debris controlled by physics with debris controlled by script.
Here is a simplestructure example:

As you can see, there is a base structure model and each wall (just one in this shot) is a destroyable object.
Once we managed to destroy an object we needed to step further a bit and add more eye candy ~ after all, if you explode a barel nearby a building, you'd expect some burning / smoking debris left behind; So we added this too; After we destroyed the objects, here's how the mission looks like ~ a battlefield indeed : )

video:
YouTUBE link with alternative rock sound : )
Here are the actual changes made to the starter.fps stock 1.5.2:
SERVERSIDE CHANGES
"~/server/scripts/"
game.cs - adding execs for new files.
fxData.cs - location for shared effects (sounds, particles) new for destroyables, and generic template effects
bomb.cs
crossbow.cs
player.cs - added inventory limits for the bomb and ammo - see PlayerData(PlayerBody); commented out references to BulletAmmo, RifleAmmo, Rifle; added code for onHit style damagefx blood splatter - see function armor::Damage(), added a "damageFX" property to PlayerData(PlayerBody)
staticShape.cs - added control methods for destroyables
rigidShape.cs - moved from demo, added control methods for destroyables
"~/server/scripts/destroyables"
crate.cs
barrel.cs
tanks.cs
tree.cs
fence.cs
furniture.cs //removed chair table models
pottery.cs
simpleStructure.cs
warehouse.cs
"~/server/scripts/destroyables/rs" - example rigidshape destroyables scripts
expBoulder.cs
expCrate.cs
expBarrel.cs
CLIENT SIDE CHANGES
"~/client/scripts/"
default.bind.cs - added keybind "2" to use the bomb. Crossbow defaults to "1" DO NOT MOVE!!!
These are just additions on top of stock assets. Nothing was changed or removed.
for non-generic particle effects:
"~/data/shapes/particles/fire_A"
"~/data/shapes/particles/smoke_A"
"~/data/shapes/particles/splinterwood"
"~/data/shapes/particles/stonedebris"
"~/data/shapes/particles/spark_h3"
"~/data/shapes/particles/leaf01"
"~/data/shapes/particles/leaf02"
shared sound effects
"~/data/sound/destruction/explosion2.ogg"
"~/data/sound/destruction/destroyedcrate.wav"
"~/data/sound/destruction/woodhit.wav"
"~/data/sound/destruction/stereo/crumblewall.wav"
"~/data/sound/destruction/stereo/hitwall.wav"
"~/data/sound/destruction/stereo/hitmetal.wav"
"~/data/sound/destruction/stereo/metaldebris.wav"
for the bomb:
"~/data/special/expDecal"
"~/data/sound/h3/throw.ogg"
for crossbow:
"~/data/special/bowhit01"
"~/data/special/bowhit02"
"~/data/special/bowhit03"
"~/data/special/bowhit04"
"~/data/special/bowhit05"
"~/data/sound/destruction/quiver.ogg"
"~/data/sound/destruction/arrow_hitting.ogg"
Models breakdown list:

The pack comes with actually 2 starter.fps - a 'stock' one and a modified one courtesy of M (SilentMike) Hall. We would have liked to work more on the particle effects themselves but we decided to take the Particle editor for a fix later on, so anyone can create simple smoke or complex explosions.
All the work/scripting/coding was done by Mike. I just merely pushed the pen around complaining about everything. Much of the code is in there, ready to be discovered, cleaned up and used. Mike has a lot of experience from the Tribes days so he did a great job.
Some more screens:










Download Preview Doc Here
Product page
Special thanks to M(silentMike)Hall.
Recent Blog Posts
| List: | 11/04/08 - Kork 2.0, halted work 09/24/08 - Constructor Pipeline (I) 09/23/08 - Interior Guide Pack Free Download 09/23/08 - Kaboom! Pack for TGEA 09/15/08 - About Constructor 09/11/08 - Interior Guide Pack Released 09/10/08 - Associate Rant 09/08/08 - Interior Guide Pack update |
|---|
Submit your own resources!| Morrock (Aug 30, 2008 at 21:54 GMT) Resource Rating: 5 |
| Jaimi McEntire (Aug 30, 2008 at 22:02 GMT) |
| Apparatus (Aug 30, 2008 at 22:07 GMT) Resource Rating: 5 |
jaimi~ It should work, I will test it; it's really just the scripts and particles.
//staticShape.cs - added control methods for destroyables//
//rigidShape.cs - moved from demo, added control methods for destroyables//
if these don;t interfere with tgea innerworkings, it must work.
Edited on Aug 30, 2008 22:08 GMT
| Kory James (Aug 30, 2008 at 22:41 GMT) Resource Rating: 5 |
Also i will send you a email
Keep up the amazing work
Edited on Aug 30, 2008 22:43 GMT
| Ross Cook (Aug 30, 2008 at 23:39 GMT) Resource Rating: 5 |
Out of interest, would it be relatively easy to adapt this for destruction on collision? I'm working on a street racer and have drive-through destructible scenery on my to-do list, so hopefully this will save me some time.
| Morrock (Aug 30, 2008 at 23:44 GMT) Resource Rating: 5 |
| Michael (silentMike) Hall (Aug 31, 2008 at 00:28 GMT) |
@Jaime: It should work just fine in TGEa. The particles may need a some adjusting, but the scripts themselves just build on what's already there for tracking damage levels and states.
My old laptop broke (how appropriate was that) about the time we started this, so I ended up building a spare parts computer just so I could work on it. Unfortunately TGEa refuses to run on it so I never got to test it there.
@Ross: It would be easy to switch over to an onCollision type damage control, but I think you would end up with collision time resolution problems that would stop you dead in your tracks - that would be bad for a racer. But it could probably be worked out with a little work.
@Morrock: Things changed quite a bit from that Siege prototype, but now I know how to do it even better. The rigid body/shape physics in Torque still needs some work, so we went mostly with a staticshape approach here.
| Morrock (Aug 31, 2008 at 00:37 GMT) Resource Rating: 5 |
| Frank Bignone (Aug 31, 2008 at 01:25 GMT) |
| Ian Roach (Aug 31, 2008 at 01:35 GMT) |
This will go really well with the Explosions FX pack :D
| Andy Hawkins (Aug 31, 2008 at 02:09 GMT) |
| T Squared (Thanhda Tie) (Aug 31, 2008 at 02:26 GMT) |
| Daniel Buckmaster (Aug 31, 2008 at 06:24 GMT) |
I like the way the crossbow arrows stay in the world; is that a custom feature, or tweaking scripts?
| Apparatus (Aug 31, 2008 at 17:37 GMT) Resource Rating: 5 |
TSquared@aye, i wonder if that's possible too;
Frank@ For a second there I wondered how you knew than i noticed your location is Beijing. It's kinda cool to be censored by the Great Wall though : )
| Michael (silentMike) Hall (Sep 01, 2008 at 08:22 GMT) |
@Daniel: those are the crossbow projectile's explosion decals.
I always thought the exploding crossbow bolt was silly. The effect of them remaining in the world is from using arrow shaped debris, so yes, all in script. They fade after time, but can easily be made permanent, also in script. But that would look odd on a moving object like the player or a vehicle as they wouldn't move with it.
| Morrock (Sep 01, 2008 at 16:30 GMT) Resource Rating: 5 |
Quote:
They fade after time, but can easily be made permanent, also in script. But that would look odd on a moving object like the player or a vehicle as they wouldn't move with it.
There is a resource out which allowed projectiles to stick out of players. It was a huge resource though, and I'm not sure if all of it is up to date with 1.5.2 however. That is a modification best left to the source, I can't think of any way to add arrows sticking out of non-static objects in script that wouldn't just overcomplicate things. If you'd like arrows to stick right out of the object instead of using a debris, you could just add a static arrow shape transformed by the collision's normal. Than schedule a delete a bit later.
Apparatus, did you record the demo on the WeGame software, or a commercial one? I was wondering if the WeGame recorder works with TGE or not.
| Apparatus (Sep 01, 2008 at 17:07 GMT) Resource Rating: 5 |
| Deborah Marshall (Sep 02, 2008 at 18:41 GMT) Resource Rating: 5 |

| Apparatus (Sep 02, 2008 at 18:54 GMT) Resource Rating: 5 |
In fact, thanks GG, and thanks Community too!
App.
Edited on Sep 02, 2008 18:55 GMT
You must be a member and be logged in to either append comments or rate this resource.



5.0 out of 5


