Saturday 11 September 2010

Dave experiments with damage visuals

Just got back home and Dave left a nasty sight in my MSN window. No, not another scene of drunken debauchery, actually I have to complain, there's been a distinct lack of that.

We got to discussing visual representation of damage. Different ways we can do this. I write it here so I can remember what we discussed. We looked at some complex set-up of assets for iL2, the results of which are impressive but it hardly makes for an easy pipeline, especially if we want to quickly add more aircraft in future.

After some thinking we boiled it down to two simple options.

  •  The first is application of a damage texture on parts (child objects) of the helo model that match the aircraft's damaged state. And Dave left me the following image, a simple test to check it out...

  • Another technique is decals. Now I've looked at LE decals before and I don't think they will work everywhere on our map due to floating point and surface fighting in the outer regions. These are patches that positioned to be almost co-planer with the surface of a model (like the decals you stick on a model). If they work, they have the advantage in that they should work for everything.

A more complex alternative is a new method of decals using what's called "glyph bombing". What we'd do is have a single texture upon which, in a grid patter is lots of damage and battlescar images. We pass this glyph texture into the mesh frag shader along with a damage map of the aircraft. The shader will splat areas from damage map with psudo-random glyphs of damage. This might look OK to pretty bad depending on textures. I'm quite keen to try this as I want to add such a system to give players some custom paint jobs reflecting game achievements/rank (such as earned 'shart teeth' and other hokey things).



A shader that can be used for multi-texturing decals is already present in LE version 2.40 for adding plaster-work to brick walls. Now 2.40 has some new commands for adjusting LOD ranges, we're almost goo to go to move the project to the new version of the engine.

For now, keeping it simple works and I think the damage texture looks alright.

6 comments:

  1. Looks great! Canopy and engine damage is awesome!

    ReplyDelete
  2. Holy apache Batman.

    Hey Flex, methinks you need more trigger conditions and actions. But that's just the Mission Builder in me. Check out the latest DCS ME for ideas.

    ReplyDelete
  3. I don't have DCS handy to look at. Can you give me some examples?

    Or the sort of things you might want to do?

    ReplyDelete
  4. Sure. Take a look here at the trigger list for a10c
    http://www.digitalcombatsimulator.com/index.php?end_pos=2452&scr=default&lang=en

    If I put my mind to it, I'm sure I can come up with many more. I'll take a look at OPFP DG & chat with Rob too. Obviously the ability to play with the LUA would be great.

    ReplyDelete
  5. From what I remember the old LB2 editor was very flexible indeed.

    ReplyDelete
  6. I can see some cockpit related triggers and events that might be handy for training purposes. I can cover all those by allowing the event system to send game messages to player helicopters, in the same way co-pilots will do.

    A lot of those triggers are covered already, we just pass an extra parameter. And some of them don't make sense for us but the odd addition wouldn't harm.

    The aircraft state ones are again good ones for training missions.

    ReplyDelete