Friday, May 6, 2011

CBox Unbiased Truck

I've modified the scene in the Kajiya path tracer a bit more: it now consists of a Cornell Box out of axis aligned boxes with the (in)famous truck from Unbiased Truck Soccer:

Color bleeding from the red and green wall:

The screenshots were rendered with 8600M GT (6 fps default view). On a GTS 450, the demo runs at 70 fps in default view. It should run at >200 fps on a GTX 580 with 8 samples per pixel. This new path tracer is just incredible fun, I can't stop messing with it.

Executable and source code at

UPDATE: a more challenging lighting set up with an open box only illuminated by the sky:

The truck seen from behind, indirectly lit by skylight bounced off the back and side walls. As expected with standard path tracing, the noise is a lot worse in this scenario. Bidirectional path tracing should converge faster using fewer samples.

Thursday, May 5, 2011

Arnold Render impressions from FMX 2011

More details by Marcos Fajardo:
Having showed a 400-million-polygon asset from G-Force as proof that even the heaviest scenes can be raytraced in production, Fajardo singled out volumetrics as a particular area of benefit.

“[With a traditional hybrid Reyes renderer] you’re losing the interaction of the raytrace effects with the volumes so even simple things like shadows become a problem,” he said. “[With Arnold] it just works. There’s no ‘gotcha’.”

The move to fully ray traced rendering in the movie industry (f.e. Sony Pictures Imageworks and Blue Sky) has started and it's happening really fast. Now it's up to the game industry to do the same.

Wednesday, May 4, 2011

Real-time path traced Unbiased Truck Soccer moved to Kajiya-engine

It has been a while since the last update on Unbiased Truck Soccer, the real-time path traced game featuring a truck made of spheres. Two major changes happened since last time: I've upgraded from my laptop with 8600M GT to a desktop with GTS 450, not a high end card but a fair bit better than the ultra-low end 8600M GT (I'm still using the latter for developing and testing new ideas, because if it looks and runs OK on crappy hardware, you can be sure that it will look great on a real GPU). I've also started porting the Unbiased Truck game to the brand new and recently released Kajiya scene path tracer from Jacco Bikker and Jeroen van Schijndel. This decision was made for several reasons:

- when comparing path tracing performance on the 8600M GT and the GTS450, TOKAP runs only 5x faster while the Kajiya path tracer runs 11x faster. It's also optimized for Fermi cards and uses CUDA 3.2, while tokaspt (TOKAP's framework) was developed for CUDA 2.0 and pre-Fermi cards. The path tracing performance of tokaspt was already extremely fast, but this new path tracer is just in a league of its own.

- it's going to be fairly easy to port this to OpenCL, since the CUDA-specific code is very small and there's also an OpenCL port of the Kajiya demo available at Still waiting for working OpenCL 1.1 drivers from Nvidia.

- more primitives to choose from: not only spheres (as in Tokap), but also cubes (axis aligned bounding boxes actually) and ellipsoids, so there will be less restrictions on game ideas. An example of a physics game: drive the truck into a building made of boxes and make the whole structure collapse like in this video. This would require additional support for oriented bounding boxes.

- the Kajiya path tracer uses "hitboxes", a kind of acceleration structure, improving performance. Tokaspt doesn't have built-in acceleration structures, hence the path tracing performance went down very quickly when adding more spheres (or a second truck).

- proper support for skydome and sunlight with much better looking shadows and much reduced noise levels

Some pictures and videos (screenshots rendered with 8600M GT, videos with GTS450):

The next two images show all the advantages of rendering with path tracing: reflection, refraction, soft shadows, ambient occlusion and colour bleeding. Surpassing Pixar quality graphics in real-time! :D

Nice refraction + color bleeding and gradual light fall-off on the car's rear:

An "overcast" sky (no sunlight):

Night scene, only illuminated with a spotlight. Notice the indirect light bounced from the floor onto the cuboids:

Convergence in this simple scene is extremely fast. While moving, frames are displayed at 8 spp and the scene runs with great quality at 50-60 fps (512x512 resolution) on my GTS 450. When the camera is stationary, 32 spp are accumulated.

I hope I will soon be able to animate the truck and incorporate some CPU physics.

Download executable (Win32) and source code at


Tuesday, May 3, 2011

Minecraft rendered with Octane

After the impressive and awe-inspiring videos of Minecraft rendered in real-time with the Brigade path tracer (1, 2, 3 and 4), here's a pretty neat day/night cycle animation of a Minecraft level rendered with Octane, which looks completely real and kind of resembles a LEGO world:

With a couple of ultrahigh-end GPUs, I think the daylight parts in this animation can be path traced in real-time with very good quality, even though all surfaces are glossy, because almost all of the lighting comes from a skylight. The following video demonstrates the extreme speed with which a completely glossy benchmark scene (the Death Star trench from Star Wars) converges in Octane on 2x GTX 460 under different lighting conditions: After having messed around with the Brigade path tracer for countless hours on a laptop with 8600M GT and still getting pretty good results in real-time, I'm convinced that Minecraft levels will soon be playable in photoreal quality on high-end hardware. Once that goal is reached, it's pretty easy to imagine what's going to come next.