Destructable environments
by Steve D · in Torque Game Engine · 12/19/2006 (4:28 pm) · 11 replies
I was wondering if Torque 3d in capable of destructable environments, such as putting a hole in a wall after a hit, putting holes in the floor, destroying a door, etc. This wouldn't be in a FPS environment, like a top down type of environment.
Also, is there a search capability for these forums? Maybe I'm blind but I can't see it.
Also, is there a search capability for these forums? Maybe I'm blind but I can't see it.
#2
Short answer to your question: Yes deformation is possible. You have the source.. anything is possible. ;)
More specific answer: You are going to need to read up on the different torque mesh objects, specifically DTS and DIF shapes.. Learn how they are read and defined. Just a blind shooting from the hip solution to your querry in a TopDown enviro (BTW, you sure you are using torque TGE 1.5 and not Torque builder or something. Doing a top down sounds like you might be using one of the other Torque products.) I'd replace DTS objects with other DTS objects that are already deformed. This would work well with explosions and such but not so much the shooting of bullet holes through walls etc.
You really have to read up on the object handling in Torque TGE and define exactly how you want to deform things.. With some coding Terrain is quite easily manipulated but again alot of factors come into play.. Multiplayer? How secure does it have to be? Replication of terrain.. etc...
Best of luck. I hope you enjoy the engine.
12/19/2006 (6:22 pm)
Steve you sound new to Torque. If so welcome =) I've been using the engine for a couple of years and its probably the best hundred bucks I've ever spent.Short answer to your question: Yes deformation is possible. You have the source.. anything is possible. ;)
More specific answer: You are going to need to read up on the different torque mesh objects, specifically DTS and DIF shapes.. Learn how they are read and defined. Just a blind shooting from the hip solution to your querry in a TopDown enviro (BTW, you sure you are using torque TGE 1.5 and not Torque builder or something. Doing a top down sounds like you might be using one of the other Torque products.) I'd replace DTS objects with other DTS objects that are already deformed. This would work well with explosions and such but not so much the shooting of bullet holes through walls etc.
You really have to read up on the object handling in Torque TGE and define exactly how you want to deform things.. With some coding Terrain is quite easily manipulated but again alot of factors come into play.. Multiplayer? How secure does it have to be? Replication of terrain.. etc...
Best of luck. I hope you enjoy the engine.
#3
12/19/2006 (7:37 pm)
The easiest way would be to create your environments as DTS pieces that are put together and have various damage properties. Could get rather intensive if you want long missions, though.
#4
@ Flybynight
Thanks :) I'm actually very new to the engine, been spending a great deal of time the last few weeks reading all the docs I can get my hands on. Thanks for the in depth answer, it's appreciated.
12/19/2006 (9:11 pm)
Yea I see the search function now... DUH!@ Flybynight
Thanks :) I'm actually very new to the engine, been spending a great deal of time the last few weeks reading all the docs I can get my hands on. Thanks for the in depth answer, it's appreciated.
#5
12/22/2006 (5:14 am)
The only problem with making things like that out of DTS is that they'd have funny collision, though, right? I'm thinking of a similar approach - I want to have estructable buildings in an FPS, and I figured if I just make each wall panel from a DTS, I can get the collision boxes more or less right.
#6
12/22/2006 (5:35 am)
Destructable environments is possible with Torque. I am waiting for contructor to come out. I have the scripts and process to do these. Right now it take along time to get everything together. Constructor will make things alot easy, least I hope it does. I might do a pack.
#7
When using DTS's, you would need to shift your collision boxes according to the shape of the DTS (or swap them out).
While it was an interesting idea in Red Faction, having people digging in multiplayer was one of the worst moves I've seen in a long time. It brought clients and servers to their knees for something that was otherwise a very bland multiplayer experience.
Single-player was fun, though.
12/22/2006 (6:26 am)
Rather than trying to scope DIF's to be destructible, I would recommend creating a new render object that has variable states. Or using DTS's. Constructor will not help with destructible geometry. It will definitely help with interior creation (which is what it is designed for), but the geometry is not by default deformable. Unless you want to provide your raw uncompiled map files and build an in-engine loader for them and mimic the functionality of the Constructor tools to deform geometry...which will require some rather impressive programming.When using DTS's, you would need to shift your collision boxes according to the shape of the DTS (or swap them out).
While it was an interesting idea in Red Faction, having people digging in multiplayer was one of the worst moves I've seen in a long time. It brought clients and servers to their knees for something that was otherwise a very bland multiplayer experience.
Single-player was fun, though.
#8
12/22/2006 (6:47 am)
I dont want say to much but with my process, if constructor does everything it said, it will help me great deal. I have tested my process and it work very well in Torque. I dont have any collision problems and I can shoot holes threw building and blow up door and window. Constructor will make life alot easier in doing this process.
#9
12/26/2006 (8:23 am)
Working with little test level I have stumbled into same problem. I have a small japanese style building with paper and wood sliding door that- as you can imagine- should be quite easy to destroy. Core of the level (parts that are not going to get demolished in any case) is DIF, destructable objects are going to be DTS but I am wondering how to handle destruction of varied parts. Solution that came to my mind is dividing entire object (geometry as well as collision object) into kind of array of smaller objects (or sub-objects), allowing to trigger events for much smaller areas. I am afraid that such a solution - although it might work well- will cause processor to glow. Any ideas how to get it work in more effective way ?
#10
12/26/2006 (10:20 am)
You can make destructible items with damage settings. The 3D-Diggers FX pack is a good reference. I thought there was an article (or perhaps it was a resource) dedicated to destructible DTS shapes as well.
#11
12/26/2006 (11:18 am)
Quite possibly yes, thank you very much for pointing this out- being just an "artist" I am very limited when it comes to programming.
Torque Owner Barry Gallagher