Friday, 29 July 2011

I'm in deconstruction - Structure Removal

Structures database is now installed. Currently going through the damage functions making sure structures can take enough of a beating from thirty mike mike. Materials having different properties require slightly different effects. Some entities will explode, some crumble, some give off secondary explosions. Fuel storage tanks when ignited should destroy any nearby lightweight vehicles or structures.

For testing I got make a new fast loading playground and recreated some scenes from a golden oldie, Novalogic's Comanche Maximum Overkill. Again forgive my programmer art/map design skills, they do what I need them to do.

Far too much fun. I'll get the bulk of this finished over the weekend. Some of the effects I want to achieve is a simple building collapse into dust (vertical movement into the ground masked by emitters and covered with a rubble mesh). I put in a few chimney stacks to see what I can do with those.

The gas station (we call them petrol stations or BBQ centres) is going to be a little tricky as like a lot of the more complex models in Combat Helo, they are reduced to single meshes for performance reasons. We had a discussion about blowing holes in mud compound walls and making them persistent, meaning a damaged wall will stay damaged for the duration of the campaign. What makes this tricky is that these walls are 500 instances. Internally the graphics card has one wall and draws the same geometry many times in different places. And variation in such structures has to be handled at the vertex shader level using some parameter that is unique to each of these 500 wall copies. With the Leadwerks engine you have two things you can vary, the vertex colour, and vertex alpha (one thing if you want to be pedantic). So we're going to implement a vertex shader to put 'breaches' into wall sections based on bit patterns in the mesh colour.

The idea being, rather than the literal approach in FPS games (hole at the position of missile impact) we'll adopt a tactical approach. A tactical breech will occur at a fixed location but enables a point of entry/escape in what would otherwise be static geometry. Functionally the same.


Scoring (yes post mission scores just like in the old days, when I didn't have grey hairs) are going to be calculated from the structure values of buildings/vehicles along with realism settings and mission difficulty. With deduction for ordinance expended and mission outcome.

Also I want to finish up the player edit dialogue this weekend (dedicated to getting the closed beta ready in August).

Have a fun weekend.

*update* AD has been working on special destruction objects.


  1. Fantastic post! With pleasure to be reading
    this :)
    Great cockpit update Dave, but still helmet is green :/

  2. flex wont make the helmet pink... he just wont banita LOL.

  3. Those models look very good AD. Im betting they'll be quite a sight when theres smoke, dust and fire.

  4. Currently I'm fleshing-out the structual data sheet for the structural items (350+ so far) by making basic destroyed models for each or assigning a generic rubble mesh. At some point I'll go back through a lot of the _destroyed models and add additional detailing like rebar and chunks of concrete on that bridge. I'll make some specific rubble meshes for collapsed towers and other tall buildings.

    In the end everything within the game world should be destroyable, except for trees, roads, runways, taxi ways and telephone poles.


  5. thats gonna look really cool. is that a unique technique or fairly standard in sims?

  6. From what i know in EECH you can destroy everything, and everything has destroyed mesh texture,so this is probably the standard.

  7. It certainly adds a lot of extra meshes. Thank goodness they don't need new textures too or we'd start running out of video mem.

    Just made a very short video showing the building collapse, it's missing the ground wreck element atm. Spent the morning fiddling with the flight model testbed.

  8. Already you have several unaccomplished video, i think the faster you will release a beta ;)

  9. OMG beautiful video!Animation demolition identical as in comanche, and those clouds of smoke:) flying helicopter looks like a movie.Animation of destruction did not expect to, hats off.