Advertisement

Environment/Terrain/World Help please!

Started by November 16, 2006 01:46 PM
2 comments, last by Edtharan 18 years, 3 months ago
Alrighty, so I want make an Action/Adventure/Rpg'ish type game but I have a couple problems staring me in the face. I know that the Xbox360 and Ps3 games have engines that allow bulding destruction and whatnot, but what about below terrain? Characters in my game will be able to control elements, Air, Water, Fire, Earth and some others not relavant to the topic..but I don't know how to go about taking dirt from the ground to create a genuine Earth attack instead of some stupid energy or Mana blast. Is there an engine out there that is smart enough to replace materials or drain them away? Like, drawing water from a lake, pulling dirt from the ground or capturing gales in the palm of my character's hands. If any of you have seen Avatar : The Last Airbender, those attacks are what I'm talking about lol. If anyone could help, I'd greatly appreciate it.
If you're using a heightmap based terrain, you could lower some vertices. Farcry allowed this, for example, although it was disabled by default.
Or you could just leave the terrain alone, play a 'grab sand' animation while showing a nice sand particle show. The amount of earth or water taken is probably insignificant anyway, and there's also another issue and that is the changing terrain: perhaps it changes a level so that it becomes unplayable, or opens up paths that disturb the levels flow.
Create-ivity - a game development blog Mouseover for more information.
Advertisement
Well, I didn't really checked it, but I believe there is no such engine. What you are asking over there is quite complex, I doubt someone would just make it for free - it would just be way too cool for you to not make money with it.

Think about it: you will need a world that keeps detailed information about terrain, so that you can deform it (deformable terrain should be a pain by itself, but doeable - especially if you sacrifice some realism). Then, the "easiest" way I see to make these things would require the use of metaballs and bone-based animation. Witch are other two hard things to make. But hey, that would look very cool indeed.
Quote:
Think about it: you will need a world that keeps detailed information about terrain, so that you can deform it (deformable terrain should be a pain by itself, but doeable - especially if you sacrifice some realism). Then, the "easiest" way I see to make these things would require the use of metaballs and bone-based animation. Witch are other two hard things to make. But hey, that would look very cool indeed.

I have given some though, in the past, to such an engine. You will need a dynamic terrain, but I think you can do it intelligently.

What you could do is allow changes to take place, and the location where the change is going to take place switches the state of the terrain from static to dynamic. So all locations have the potential and data to be dynamic, but all you need to do is not execute the code for any location that is not at that moment designated to be dynamic.

I envision this using a "call" function of an object that allows one object to "call" the function that does the calculations for the dynamics (say the ground collapsing, etc). Each section of land would be separated into virtual voxels (a voxel is a volume pixel). These virtual voxels just have a list of vertices (and it can be different for difference voxels and they can share vertices too) that it can modify (add and subtract too).

When an area is supposed to be changed (say a bomb lands in an area and is to produce a crater), then the engine finds the voxels which would be effected and passes the displacement data to them, then calls the function in the voxel object that lets the voxel make the required deformations to the environment (say ground is to be removed).

The voxel then signals nearby voxels of this change and lets them know of any changes that they might need to make (the dirt thrown out by the explosion has to go some where). If a voxel does not need signal a nearby voxel to make changes it does not do so (so the cascade stays confined to the effected area).

So, if in the "Earth Bending" examples, the player were to pick up a chunk of rock, then the engine would signal the voxels that were effected and send the data to them (the volume removed from that voxel). The effected voxels would signal the nearby voxels that they have changed and if the voxel had been completely removed, it would destroy its self and signal the voxel underneath it that it is now a surface voxel. The new surface voxel would then create vertices and link them properly to the terrain mesh creating the new surface. The system then might create a meatball of the appropriate volume that the player controls.

If the player then drops the rock, it would create new voxels and pass the geometry/mesh from the meatball surface and use them to create the new terrain mesh. The new voxels would signal the nearby voxels to either create or destroy their verities so as to connect the new parts of the old terrain mesh to the new terrain mesh (from the meta ball).

Because only the effected voxels are signalled, this system would not consume much of the processor resources. So you could make very small voxels (high resolution) and have very detailed simulations of the environment.

This topic is closed to new replies.

Advertisement