Destructable Environments

talley

Limp Gawd
Joined
Dec 8, 2003
Messages
335
Is the next generation of games going to make this feature more common? I recently read about a Xbox360 game that previewers where claiming to have fully destructable environments. Only games I can thing of off hand that have that currently are the Red Faction series.
 
Short answer: No, not really. We still lack the CPU horsepower (or add-on cards) to accurately model destructable environments. More can be done with the new consoles and computer hardware, but it's not what you want.

This has been talked about in the past two months here. Use the search feature to look up "Red Faction" and you'll find it.
 
Some of the tech will hit road blocks with visuals becoming more advanced, as well. Red Faction could get away with destructable environments, because much of the maps were mine shafts, or simple concrete coridors. Top that off with primitive graphics, and people don't question that the insides of objects don't match up. Take a game like Unreal 2K7 and blow a hole in the side of a house, and it is going to look extremely awkward when there are no 2x4s, or fiber glass stuffing inside.

I wouldn't be surprised if we see some extensions to destructable environments, but it will likely stay fairly rudimentary at best. Think an RTS that will allow you to terraform the land scape with Nukes, but with buildings that still spontaniously combust after recieving enough damage, opposed to deforming dynamically...

Come to think of it, that sounds like it will be a little backwards.... static meshes become dynamic, while the dynamic objects act static..?

Ah well here's hoping. There was some neat stuff in Silent Storm. Maybe we'll see a shooter, or other action game with destructable environments along those lines, but expect it to suffer in other areas because of those dynamics.
 
buahahahaha!

Fully destructable environments?? Every game will be rubble strewn plain by map change. :D

I wish they did more of that with BF2, i really want to knock down sandbags, trailers, buildings, etc w/ tank and rocket shots. Oh well, the shower of teddy bears when you blow up some boxes is kinda neat.
 
Red Faction is a relatively poor example of destructible environments. Play silent storm for an example of it. Only thing that can't be razed to the ground is the ground itself. Can level multi-level buildings into dirt if you've got the ammo, weapons, and time. You can shoot the floor out from enemies above you, dropping them down to you if you know where they are.

As for consoles? If the PS3 really does end up shipping with that PhysX chip, then they'd be the one I'd expect to come up with highly destructible environments, since that'd be a perfect application of a dedicated physics processor.

However, the problem of destructible environments is not just a technical one. If you have an objective up the stairs, and you've already blown up the stairs, what then? Or if you need to escort an NPC somewhere, but you already sealed them inside a pit...This sort of thing came up occassionally in Silent Storm when I became overzealous with my explosives.
 
kelbear said:
Red Faction is a relatively poor example of destructible environments. Play silent storm for an example of it. Only thing that can't be razed to the ground is the ground itself. Can level multi-level buildings into dirt if you've got the ammo, weapons, and time. You can shoot the floor out from enemies above you, dropping them down to you if you know where they are.

As for consoles? If the PS3 really does end up shipping with that PhysX chip, then they'd be the one I'd expect to come up with highly destructible environments, since that'd be a perfect application of a dedicated physics processor.

However, the problem of destructible environments is not just a technical one. If you have an objective up the stairs, and you've already blown up the stairs, what then? Or if you need to escort an NPC somewhere, but you already sealed them inside a pit...This sort of thing came up occassionally in Silent Storm when I became overzealous with my explosives.

In this instance it would be good to give the character a grappling hook or something like this. As long as it was kind of a pain to use, and left the character exposed while climbing it, it wouldn't get overused at other times.
 
red factions environments were NOT fully destructable. Trust me, I tried. after a certain point you could no longer dig more tunnel with the weapons.

Destructable environments are costly. You either have to develop AI and be able to alter the map real-time, or the artists have to give everything proper guts and internal details. both are not trvial tasks.

I think visually, a LOT can be done to make destruction of walls and such much bettter than before. As far as gameplay, certain things absolutely SCREAM for destructable environments. I can't even count the number of times in DOD I REALLY wanted to be able to blow a hole in a wall, or collapse a tunnel. However, at the same time being able to do so can also destroy all the game dynamics of a map.

It's got to look cool, and it has to play cool. If an algorithm could satisfy both of those requirements on demand, there wouldn't be map-makers for games and there would be limitless variation in multi-player.
 
Myself and I'm going to guess millions of other people wouldn't mind semi-destructible environments. If you shoot a rocket in the side of a house and an odd hole pops up, that's a step in the right direction. Where now you shoot a nuke at a wherehouse and it stands like god himself made it.
 
Soldner did it, and it did it well over a year ago. Sure, the team couldn't code physics or create decent art assets to save their lives, but the game proved it could be done on current hardware as well as run efficiently. Any developer who says to the contrary is outing their own laziness and/or incompetance.
 
raz-0 said:
red factions environments were NOT fully destructable. Trust me, I tried. after a certain point you could no longer dig more tunnel with the weapons.

How come the first thing any1 did with that game is see how far they can go by blowing up the same hole repeatedly. LoL Funny
 
OTL said:
Soldner did it, and it did it well over a year ago. Sure, the team couldn't code physics or create decent art assets to save their lives, but the game proved it could be done on current hardware as well as run efficiently. Any developer who says to the contrary is outing their own laziness and/or incompetance.

You just said the gfx and physics blew on this game. Perhaps crippled physics and art was a requirement so that the game could run efficiently? I havent played this game but thats what I would assume.

Was it an online multiplayer?
 
Soldiers: heroes of wwII had pretty damn destructable enviroments.

Shells from tanks taking out buildings, putting holes in the ground, etc. It used a shitload of physics, things you blew up could even be used for cover by your soldiers.

The upcoming game, Project offset, is supposed to have destructable enviroments.

Plus, some of you forgetting about the physics chip? that's able to take the load off the cpu and do a LOT more physics runs then developers can do at this point in time?

They already have signed with developers like Epic for future support, among others to make use of the chip.
 
Stiler said:
Plus, some of you forgetting about the physics chip? that's able to take the load off the cpu and do a LOT more physics runs then developers can do at this point in time?
I was talking about this with Kyle at various points during Quakecon. My opinion (I'll let Kyle state his own opinion) is that while it is a needed innovation to move forward, the technology is still in it's infancy. You will not see this used in games for another two years at least and won't have full support by all developers for at least another four years. Currently, it's not even in production and has limited (very limited) capability. As time goes by, they'll add more functionality to it, but it's not ready for showtime.

Hell, developers can't even use dual-core processors correctly at this present time. A physics chip is great, but it's still a pipe dream at this time.
 
Torgo said:
I was talking about this with Kyle at various points during Quakecon. My opinion (I'll let Kyle state his own opinion) is that while it is a needed innovation to move forward, the technology is still in it's infancy. You will not see this used in games for another two years at least and won't have full support by all developers for at least another four years. Currently, it's not even in production and has limited (very limited) capability. As time goes by, they'll add more functionality to it, but it's not ready for showtime.

Hell, developers can't even use dual-core processors correctly at this present time. A physics chip is great, but it's still a pipe dream at this time.

UE3 (2007 release date puts it at around 2 years or less, if its on time) is supporting the PhysX chip and the (formerly) Novodex API. Frankly I think that is all that is needed for the technology to take off. There is already lots of functionality in it, it will just take awhile for the full potential of even the current generation to be realized. That doesn't mean however that it still wont be a giant step forward even when it is initially released (at least for the demos that will ship with the cards, the true retail games will be much further along the road).

The big thing that people dont realize is to have fully destructable environments takes a lot larger load then having fully realistic graphics. For the environments you cant not perform the physics because you cant see it like you can with graphics. For the physics you have to run the physics for all objects, otherwise you will blow a hole in the wall and find that the refridgerator sitting on the other side didn't even fall over. Current Gen consoles do not have even the physics power of the PhysX chip, and they are not the solution to destructable environments, they will be better than previous gen, but not by all that much.
 
I think the biggest road block for destructable environments, as someone mentioned briefly, is that it would take the developer a lot longer to figure out how to make a fun game where you can blow the crap out of everything they've taken time to craft. If you don't constrict the player to at least some rules, there will be no end to ways they can pervert the gameplay. I think it would make most games really frustrating if you had to worry about where you were shooting your rockets all the time.
 
Torgo said:
Short answer: No, not really. We still lack the CPU horsepower (or add-on cards) to accurately model destructable environments. More can be done with the new consoles and computer hardware, but it's not what you want.

Less on CPU and more on GPU actually, in order to make an indentation, you add more polygons to a surface to make a hole and then update the mesh on the videocard. 12+ polygons per hole + autoloading rocketlaunchers = Ouch.

kelbear said:
As for consoles? If the PS3 really does end up shipping with that PhysX chip, then they'd be the one I'd expect to come up with highly destructible environments, since that'd be a perfect application of a dedicated physics processor.

Something i've been thinking. What does physics have to do with destructable environments? Determining how the mesh of an object is modified to simulate deformation is done strictly by the processor, no physics is involved afaik. If you use the video that came with the PPU as an example, it only simulated objects thrown about *after* the CPU had broken up the object and made the holes.

The only thing i know physics would help in is simulating bricks fallin down, nothing in the actual deformation process.

raz-0 said:
red factions environments were NOT fully destructable. Trust me, I tried. after a certain point you could no longer dig more tunnel with the weapons.

All of them can be destroyed (except for certain objects where it's disabled by the mapmaker since you need some sort of stability, like a steel wall or stairs), there's just a cap on how much you can do at once. Adding more triangles is costly, but you can usually level an entire map before you hit the limit, or you use all the resources digging just a single hole.

I think it'll actually be more efficient if done above ground, so you can use all the resources for deformable buildings rather than having them wasted by a wayward rocket hitting a cave ceiling and wasting the polygons.

SnakeIRye said:
Myself and I'm going to guess millions of other people wouldn't mind semi-destructible environments. If you shoot a rocket in the side of a house and an odd hole pops up, that's a step in the right direction. Where now you shoot a nuke at a wherehouse and it stands like god himself made it.

Hey! Your base has Godmode buildings! No fair!

Imagine a crack team laying C4 on the roof for a quick entrance :)

debello_64 said:
The up comming MMO Auto assult is claming distructable enviroments

Probably not fully destructable. 100 players blowing holes in the maps at once and the server sending all the updates to your maps at once. That's gonna eat up your bandwidth bigtime. Holes are generated pretty much randomly in the case of red faction, rather than the server saying "Use hole number XX in these coordinates", the server will be transmitting the exact shape of the new hole "Extrude from wall within vertices xx, xx, xx, xx, etc.". So i doubt it'll allow for full destruction.
 
Sly said:
Less on CPU and more on GPU actually, in order to make an indentation, you add more polygons to a surface to make a hole and then update the mesh on the videocard. 12+ polygons per hole + autoloading rocketlaunchers = Ouch.
No, that's just what you see on the surface and it's not that simple. You can throw polys around all day, but the GPU isn't going to take the time and compute the angle, the force exerted and precisely how many pieces an object is going to break up into. What's the material made out of? If it's glass then it shatters. If it's wood, then it splinters. You also need to calculate exactly how those pieces are going to interact with their environment. Do they fly around? Do they fall down and break even further?

What if you're dealing with a water tank? What does the water do? Does it splash? How does it splatter? Does the water flow out? What's the viscosity of the fluid? What if you have a metal object that just crumples, like a car? Or a crane?

All this is math, math, math. A GPU isn't going to do all this, only a CPU currently can. A physics chip is supposedly going to handle all the calculations for operations like this and relay the information back and forth to the CPU and GPU to render. It isn't just polys. I can send you some white papers that fully discuss the subject on blending physics and the environment in gaming.
 
Sly said:
Something i've been thinking. What does physics have to do with destructable environments? Determining how the mesh of an object is modified to simulate deformation is done strictly by the processor, no physics is involved afaik. If you use the video that came with the PPU as an example, it only simulated objects thrown about *after* the CPU had broken up the object and made the holes.

The bullet hits the wall with force X at angle X the wall has specific strengths and weaknesses. The bullet happens to hit a stud, with the right force and angle to splinter the stud in half. The stud just so happened to be part of an already partially destroyed load bearing wall. The loss of this stud starts a chain reaction with the weight of the building on top of it too much causing the wall at first to buckle, followed by the ceiling, followed by the collapse of the entire building.

Its all physics, all the destruction is determined by physics. The calculations done to break up the object are easily performed by the PPU rather than the CPU, or the CPU can decide which way to break up the box since that isn't very hard, determining how those pieces fly around and interact with one another is the really computationally intensive part.
 
urbsnspices said:
You just said the gfx and physics blew on this game. Perhaps crippled physics and art was a requirement so that the game could run efficiently?

The team was just really unskilled, and that extended to all facets of the game. If you dissected the game's graphics on a technical level you would find the polygon counts, geometric complexity, texture count/resolution, fluidity of animation, and so on to be on par with anything out there the time. Same story for the physics.

Was it an online multiplayer?

Yes, but it never worked properly online due to constant portal crashes and various other server browser problems and stability issues.
 
BF2 Claimed it had destructable environments but that's only objects that involve winning and chance, (chance) being someone has to be near a propane / gas can to kill them with the *environment* (winning) being the Support like artillery, UAV, radar, ect.

They made it sound like when you drop a bomb on a house it's gonna crumble, hell no.. :(
 
Torgo said:
No, that's just what you see on the surface and it's not that simple. You can throw polys around all day, but the GPU isn't going to take the time and compute the angle, the force exerted and precisely how many pieces an object is going to break up into. What's the material made out of? If it's glass then it shatters. If it's wood, then it splinters. You also need to calculate exactly how those pieces are going to interact with their environment. Do they fly around? Do they fall down and break even further?

What if you're dealing with a water tank? What does the water do? Does it splash? How does it splatter? Does the water flow out? What's the viscosity of the fluid? What if you have a metal object that just crumples, like a car? Or a crane?

All this is math, math, math. A GPU isn't going to do all this, only a CPU currently can. A physics chip is supposedly going to handle all the calculations for operations like this and relay the information back and forth to the CPU and GPU to render. It isn't just polys. I can send you some white papers that fully discuss the subject on blending physics and the environment in gaming.

The CPU only has to determine those forces once, and it's nothing more than having the force values sent through a formula. It may be more CPU intensive at the moment of impact, but all the computations are done in less than 1/50th of a second and will never have to be brought up again. On the ther hand, the additional polygons generated to simulate the jagged surfaces, as well as the excess rubble, will have to be carried by the GPU for the rest of the round.
 
Erasmus354 said:
The bullet hits the wall with force X at angle X the wall has specific strengths and weaknesses. The bullet happens to hit a stud, with the right force and angle to splinter the stud in half. The stud just so happened to be part of an already partially destroyed load bearing wall. The loss of this stud starts a chain reaction with the weight of the building on top of it too much causing the wall at first to buckle, followed by the ceiling, followed by the collapse of the entire building.

Its all physics, all the destruction is determined by physics. The calculations done to break up the object are easily performed by the PPU rather than the CPU, or the CPU can decide which way to break up the box since that isn't very hard, determining how those pieces fly around and interact with one another is the really computationally intensive part.

The load bearing example is a good one. The one thing about RedFactions destructable environment is that a multiton ceiling will still stay up even if it's only held up by a piece of concrete the size of a matchstick. :D

In your other examples tho, all the PPU does is determine how the debrie flies around, not how the object is deformed. A telephone pole gets hit by a rocket, the CPU retrieves the preset force values from the weapons database and/or impact value from the PPU, then generates the appropriate hole. Debrie is generated (Including the top half of the pole) and is then handed over to the PPU. How the terrain is deformed is always handled by the CPU never by the PPU. If you were to take out all the flashy eye candy and just go with terrain deformation, all the CPU would need is the damage value, modify the mesh accordingly, and then leave it at that. No fancy physics needed.
 
This what i'm concerned about when it comes to deformation.

crack5yx.jpg


A flat surface that's been damaged by an impact will dramatically increase the polygon count tracked by the game. And the GPU will have to track it for the rest of the round.
 
Sly, play around with some physics programs.

you can have the simplest looking graphics and when you add so much to a scene , because NOT of the graphics, but the physics involved, it can take the program to a crawl because of all the caculations going on at once.

Destrucable buildings and such are more heavy dependent/limited by the cpu then they are by the gpu.
 
Sly said:
The load bearing example is a good one. The one thing about RedFactions destructable environment is that a multiton ceiling will still stay up even if it's only held up by a piece of concrete the size of a matchstick. :D

In your other examples tho, all the PPU does is determine how the debrie flies around, not how the object is deformed. A telephone pole gets hit by a rocket, the CPU retrieves the preset force values from the weapons database and/or impact value from the PPU, then generates the appropriate hole. Debrie is generated (Including the top half of the pole) and is then handed over to the PPU. How the terrain is deformed is always handled by the CPU never by the PPU. If you were to take out all the flashy eye candy and just go with terrain deformation, all the CPU would need is the damage value, modify the mesh accordingly, and then leave it at that. No fancy physics needed.

Sure you could do that, but stuff like that has been in place for a long time. That would be equivalent to bullet has velocity of level 2 so we make a level 2 hole in the material. That is not physics. Physics DYNAMICALLY deforms objects according to what is actually happens. Physics REALISTICALLY throws the debris around the scene. Physics is what DETERMINES how objects deform. You seem to be taking a very old fashioned approach about this and think that the CPU is determing how objects deform, when that is actually the job of the PPU.

Watch some of the demonstration videos of the PhysX and look at all the metal deformation and stuff going on. All of that is being determined by the PPU. The way in which the metal bends, the way in which the giant tower of boxes falls down, the way in which the airplane disintigrates upon impact. That is ALL determined by physics and the PPU, NOT by the CPU.

And dont scoff at the calculations involved in throwing a bunch of debris around. That type of thing is incredibly processor intensive, and takes a number of calculations all being run simultaneously on each separate piece in the scene.
 
Sigh, time to get technical so I can demonstrate that physics is more than throwing triangles at a problem. I'm going to use a few whitepapers and articles I know about and summarize exactly what's going on behind the scenes in some games.

Let's take the simple example of a billard ball hitting another ball on a flat surface... say a pool table. You hit Ball A at 20'/sec and it impacts Ball B at a 40 degree angle.

lander_02.GIF


You then break down the forces along line n thusly: (Sorry about the black... couldn't be helped)

Then you need to figure out momentum...
Then you fudge a little with the coefficient of restitution...
Then solve for the velocities of the billard balls after collision...
And this is all assuming that the Ball A isn't spinning. Now you have to take into account where the ball was hit and the friction of the surface. Let's assume you hit the ball along the center of it's mass. The equation for this looks like:

Then you add in all the extra crap like momentum, natural roll and inertia tensor and you get this hideous equation...

That's just two balls rolling around on a table hitting each other. What if we want to imbed one shape into another? We're still dealing with ridged bodies, using tools such as inertia tensors, angular momentum, torque, quaternions for representing orientations etc. You can take a shortcut as outlined in one white paper used for Hitman that takes a rigid body by four particles and six constraints (giving the correct amount of degrees of freedom, 4x3-6 = 6).

Consider a tetrahedron and place a particle at each of the four vertices. In addition, for each of the six edges on the tetrahedron create a distance constraint. This is actually enough to simulate a rigid body.

image011.gif


Now clearly, in general rigid bodies do not behave like tetrahedrons collision-wise (although they might do so kinetically). There is also another problem: Presently, collision detection between the rigid body and the world exterior is on a vertex-only basis, that is, if a vertex is found to be outside the world it is projected inside again. This works fine as long as the inside of the world is convex. If the world were non-convex then the tetrahedron and the world exterior could actually penetrate each other without any of the tetrahedron vertices being in an illegal region (see above Figure where the triangle represents the 2D analogue of the tetrahedron). If you think of the triangle as a square you can use the following equation to solve for penatration:

Physics goes beyond just hitting things and moving them. There's what's called spatial queries
  • Trigger volumes (switch to camera B when the user enters this region).
  • Line-of-sight (can I see the power tower from here?).
  • Ray casts for AI environment probing (can Watson see me?).
  • Proximity queries for AI (start talking when the player is within five feet).
  • Evaluating theoretical object placement (can this door close without crushing anything?).
  • Ray casts for picking (let the user click on the lever).
  • Volume queries for motion planning (can I walk all the way to the hatch?).

In fact, the best way to illustrate the way that phsyics interacts with the environment is with this illustration:

Now how the heck is the CPU and GPU going to handle the increasing complexity of the game environment? Now that I've reduced Sly's argument to a pile of goo (and his head has probably exploded), it should be obvious that physics in the game world is becoming increasingly complex. As we add more objects to our environments, the calculations that must be performed also increase. If the end goal is to make a Matrix-like gameworld, then we have a long, long way to go.
 
Stiler said:
Sly, play around with some physics programs.

you can have the simplest looking graphics and when you add so much to a scene , because NOT of the graphics, but the physics involved, it can take the program to a crawl because of all the caculations going on at once.

Destrucable buildings and such are more heavy dependent/limited by the cpu then they are by the gpu.

Also @Erasmus354 and @Torgo

Yeah, i've seen that in action. In Doom3, i've already tried having a few dozen of those sentries in a pile. All those models and my framerate is still steady, one grenade and my frame rate dropped to 1 fps. The amount of processing power used by the physics fluctuates depending on how much of the scene is in motion.

But we're not talking about actual ragdoll or ballistic physics here. It's about how much it applies to terrain deformation (Which is totally unrelated to Torgo's explanation).

EDIT: Thanks Torgo! I've been looking for those formulas! If you could send me a link it'd be much appreciated! :)
 
Sly said:
Also @Erasmus354 and @Torgo

But we're not talking about actual ragdoll or ballistic physics here. It's about how much it applies to terrain deformation (Which is totally unrelated to Torgo's explanation).

I guess he really doesn’t get it or he doesn’t explain what he is thinking clearly enough. Maybe you could explain again what you are talking about when you say terrain deformation? I really don’t know how the GPU could determine the deformation of terrain…

Deformation of the terrain (or any other object) must be done using finite element modeling (FEM) formulas, which are calculated using matrix. In your example with two triangles that “transformed” into eight triangles, there is something wrong. If you want to calculate the deformation of the square, you need meshing. Let’s say you have triangular elements and that you have two of them, thus a square. You then have only 4 nodes (the 4 corners of the square). Using the FEM formulas you will calculate the displacement of each node. Knowing the displacement, you can now have the new deformed “square” delimited by the 4 nodes. You can’t start with 4 nodes and finish with more.

Let’s say you have the same square but that you apply a force in the middle. The square is blocked in all degrees of freedom at the four corners. If you only have 4 nodes, like previously, you will not be able to see any deformation on the square since the four nodes can’t move. The only thing you can have is the resultant force on the square or the stress. If you want to see deformation in the middle of the square, you need to have more nodes and you need to have them from the start. More nodes equal bigger matrix, which equal to longer analysis time.

I don’t know if those information help to understand (or if they make any sense to someone else than me :p) but know this, if something is deformed because a force is applied to it, then you must calculate something to obtain the displacement of the nodes. Those calculations are not done on the GPU but one the CPU, or better, the PPU, which has been optimized to calculate FEM.
 
Terrain deformation? Well, now that's a totally different animal. At that point the GPU can do a lot of the load if necessary. You're going to be using a lot more particle physics and processing which is something that GPUs are very good at.

Quite frankly, the best articles (when it comes to games) on physics and whatnot are at Gamasutra. From there, you'll need to consult white papers and blogs from artists and programmers in the special effects industry (the Dreamworks, Pixar, Bell Labs guys).

Here's a few to get you started:

http://www.gamasutra.com/features/20000216/deformation_01.htm - 2D Deformation
http://www.gamasutra.com/education/theses/20050526/Dissertation_Kaehler.pdf - Animation deformation. Goes into how skin stretches and deforms for animation.
http://www.gamasutra.com/features/visual_arts/101797/rt3d_01.htm - Old but fundamental article on 3D modeling
http://www.gamasutra.com/features/20020118/vandenhuevel_01.htm - Sweet article on collision detection using billard balls.

Some articles might require registration, but it's free and is oh so worth the effort.
 
Vol said:
I really don’t know how the GPU could determine the deformation of terrain…

( snip )

I don’t know if those information help to understand (or if they make any sense to someone else than me :p) but know this, if something is deformed because a force is applied to it, then you must calculate something to obtain the displacement of the nodes. Those calculations are not done on the GPU but one the CPU, or better, the PPU, which has been optimized to calculate FEM.
The calculation of the nodes for one given event (say, a tank shell hitting the ground causing a crater to form) can be handled fairly easy by the CPU, but the resulting particle effects (the atomization of the ground, dust in the air) is done by the GPU. Removing chunks from an object and making it disappear is fairly standard and has been done in since early vector games. Hitting the ground and making it change isn't a big deal since it's really a 2D mesh in an outdoor environment.

That's not the same as a destructable environment though with added three dimensional objects. Sly, I hope you're not confusing the two things. It's one thing to change the shape of a mesh, but a totally different story when taking a 3D object and tracking the resulting pieces and shards flying around.

I'm going to try and get my grubby hands on some Havok white papers. I don't have an account, but I know a few developers that do and owe me a favor or two.
 
Vol said:
I guess he really doesn’t get it or he doesn’t explain what he is thinking clearly enough. Maybe you could explain again what you are talking about when you say terrain deformation? I really don’t know how the GPU could determine the deformation of terrain…

Yeah i know, it's kinda hard explaining ideas :p

Here's another try.

CPU vs Physics

The CPU is the one determining how an object is modified depending on preset values specified by the developers. While the physics can have an influence on how an object is affected, it isn't required to be believable. More likely than not, the developers will use preset force values at the point of impact to generate the hole rather than results from the actual physics computations. It's easier to manage gameplay balancing issues that way since free form physics (like in Havoks case) are accurate, but not precise.

Some people seem include flying debrie and smoke as terrain deformation, while they do use physics, they are <not> part of the terrain, just eyecandy.

One thing i'd certainly like to see are self-destructing objects. The example of a rigidbody, like a table breaking under a heavy load is <VERY> appealing. I've have never seen anything do that before. The current software/games would just take out the table and swap it with broken parts. This is where i can certainly see the use of a PPU, monitoring the stress at specific points all over a table with a pile of dynamic objects placed on top is continious and processor intensive.

GPU vs Physics

The GPU's is still the bottleneck, not the physics. Simply put, the more detail you add to an object to make it look broken, the more stress you place on the GPU to display it properly. Once a falling object becomes static, all physics computations acting on it stops as well (resuming only when another force acts on it), this frees up processing cycles that can then be used for other objects, the GPU however will still be continiously doing computations on it as well as any other details that will be added to the map afterwards. We've come a long way from RedFaction graphics. Dynamic lights, multilayered texturemaps (bump,normal,etc.) have now become the norm, it takes more power to display walls now than it used to.

Deformation of the terrain (or any other object) must be done using finite element modeling (FEM) formulas, which are calculated using matrix. In your example with two triangles that “transformed” into eight triangles, there is something wrong. If you want to calculate the deformation of the square, you need meshing. Let’s say you have triangular elements and that you have two of them, thus a square. You then have only 4 nodes (the 4 corners of the square). Using the FEM formulas you will calculate the displacement of each node. Knowing the displacement, you can now have the new deformed “square” delimited by the 4 nodes. You can’t start with 4 nodes and finish with more.

Let’s say you have the same square but that you apply a force in the middle. The square is blocked in all degrees of freedom at the four corners. If you only have 4 nodes, like previously, you will not be able to see any deformation on the square since the four nodes can’t move. The only thing you can have is the resultant force on the square or the stress. If you want to see deformation in the middle of the square, you need to have more nodes and you need to have them from the start. More nodes equal bigger matrix, which equal to longer analysis time.

I don’t know if those information help to understand (or if they make any sense to someone else than me :p) but know this, if something is deformed because a force is applied to it, then you must calculate something to obtain the displacement of the nodes. Those calculations are not done on the GPU but one the CPU, or better, the PPU, which has been optimized to calculate FEM.

Actually, that was an example on how it will affect the video card. Everything you see on screen is made up of triangles. When you try to add detail like jagged holes (like in the picture), you add more triangles that the video card will have to take into account.

Offtopic:
@Torgo
Aw crap. I got too excited. I really thought those were what i was looking for but when i followed it, it was incomplete. I already have those formulas in my code. What i need is how to figure out the exact point of collision and the timeline. Link please! Maybe there's more in your source! I got my code off my highschool physics and plane geometry books (with a bit of trigonometry), it was hell converting those to program code but well worth it. Saved me a ton of work on scripting animations. I just need proper collision techniques so i wouldn't have to hardcode boundary limits anymore.

EDIT: Spelling

EDIT2: Bookmarking Torgo's links for future reference :) Currently making an account so i can access the billiard example. THANKS!
 
Thanks for the links Torgo, I couldn’t access them earlier today since that site is blocked at my job. I tried to incorporate some of my knowledge of FEM into this but it seems I may be wrong for that case. In the next weeks, I’m will go through that entire site. I didn’t know such site existed and I really like all that stuff :) Can’t wait to have more spare time! I’m in my last year of mechanical engineering and I try to take as much classes related to FEM as possible.

Sly said:
Actually, that was an example on how it will affect the video card. Everything you see on screen is made up of triangles. When you try to add detail like jagged holes (like in the picture), you add more triangles that the video card will have to take into account

In that case the terrain is 2D but, does it only deforms in 2D? I mean, the terrain is a surface (2D) in a 3D space. So, when it is deformed, the nodes can only be “translated” in the surface. Thus, if a bomb explodes, there is not a real hole that appears but only textures that make it looks like it? If so, is there also other kind of terrain where the surface would deformed by having its nodes moving away from the initial surface?

Thanks for your explanations Torgo and Sly. Before making any other statement, I think will learn more about this :T

On a side note, are there a lot of jobs availables in that aspect of gaming or is it staturated?
 
Vol said:
On a side note, are there a lot of jobs availables in that aspect of gaming or is it staturated?
The position of "physics guy" is very much in demand. While developers are buying packages like Havok to do the physics work, it does take someone who knows physics to implement it correctly. A friend of mine, Chris Carollo, did the physics engine for System Shock 2. There was a lot of work that went into making sure the "reality" of the game look real.
 
Thank you all for a very well educated and reasoned thread on destructable environments. Please add more if you want.
 
Wow, information overload.

How would this work on a multiplayer game? Would the server be responsible for calculating the physics and the results of any changes?
 
Vol said:
In that case the terrain is 2D but, does it only deforms in 2D? I mean, the terrain is a surface (2D) in a 3D space. So, when it is deformed, the nodes can only be “translated” in the surface. Thus, if a bomb explodes, there is not a real hole that appears but only textures that make it looks like it? If so, is there also other kind of terrain where the surface would deformed by having its nodes moving away from the initial surface?

Moving the nodes (a bit of confusion, i always thought of them as vertices :p ) to simulate indentations is decent enough for normal terrain, you just have to push some vertices down to simulate a shallow hole from a grenade. However, you can't use it for tunneling.

Also this can't be used for regular objects like buildings and such. Having the max number of vertices on the objects from the beginning to be able to simply morph them later would stress the GPU right at the start.

The one i'm referring to has the program adding more vertices, or nodes, as needed to properly simulate a hole. By doing this repeatedly, you can tunnel indefinitely, or atleast, until you run out of memory :p

@Torgo
This sites a goldmine! It's already got the formulas converted to logic code, complete with explanations! w00t :D

deathBOB said:
Wow, information overload.

How would this work on a multiplayer game? Would the server be responsible for calculating the physics and the results of any changes?

Yes. It's the only way to synchronize all the clients. The lack of precision in physics means that dropping a ball in four different clients would have it end up in four different places (Very bad if the thing bouncing was a grenade). The server should be the one giving the call on exactly how that ball is bouncing. Deforming terrain also means that the server will also have to be sending object data to update the map itself whenever something changes to make sure everyone sees the same thing :)
 
Back
Top