Friday 4 February 2011

Russian Helicopters R&D

This week I've had to go back and re-learn some old classes I made and didn't document very well. Specifically a "virtual camera" class which sets up position, rotation, tracking, vibration, TrackIR offsets etc.

A game like ours with multiple view points needs to track where the camera is, the current view might be interior or exterior, might require motion, probably some kind of offset or time based animation. Rather than having multiple cameras and having to do a lot of hiding and showing, parenting and unparenting an abstract camera class was made that took updates, offsets and only applies the end result to the active camera.

I totally forgot about parenting and disobeyed some OO basics (accessing fields outside the class which were supposed to be private). That's now corrected and VirtualCamera properties are updated through the proper member functions. Inline documentation has been added. Slap on the wrist for me. In my defence it's the only class I've done this with and was very much re-written on the fly unlike other elements.

Another thing I did which caused issues was parenting cameras. Parenting objects can cause problems if you have models that use different scales or axis of orientation, or are parented to child objects that have different orientation from it's own parent. It's better I think to set the camera position to the desired object position with and added transform or offset.

Reason for all this camera fiddling was expanding the view system to have a more 'physical' camera that responded to g-forces and clipped against cockpit interiors (rather than passing through geometry). A bit like wearing a helmet.

Research and (some) Development

Going through old papers I found the mass of research (now mostly out of date) for Enemy Engaged Comanche Hokum. In particular the old Ka-52 and Mi-28 helicopters. The Mi-24N and Mi-28N now has glass cockpit features including a modern TADS like system with high-contrast symbology suitable for use with night vision goggles.

Mi-28N 'Havoc' cockpit with, 6x8 function display
If anyone wants to quickly do a translation for me below is a video frame (grabbed from the Wings of Russia series), the Havoc's version of MTADS. The optical tracker is being used to lasing a target, missile is on terminal phase (you can see the dark smoke trail behind the white plume). The target in the dotted 'gate'. I added numbers for reference.

Havoc's night fighting capability, new avionics

The Mi-24 Hind got some love too. I mentioned last year, Farnborough had a Polish Mi-24 on display and it was noted that a more modern cockpit was available (not on that aircraft but in general). Anyway the new glass cockpit looks like it uses the same MFD unit as the Havoc, below is a photo of the Mi-24N layout. Note the all black finish for night operations.

Mi-24N with night capability and new avionics
The panels look quite heavy, 6 buttons left and right with a row of 8 buttons along the bottom. Although I was trying hard to marry up the 8 buttons with the 7 lower fields in the TADS image above. One thing always struck me as odd about the map in the old Mi-24 Hind and the same thing here. In order for the pilot to operate buttons on the right he needs to cross arms or take let go of the cyclic.

None of this means Combat-Helo will have a Russian helicopter anytime soon. It was mostly to see how much of existing avionics code I have can be adapted for helicopters like the Mi-24 (which is a personal favorite).

Things I'm doing this coming week....

It's my birthday on Sunday, I share(d) it with Ronald Regan, perhaps the funniest and best US president I can recall. I'm pushing 42, my youngest daughter keeps saying "You're not getting old, you're turning into an adult." When she first said this I laughed out loud then abruptly stopped as I had to think long and hard about that one.

What is best practice for exporting animated troop models? I've been looking to the Leadwerks community for ideas. The requirement is having a standard set of animations that can be used for all humanoids and documenting the pipeline for an artist. Animating characters in Leadwerks is quite fiddly, it requires authoring a high level function to manage blending different animations for a typical humanoid character. For example, the upper torso might fire a weapon while running, or walking. What I did earlier was create a standard set of strings for animations and have the frame range for a 'walk' defined in the model LUA file. I'll move this out to an XML datafile to facilitate editing. But I want to use the same animations for different models, e.g civilians, pilots, troops.

"Does my bomb look big in this?"
P.S Also continuing with the campaign functions from this last week which are labour intensive.

9 comments:

  1. Happy Birthday Flexman :) And lamborghini at the end of the year! ;)
    ****************
    I'd give anything if the next helicopter in CH will mi28 !

    ReplyDelete
  2. Thank you. My kids got me the "Art of TRON" book for my collection and a USS Enterprise bottle opener which I will put to good use later :)

    A definite sci-fi theme.

    ReplyDelete
  3. Happy belated birthday!
    Live long and prosper. \ V / _

    About that Havoc image. Number 10 is Scan. How important is that for you? I could ask in DCS forums if you want it.

    ReplyDelete
  4. Hey Eagle. It's not that important, I have a pal in Siberia that can do bad translations for me when I'm desperate. When he's not too busy playing WoW.

    I need to carry on with my script review right now before I get sidetracked. The whole AI speech question kicked off a look at that and realisation that not only did I forget AI teams but also lack of trigger zone layers. So it's two things that impact on each other, just overlooked.

    I tried the emitter/grass idea. Doesn't work. Will leave it for now.

    And coloured shadows cause a huge performance lag spike at boundary LOD conditions so will drop those too.

    Cool new idea for spotting infantry in hillsides during the daytime, simple billboard 'sun glint' sprite. It shows up as a small flash, hard to see unless you're looking. Pretty neat.

    ReplyDelete
  5. Omg my sh*t english i misunderstood what was going on with these mfd
    To get started is to translate from Russian to English letters, and later as you will already more accurate shortcuts.
    1 PLT
    2 NWG
    3 RAS
    4 RLS
    5 K SS (KCC?)
    6 OWO
    7 IOS
    8 OTKZ (OTKE?)
    10 SKAN
    11PODW
    12 TOCZ (POINT?)
    13 ASP (ASPECT?)
    14 PS
    15 AS
    16 NABL
    17 SF3
    18 SF2
    19 SF1
    21 SKP
    22 TSL
    23 TPK
    24 TWK
    i ask evening A friend of mine who are studying RUSSIAN what they can mean these shortcuts

    ReplyDelete
  6. My friend is a blond girl and has no idea what those shortcuts mean: (
    If u need something simple translation of the Russian, it always help if I could, I know the Russian alphabet;)

    ReplyDelete
  7. Thanks for the report link. I'll reference it later when we're shopping for plants. Trust me when I say we have lots of photos and source material from the region. We've not tried to use accurate vegetation yet, just place holders tweaked to match the colour range of the game.

    Controlling scattering isn't something I can do very well with this technique. The veg colour and scattering in real life is actually INVERSE to what you see in a game. Difficult to describe without a picture. I'll try anyway (but I'll do a blog feature on it sometime).

    With 3D grass you typically have an island of billboards around you that appears less dense as it gets further away from you. The colour from the grass fades untill you're left with the underlaying terrain texture colour. In real life, grasses appear thinner the closer you are, and ground colour takes on more of the vegetation appearance as you move further away. So it's all switched around. And I'm thinking IF (big big IF) using mipmaps in a smart way can help here. As a distant mipmap for the terrain textures can be infused with more of the veg colour.

    Small things that I don't want to spend time on right now. I've got three things going on at once and I need to get this new script sent off.

    The TRON art book is pretty nice. It never occurred to me that Rinzer has TWO identity discs for combat as he effectively a split personality.

    ReplyDelete
  8. I don't think there will be much more scattered vegetation added. Not until (and IF) we do Combat Helo 2 using Leadwerks 3.0

    It's either procedural or not at all. Don't want to waste data on placing something you don't need to. Unity does this well but Unity is not for flight sims like this one.

    I'm a strong advocate of the right tool for the right job. Some game studios have blown lots of money and time on software to create pre-vis or early game tests. I'm from a board game background, it's possible with the help of a few friends to do the same thing around a table with cardboard cut-outs in an afternoon.

    When deadlines and finances are tight simple stuff like this adds-up. For the American space program millions was spent developing a pen that worked in zero gravity. The Russians used pencils.

    I've been testing our campaign game using bits of paper and a dice so I know it works as a game minus the distraction of graphics and the flight sim element. I think if you can do that with any game before you hit the compiler you have a game before you start the real work.

    I can't wait either. It's sad that all those graphics ans sim elements take a fair amount of work first time around.

    On the whole, I think such a campaign could be added to DCS titles. It's a fair amount of work but there's no incentive to do it. I wrote an LB2 to Black Shark mission converter but it was very limited. It took some basic FORMs and serialised some LUA objects from the mission file. But you had to manually fudge the scales, often the waypoints didn't make sense so there was not much point to it other than writing a class that generated Black shark format mission objects. I was going to turn this into a dynamic mission creator for DCS but got a little sidetracked. Besides I needed to do something to ease the threat of impeding poverty and I doubt the Fighter Collection or Eagle Dynamics would pay or even thank me for it.

    Anyway, water under the bridge. I need to get back to my US Marines and getting the correct GMF exporter plugin working in MAX.

    ReplyDelete
  9. And if I forgot, thanks for the quick translation. I can't say I'm wiser since I'm out of date with what systems are used in the Havoc and the Ka-60.

    It was just for my personal curiosity.

    ReplyDelete