Thursday, 9 June 2011

Screenshot of the day

Time for another one of these filler posts. Hey, you don't have to read'em but I have to keep posting or I begin to lapse.

Spent the morning testing the new Leadwerks Engine 2.43 update which improved weapons fire by having collision hulls generated at load time. And a problem with recursive AABB bounding box calculation. AOE weapons use bounding boxes to begin damage testing.



Problem with clustering small objects such as rockets so close together in a scene with a large camera range are the z-buffer errors that arise, these appear as clipping or z-fighting. What I've done to mitigate this is apply a proportional z buffer offset to 'enclosing' entities.

float dist = length(modelvertex.xyz - cameraposition ) / 512.0;
float z = DepthToZPosition(gl_FragCoord.z);
z = z - dist;
gl_FragDepth = ZPositionToDepth( z );

This takes the distance from the vertex and camera, then applies this as an offset to the depth buffer. It's useful only for decals or large hulls, any error in overdraw is masked by camera distance. Annoying stuff like this takes time away from game internals but z-fighting bugs me even more. There are still parts of the Apache that exhibit this, the glass parts of the TADS for example but you only notice them with the night vision system.

*update*

US road-markings...

10 comments:

  1. Am I seeing 143fps?? Sweet :)

    ReplyDelete
  2. This just cant look better...

    ReplyDelete
  3. It can be improved, have to fix tree lighting and water during camera zoom operations.

    Coronas are point sprites used for lights in combination with actual point lighting and they are still broken.

    But I'm working on game stuff, rockets still. They are quite complicated to pull off due to the nature of how they are loaded into zones.

    ReplyDelete
  4. Tree lighting is alright since I built new trees, but billboard generation and lighting are wacky to say the least.

    As you can see in screenshot 1 specular levels are off the charts. You can mostly fix that by opening the dot 3 billboard dds and reducing the brightness in the RGB channel but it's really something that should be fixed in the shader.

    The bigger bug is that billboard.vert has incorrect normal calculations. The lighting is clearly rotated through 180 degrees. I spent some time trying to fix it with -hacks but I didnt have any real luck.

    The final tree issue to solve is the LOD distancing. We should be able to push LOD2 out quite far (as it's sub 500 polys) and that should improve the look greatly.

    Cheer

    ReplyDelete
  5. Today i installed Duke Nukem, I'm curious impressions.For many years, none fpp game was not outstanding,I wonder if will feel much younger;)
    If you like it, that is, it will be a great game.

    ReplyDelete
  6. It's just funny. Rude, but funny.

    I played for 2 hours late last night, I ended up stopping to play on the in-game slot machines.

    As a character, you know exactly where you stand with The Duke. No grey area.

    You see, I played Crysis 2 all the while I was thinking I'd been here before...with Resistance and before that Duke Nukem 12 years ago. But I still remember the Duke just because it had character rather than being a technical exercise.

    Don't get me wrong I like technical games but blades of grass and fancy shaders are but fleeting moments in a game. I've I could afford 1.5 thousand for AAA clouds and ocean water I'd add them to CH but I can't.

    ReplyDelete
  7. Yes its funny:) And this is a game for adults.
    Good old Duke.
    The same will be Combat Helo.
    It will be a return to the past,in the new look.I do not need anything else.

    ReplyDelete
  8. King came back in great style.
    Something amazing, this game was hibernates for a dozen years.
    The mass of honey,A great gameplay , fantastic sense of humor, young kids just complain about everything.
    Such games is not and will not be.

    ReplyDelete
  9. lol you should make a payable demo with the suff you have right now to make some money. there is enough items in the game to keep people occupied(me) until the game is released. lol every time I see apache footage and FLIRS on websites i get more excited to play!!

    ReplyDelete
  10. That's what we're working on with the firing range.

    ReplyDelete