Thursday 28 April 2011

HDR brown and fine-tuning with video playback

Now I'm able to get more stick time in I've been making lots of little fixes. Something as simple as 8-way coolie hat control for panning around the interior and exterior helps a lot. Could probably manage right mouse and pan control logic for exterior vehicle views.


The normals on the trees really need addressing, I suppose I need to get off my bottom and look at those. It seems to be the LOD2 mesh but as I've mentioned before, I need to try a community shader that adds a bit of variation to them.

I added a bit more detail to the explosion effects. A simple expanding sphere with opacity maps and flame, very subtle, along with initial flash and smoke. This combines with additional fire and smoke effects and more than sells the idea that you're trashing columns of vehicles. The next trick is to add to the game message handler a means to fire effects so scripts or remote clients can trigger them.


Had an OpenGL stack overflow issue today, I was using TWO glPushAttrib() calls to move two colours onto the stack for poping in display list. I don't think this is legal even though it worked but glGetError() was still reported it. So I changed it to not do that. I'd rather add a bit more code and be cautious than break something. It's hard not to resort to tricks like that when you come from an 8-bit assembler background.


Visual Debugging

Using FRAPS to do captures has proved to be a handy tool in the past. It has the benefit of being totally wysiwyg, cheap and simple. You can consistently step backwards and forwards through a recording to examine objects in motion, measuring between frames if you have to. VLC has a handy speed jog dial and frame step feature which I've been using to examine effect sequencing, some elements are timed to last only 60 ms, blink and you miss it.

Alternative method might involve some in-game replay feature which requires something of a client/server topology which this game mostly has but it's a bit too complicated to capture everything in one place. It would take some re-working to fully adapt the code to do that which I don't have time for.

A couple of frame captures on my test zone, here I'm examining a video of blast wave effects for fine-tuning them. Somehow these captures are much darker than the video. Also I shot a night scene to see light propagation from explosions.

The next step is to do a similar test at about 1km from the event. In most games these things happen at close ranges, if the overall effect doesn't sell or have enough visual impact one option is to scale the effect parameters according to the viewers distance. Only visual testing will tell.




Parting shot

Starting to prep for the new Mk2 flight model which means some place-holder functions go in and disentanglement of the old one. So time to put the old bird up on bricks for a bit. Might not be flying for a few days.

AD alerted me to a bug I'd introduced in the joystick code which I was able to promptly fix (index out of bounds, a rookie mistake but dead easy to spot).

3 comments:

  1. Fantastic shock wave.You can write in one sentence HOW you working with the explosions?
    Is it the same way as EECH rows of numbers (for example OBJECTS;EFFECT_FIREBALL;0;160;160;160;180;0;1;0.500000;0.750000;0.750000;17.000000;17.000000;0.000000
    PARTICLES;SMALL_PARTICLE_TRAIL;0;30.000000)
    or you have a program, and it is working with sliders/buttons and everything is automated?Maybe I asked already about something similar, I have a good memory, but short.

    ReplyDelete
  2. And entity sends a message string with an optional local object reference (e.g. a target vehicle if required).

    The game MessageHander picks up an "FX" message then parses the rest of it to send to the game.effects class. "Hey lets have a .... here" and the effect is added to a list. Each effect inherits a base class. Effects may also send a message to spawn other effects. Currently it's something like "FX:type,object,duration,fadetime,size"

    I would add a circular dust emitter on the ground that travelled with the 'bubble'. The handy thing about having a 'bubble' as expanding geometry is that you can use it's AABB box to do a test for all other entities within it so you can then pass on concussive damage. I could probably get a chain reaction going.

    Where in EECH do you see that kind of data? Is that like in a config file somewhere? So you can edit effects and stuff with data?

    ReplyDelete
  3. Thanks, I sent a PM on SIMHQ

    ReplyDelete