Here are the new texture sets for the floor track . replacing the old one. There will be some transparent parts showing off piping running through the track floors. Will mix n match parts of the texture atlas to create more floor pattern varieties.

Posted by Prometheus
Ahh... I finally got it quite right. Few days back I was trying to tackle frame rate independent physics. Sad to say, bullet physics as nice as it was, was horrible at interpolation. This is due to it doing extrapolation instead of interpolation which didn't work very well with force intensive physics (Having multiple forces applied to an object at each simulation step).

The reason for interpolation/extrapolation of physics is so that physics can be simulated at a fixed time step to maintain stability and determinism. This means that given an exact state of an initial physics world, the simulation will always end the same way with the given fixed input in any number of tries. However, as frame rate is not in fixed time step and can fluctuate depending on cpu/gpu performance, interpolation/extrapolation was introduced to provide "smooth" graphical display.

The sad part about bullet though was that it's doing extrapolation. In layman term, this means predicting into the future. In some sense it's correct if you think about each simulation is a few millisecond behind the current rendering frame. But it causes horrible jerks due to the prediction.

Hence I went and dig through bullet's source and modified it to do backward interpolation or I should say "true" interpolation as described here:

After this, I managed to get good frame rate independent simulation which helped a lot on my machine where fps fluctuated around 30 to 60. All was nice and dandy until we tried it on the faster 8800GTS and 9800GT cards. It was giving horrible jerky motion due to fluctuating fps of 58 to 60. Thanks to Ogre for providing the frame smoothing feature. After turning it on and tweaking to a good enough value (0.05 - meaning average 3 frames at most), we got pretty darn smooth simulation. :)

But there were still some vital pops and jerks once in a while due to paging geometry. In the end, I had to crack my head and totally put all processing of paging geometry stuffs into the background thread. That solved almost all jerks and pops. :)

I think I'm happy with what I've achieved thus far. Now I can focus on network and scripts. FINALLY!

P.S. I'll be posting up a patch to bullet for that interpolation feature once I get enough time. I didn't remove the extrapolation technique. Just #defined them so users can switch between them when compiling. I think they should really embrace this method as the default though. It works a lot better for visual side of things even though it means visual is slower by 1 frame.
Posted by Lf3T-Hn4D
Still screenshot of the exhaust flames coming out of the crafts engines. Looks alot nicer when the flames are in motion. Will be needing some refraction particles to simulate heat waves. Vroom....

Posted by Prometheus
Here's an update on the refraction effect for flowing water coming out of drain pipes. Will be adding some particle effects for water splashing a little later. Player would be able to turn it on and off later in game if this effect is slowing down their framerate.

With refraction

Without refraction

Posted by Prometheus
Started working on the next track theme with the first building blocks.

Posted by Prometheus
L3ft_H4nd finally got the blog comments working ! after many complaints bout the broken post comment link.
Posted by Prometheus


I know, I know.. Not the best shot to be proud of. But its the best shot at showcasing every single graphical feature we have in our game right now; HDR, Refraction, Shadow, Paging Geom, Baked AO (somewhat like light map but independent of light source), fuzzy holo and lens flare.

Yes, this post is more about the refraction than anything else. Getting refraction up was a real pain. Took me a few days of frustrations and hitting Ogre bug(s) before I got it working more or less. The FPS isn't too happy on my machine though. 8600GTS just doesn't cut it for such fillrate intensive feature. I'm getting about 40-50fps when every feature is turned on (shadow at lowest setting). I've yet to test it on the more powerful 9800GT, but I bet it'll be blazing fast. :)

The trick behind refraction is that it's a postprocessing feature. Thanks to Ogre's nifty compositor system, It allowed me to build this pretty much from a simple compositor script and a handful of materials and shader files.

What I did was basically tell compositor to render the scene in what I call the refraction pass. What happens here is that instead of rendering the scene with the basic materials, we render them with special refraction materials which sets the refraction and depth info into a temporary render texture. This is done by ordering the compositor pass to use a custom material scheme.

After this is done, the render texture is then used to distort the real scene texture base on the offset and depth info. Not too complicated. :)

However this technique has it's quirks and problems. Attempt at using it for effects like stained glass results in ugly distortion of the tinting. Stacking them up over one another will most definitely turn it into a muddle of crappy distorted glasses.

Still, this effect has it's use in many other cases. For one, we intend to use it for simple water based effect like the shot above. Uh.. yeah, it's not going to look like that, I'll be changing it to the proper shader later. :P

The second effect, which we will be using a lot, is heat haze and shield distortion. This will definitely spice up things. Hehe :D

Aside from this, there's still more to deal with. To get this working I had to work around a problem with the PCZSM(portal scene manager) that I was using. It was a bug that causes compositor to not function properly. I've yet to figure out how to solve that. Hopefully I can solve that soon and move on. There's already tons of things in my todo list and it's piling up! :(

That's it. I'm done. Shader programming should be a full time job. Sheesh.

P.S. I know I didn't really properly explain the whole process of the refraction shader. But I'll leave that to the imagination of any reader who intends to add refraction into their system. :) It's not that hard to figure it out.
Posted by Lf3T-Hn4D
Redid the game logo as the first version lacked the feel of the game. So heres a new one.

Posted by Prometheus
I got background threading working and it's working mightily well for paging geometry's batching. With it, I no longer get the annoying periodic jerks that happens whenever a page gets batched in to view.

I've also added an option to dynamically tweak the "density" of the paging geometries so that lower end machines can have less details as necessary. :)

Also to improve performance due to fillrate issues, I've made grass shader's shadow receiving technique pervertex instead of perpixel. This means only cards that supports vertex texture fetch will work. I wonder how many ATI cards I just killed. Hmmm... will need checking.

Henceforth, mission success! Very happy and proud of myself :P Now, back to refraction technique. Then after that to do the most important thing; Network, Script and Game logic!
Posted by Lf3T-Hn4D
Just created a new game logo for aftershock. The red color circle represents the core gameplay mechanic of the game.

Posted by Prometheus
I'm almost done with the threading system. It's designed with variable number of threads (depending on how many cores the system has) to maximize thread efficiency.

Funnily, halfway through implementation, I realized what I'm implementing is known as a Thread Pool. Its what many apps like browsers and web servers used. Just shows how inexperienced I am with these stuffs. :P

The system I've written supports triggering of when a queued process is completed in the main thread. It also supports canceling of a queue process. Hopefully things goes well. Then we'll be able to see it in action. :D Can't wait. Woo hoo~
Posted by Lf3T-Hn4D
Blender-Tutorial just posted an interview with Liquid Rock Games. The interview is in Italian with english translation. Many thanks to Andrea Calza and Dario for the interview. Check it out here at:

Blender-Tutorial Interview link
Posted by Prometheus
Here is the video download link for the track roundabout which includes paging geometry in it such as wild grasses, fallen leaves and pebbles. Craft speed in this video has been increased by 50% as well.

A little explanation on the craft speed in game. The crafts in Aftershock generally do not have boosters but the way the craft speed can be increased is by controlling power distribution between the engine output and shield output.

If the player increases his craft shield output capacity (for example key "Q") energy is diverted from the craft engines and thus his craft's shields is strengthened and regenerates faster but at the cost of maximum speed. For example shield output increases 300% max but crafts max speed reduced by 50%

Similarly if the player increases his craft engine output capacity (for example key "E") energy is diverted from the shields to engines and thus his craft's maximum speed is increased but at the cost of lower shields. For example engine output increases max speed by 300% shield output reduced by 50%

Think of this of this energy distribution similar to manual control.

Download Video from FileFactory

Posted by Prometheus
We've got static batching, we've got paging geometry, we've got smart gpu/system ram paging for static batching, what next?

Unfortunately, we found that we're hitting a bottle neck with paging geometry. It was not batching up the pages fast enough. This caused us bad jerks and halts that happens every few seconds due to our high speed traveling.

I decided that it's not acceptable and decided to come up with a compromise idea. Instead of using the geometry batching provided with the paging geom library, we're going to rewrite one that is thread friendly. What happens here is that instead of generating the batches on the fly in the main thread, we're going for a background threaded batching method. This means that if a batch can't be ready within the next frame, it can wait till the frame after before actually being uploaded into gpu.

However, I do hope that I'm right as in it's the batching that is slow and not the uploading. It's a wild guess, but I think we're going into the right direction. Eventually, we'll need this background thread system for other stuffs like AI anyways.
Posted by Lf3T-Hn4D
Been adding lotsa details to our current level using the new real time brush painting tool that Lih Hern made. Damn it rocks !Can't imagine planting each blade of grass and pebble manually. Would've taken ages.

Updated screenshots here at:
Image Shack Screenshot Gallery

or the artwork progress forum:
Project Aftershock Artwork Progress Forum
Posted by Prometheus
Heres an exclusive interview by Christophor SuperGuido Rick from Gamers News Daily . Thanks a mil Chris !

Exclusive Project Aftershock - Futuristic Apocalyptic Co-op Racer Quick Interview
Posted by Prometheus
I've finally got it done and gave a new build to Yap. This thing took me quite a while to debug. For the most part, it was due to the issue with our editor using the Octree scene manager while the game uses the PCZ scene manager(Portal). It complicates the way I had to render the paging geometry nodes.

Well, It's done. This baby will give us all the gritty details that we wanted at a reasonable cost. :)

Now all that is left to do is to wait for Yap to do his magic. :D

(Mean while, I'll try tackling the water reflection.)
Posted by Lf3T-Hn4D
An update on the low poly Gatling Gun model with textures:

Posted by Prometheus
Hey Project Aftershock is now in Blendernation news ! Thanks Alex for the article!

Blendernation Article on Project Aftershock
Posted by Prometheus
Liquid Rock Games and Project Aftershock. All Rights Reserved.