project-navigation
Personal tools

Author Topic: Destructible Terrain  (Read 23012 times)

Offline ObLoM

  • Cannon Fodder
  • **
  • Posts: 9
    • View Profile
Destructible Terrain
« on: February 02, 2010, 02:25:59 pm »
I'm sorry to bring this up again, but I'd like to understand the real cause for your inability to produce destructible environments. I have seen the func_breakable, but that doesn't really seem to be a viable solution for creating an entirely destructible map. As far as I could understand it's more of a way to add some destructible objects.

I know next to nothing about the project, but I have tried the game under linux and I have to say that it's very good. I don't have an immense amount of free time on my hands, but I've done a good bit of c/c++/python/java/opengl coding and wanted to consider developing a solution to this particular problem, that I find most interesting.

As far as I understand the graphics engine being used is a heavily modded version of the Q2 engine (please correct me if I am wrong). I've also read that inability to create destructible environments is buried somewhere in the engine. Clearly it's possible to rewrite the engine code as needed and retain backwards compatibility, at worst through an additional abstraction layer.

Basically - someone point me in the right direction to start looking at possible solutions to this problem. That probably includes engine source that you use (which is probably there, I just don't know where). Thanks.

« Last Edit: February 05, 2010, 08:10:34 pm by ObLoM »

Offline Destructavator

  • Combination Multiple Specialty Developer
  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1908
  • Creater of Scorchcrafter, knows the zarakites...
    • View Profile
Re: Destructible Objects
« Reply #1 on: February 02, 2010, 04:38:55 pm »
If you're willing to do that coding work then yes, I think it would make a lot of people happy to have it in the game.

I'm not a coder for this project but I do remember discussions with proposals on how such a thing might be done, forgive me for I don't have a link to the thread handy, but its in this forum somewhere.

Although I don't know the code myself I do know that the maps are made up of BSP tiles randomly assembled for most (but not all) missions.

Offline ObLoM

  • Cannon Fodder
  • **
  • Posts: 9
    • View Profile
Re: Destructible Objects
« Reply #2 on: February 02, 2010, 06:21:34 pm »
Well, I don't want to make big promises, but I would like to take a look at the root of the problem.

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Destructible Objects
« Reply #3 on: February 02, 2010, 07:06:53 pm »
if you really want to get into this, you should join the irc channel if you have questions.

Offline ObLoM

  • Cannon Fodder
  • **
  • Posts: 9
    • View Profile
Re: Destructible Objects
« Reply #4 on: February 03, 2010, 12:24:17 pm »
I'll try to be on there when I can.

Offline Destructavator

  • Combination Multiple Specialty Developer
  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 1908
  • Creater of Scorchcrafter, knows the zarakites...
    • View Profile
Re: Destructible Objects
« Reply #5 on: February 03, 2010, 03:29:49 pm »
I wish you good luck, I think you'll need it...

...And congratulations for being willing to at least tackle the issue and attempt a solution!

Offline misiek

  • Rookie
  • ***
  • Posts: 94
    • View Profile
Re: Destructible Objects
« Reply #6 on: February 03, 2010, 06:53:45 pm »
Hello,

Isn't geo-mod (engine used in red faction) based on quake engine? That engine supported destructible terrain (but not fully AFAIR).

Offline Duke

  • Administrator
  • PHALANX veteran
  • *****
  • Posts: 1037
    • View Profile
Re: Destructible Objects
« Reply #7 on: February 04, 2010, 02:51:39 am »
@ObLoM:
The two most important reasons imho are:
1. It would multiply the amount of artwork needed. And by now we don't even have the full set of artwork required for the non-destructible version.
2. Certain data (namely routing and lighting) is precalculated during mapcompile for performance reasons. At least those two parts would have to be rewritten for dynamic maps.

Offline ObLoM

  • Cannon Fodder
  • **
  • Posts: 9
    • View Profile
Re: Destructible Objects
« Reply #8 on: February 04, 2010, 11:29:46 am »
I know that routing and lighting are pre calculated at the moment, I don't really have anything to say about it at this stage. Art work wise, it seems like you can avoid having to do a lot of it if you settle for functionality over visuals to start with. It doesn't have to all look amazing to begin with. Most if not all of the current artwork will be reusable, and to make things look nice you will probably need a few extra things per material type (if that).

I'm interested in looking into the problem.

Edit: I've done a little bit of looking around and the most interesting thing I found so far is this - http://www.thermite3d.org/joomla/index.php . Seems like a better way to store maps for destructible environments, and they claim good performance and as far as I can tell, require no pre-compilation of maps. Trying to compile and get  a working sample of this.

Based on this idea it would seem that you need little to no extra artwork, unless you want some complex animations for when materials are destroyed.
« Last Edit: February 04, 2010, 01:19:58 pm by ObLoM »

Offline Duke

  • Administrator
  • PHALANX veteran
  • *****
  • Posts: 1037
    • View Profile
Re: Destructible Objects
« Reply #9 on: February 04, 2010, 01:41:20 pm »
Based on this idea it would seem that you need little to no extra artwork, unless you want some complex animations for when materials are destroyed.
I would expect at least one alternate model for each and every object on (all) the maps, preferably one per damage type (fire, blast, melting by laser,...).
Not talking about the terrain or even the animation for the destruction.

btw the broken model will typically have a much higher polycount. (think broken window pane)

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Destructible Objects
« Reply #10 on: February 04, 2010, 02:21:44 pm »
for models this should not be a big problem to implement - the more important things are the brushes. the models must be modelled of course - but the implementation is almost there.

Offline ObLoM

  • Cannon Fodder
  • **
  • Posts: 9
    • View Profile
Re: Destructible Objects
« Reply #11 on: February 04, 2010, 02:25:29 pm »
Did you take a look at the link I posted above? I've run into a compile problem and waiting for some help from the developers so I can proceed.
« Last Edit: February 04, 2010, 02:29:05 pm by ObLoM »

Offline misiek

  • Rookie
  • ***
  • Posts: 94
    • View Profile
Re: Destructible Objects
« Reply #12 on: February 04, 2010, 06:07:33 pm »
What are you trying to do? Change ufo: ai engine to something completely different, or implement dynamic map changes to quake engine?

Mattn and Duke - how much quake2 is in ufo: ai? How hard is it to switch to another engine? Is it harder to switch to completely different engine than for example to quake3 engine?

Btw, have you seen this? It's quake3 engine on steroids(probably most advanced quake3 engine) :

http://xreal-project.net/

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Destructible Objects
« Reply #13 on: February 04, 2010, 07:25:02 pm »
no engine switch will happen - that would kill ufo - only replacing the underlying map structure

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: Destructible Objects
« Reply #14 on: February 04, 2010, 07:25:21 pm »
Did you take a look at the link I posted above? I've run into a compile problem and waiting for some help from the developers so I can proceed.

that's a deadlink for me