Friday, 20 August 2010

Flight model Mk2 update and roads

At no point before have I felt so much under pressure as I do now. Hence the lack of blog updates. The new physics engine is still being problematic but these are issues relating to -ff-math and tracking down typos, the odd logic error and other errors that occur when programming.

In a flight model, such errors result in numbers quickly blowing up, which they do. So I'm currently tracking down each issue, one at a time until, eventually, it should just all click into place.

I finally configured my Combat-Helo input map for my Saitek X52 and apart from my shocking oversight of an inverse axis option it was a nice experience using the old mk1 flight model. It's frustratingly hard to get up to speed and it still flies in a nose down attitude. I may fix those points and retain it as a 'rookie' flight model.

All this debugging and testing is taking up all my time, the goal is to have it in place for the show on the 28th. It's looking hit-and-miss atm. We're supposed to be working on some FSX stuff as well but that's had to take a back seat due to holidays and other things. Hopefully will be able to spend some time looking at that in two weeks time.

AD did well finding an OK solution to paved roads. They work, efficient but they require a lot of work.

To quote...
Just to elaborate a bit. The key component is a vertex shader that takes the Z value (height) from the terrain and applies that to the Z value of the road vertices. The road itself is built in 3dsmax as a primitive mesh, a meter high and 20 meters wide. It's flat and the vertex shader sets the height at the end of each section of road.

40960M's of road can be bought at the cost of about 2500 polys which is outstanding in comparison to the native road system which costs tens of thousands of polys for short distances, doesn't work most the time, creates massive slow-downs, and flickers like a 1950's TV in a washing machine.

The only real down-side is the amount of work it takes creating the road mesh itself. It took me about an hour to lay down 10KM's, debug the path and smooth-out the ground underneath it. Therefore it probably won't be a suitable method for the dirt roads.
I would add that the native road system is fine for small areas, it's perfect for small FPS style levels but non-instanced geometry will always have a huge performance hit if there's a lot of it.

Using static meshes for the road system makes it easy for collision testing to flag "onRoad=True" and the model can use this value to adjust sound and emitter properties. For example, running across sand will sound different to running across a road surface. More dust will be kicked up. Those things are more complicated to do using texture splatting or a giant texture overlay to represent these kinds of features.

Here are some pics of the roadworks.




7 comments:

  1. Hi Flex. Love all those news but one more thing. Im sure Ive already seen this, but if not, maybe it can provide some interesting reference for Your project.

    http://www.youtube.com/watch?v=K_L4rA8uoTA&feature=related

    ReplyDelete
  2. I mean.....YOU have seen this. Sorry. :-)

    ReplyDelete
  3. I have had a look at NixonFranks uploads. The engine page is near identical to the UH60 ground simulator I took my original data from.

    There have been quite useful videos but I always appreciate links in case I've missed them. Thank you.

    ReplyDelete
  4. programming is great, debugging on the other hand .. sucks. Going crazy yet? If so, remember the beer in the fridge!

    ReplyDelete
  5. I'm all out of beer. All I have left if a 10 y/o bottle of Vodka and drain cleaner, both of which I found under the sink

    And yes, going crazy. Taking a little break from debugging and adding a multi-camera class. Putting in jiggles and such like for flypast etc.

    Anyone know of a good function for a "formation cam"? That looks like it's being shot from a camera flying alongside? A Sin/Cos wobble with a bit of noise, something like that.

    ReplyDelete
  6. Search in this tutorial for bounce/bobbing.

    http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=10

    It uses a sin wave to make the head position bob up and down when the player walks. May or may not be a good base to start with.

    Most of Herat is now paved with roads. Got some tricky sections left to do, then I'll get back to making some more custom buildings to fill out the rest of the space. Should be done by next weekend hopefully.

    ReplyDelete
  7. Flex, are you using a unit test framework at all? They help make sure you don't break one thing while fixing another.

    ReplyDelete