racer home



Home Daily (well) diary.

Dolphinity Organiser - free planning, project management and organizing software for all your action lists


05-11-2010 - HDR tonemapping

After some time, I finally got Uncharted 2's HDR tonemapping to work, thanks to a renewed Google search. The auto exposure works with this, altough it seems less touchy than the previous HDR tonemap.

An example shot below:

hdr uncharted racer

10-08-2010 - Time of Day editor

Today I've started adding a subset of Curved into Racer directly, to provide for a live TOD (time of day) editor (using 'edit tod'). Horizontally you see the time of day (00:00-23:59) and vertically the exposure. More variables should be available, but I got the exposure curve working. The editor is also very rough; no adding/deleting of points for example, and no axis info yet.

time of day editing

While dragging, the graph gets more transparent to show the live result:

time of day editor racer

23-06-2010 - Ambient lighting and normal influence

Been playing around with shaders to add features like specular maps. Also, I noticed the current ambient calculations only use a constant, resulting in fairly even lighting on the unlit side of materials. Also, as someone on the forum noticed, all shaders appeared to calculate lighting, multiplying with lightColor in lighting.cg, then doing the same thing in the fragment shader, thus doing a double multiply, making things a bit darker than it should be.

For ambient light, I added influence by the triangle normal, where down is supposed to give darkness (the ground) and up more light (the sky). I added this to lighting.cg:

// Add a bit of sky influence, assuming down=dark and up=light
float normalInfluence;

It also affects the lit side. See the difference (also note the subtle effect on the tire rubber; at the top it's still visible, but downwards it gets darker):

racer ambient normal

03-06-2010 - V0.8.9

Being uploaded as I write; v0.8.9. Get it here until I get the time to properly release it. :)

racer 089

26-03-2010 - Driving off faster

v0.8.9 introduced a dynamic autoclutch_rpm; the engine.autoclutch_rpm setting is no longer used. Instead, to get faster launches, the throttle pedal decides the rpm at which the clutch kicks in. When driving away slowly (throttle near 0), the autoclutch rpm is near idle rpm so you get smooth acceleration. When throttling hard at the start, this autoclutch rpm (now internal to the physics engine, not a constant) is moved towards the rpm at which the engine generates the maximum amount of torque (calculated from the torque.crv file). So throttling hard will result in the engine rpm going towards the maximum torque rpm, at which point the clutch is released (within a small rpm range to avoid on/off behavior). This allows faster drive-offs than in previous Racer versions, but much more like real racing.

24-03-2010 - Improving shadow mapping

Shadow mapping still had the problem of sharp big pixels when it came to specular. A solution was to use multiple render targets (MRT) and store the diffuse+specular contribution of each pixel in a separate buffer (a bit like deferred shading, only simpler). The problem was that we wanted to use the Alpha byte in the 2nd render target to store the shadow state of the pixel, but for blended materials (windows for example) it turned out the 2nd buffer writes were using that alpha to blend in the RGB part. Unfortunately we haven't figured out if it's possible to blend only the 1st render target, and not the 2nd.

This means that transparent objects are getting a bit troublesome, and now need their own shader (standard_transparent_f.cg). Also, transparent objects won't throw shadows. Mostly this can be circumvented by using alpha_to_coverage, where you dither instead of blend (more MSAA = better dithering). The fun part there is that it allows you to use the Z-buffer once again, and this means you can turn depth writes on again, which in turn enables shadowing again. Useful for trees and fences and well, most if not everything that you would want to blend.

An example shot, rendered at 1024x768, downsized to 800x600, originally running at 16xMSAA, 16xCSAA. The shadowmap is 1024x1024, although 512x512 is reasonable as well (Killzone 2 keeps this limit, but that's on a Playstation 3).


10-03-2010 - Camera system

I'm reworking the camera system to get a more dynamic look. Here's a bit of a work in progress. Some inspiration comes from the PS3's Ferrari Challenge, although that one is limited to cameras hooked to the road only. Trying to get around that with a mix of the existing track cameras.

05-03-2010 - Shadowmapping

Mitch is working on shadowmapping, nice (but reasonably expensive). Nice stuff! I'm reworking the camera system for improved director shots. This was a 1024x768 shot using 4xMSAA, 16xCSAA, live track mapping and shadowmapping with Gaussian blur (on an nVidia GTX285, Quadcore machine).

shadowmapping racer


Dolphinity Organiser - free planning, project management and organizing software for all your action lists

(last updated December 30, 2014 )