Tuesday, August 30, 2011

OTOY partners with GPU path tracing renderers Octane and Brigade!

Wowowow... this is superawesome news! An article on Venturebeat today revealed that OTOY will be partnering with two fantastic renderers, Octane Render from Refractive Software and Brigade from Jacco Bikker, both pioneers in interactive/realtime high quality GPU based rendering.

I've blogged about these three developers before, and the fact that all three will be joining forces is just breathtakingly awesome! It's a dream come true:

- Octane Render is by far the fastest, most feature rich and highest quality unbiased GPU renderer, trouncing traditional biased and unbiased CPU renderers

- Brigade is a realtime CPU/GPU path tracer targeted at games (with many noise reducing optimizations) developed by Jacco Bikker, who also developed the GPU path tracing code used in my latest demos

- OTOY is an emerging cloud rendering/cloud gaming company (probably best known from the AMD Radeon 4800 and 5800 launch events and the Ruby demo which used voxel ray tracing) that also owns LightStage, a state-of-the-art dome-shaped capturing environment for creating 100% photorealistic digital actors, which was used in blockbuster movies like Benjamin Button, Avatar and The Social Network

This new partnership means that there is now a very high concentration of high-quality rendering know-how and I've got a feeling that there will be more to come. This will have a profound impact on the movie/game/rendering industry... I'm extremely happy and excited to see what's coming from all this :D.

The VentureBeat article is here: http://venturebeat.com/2011/08/30/otoy-cloud-video-games/

Sunday, August 28, 2011

UPG: Unbiased Physics Games!



I've been working on some new real-time path traced demos during the past week involving physics, driving and shooting, three popular ingredients in action games. The demos will be bundled under a new 3 letter acronym, i.e. UPG (GPU in reverse), which stands for Unbiased Physics Games.

I've created two new small games:

- a simple driving game where you can pull some driving stunts with lighting effects (the camera follows the car):


- a simple shooter game where you can hit the car and a robot-like character which will respond to the impact of a cannonball:



Both games use the GPU path tracer developed by Jacco Bikker for the Simplex Paternitas demo. The videos were recorded on a GTS450 with 16 samples per pixel (which already offers very good image quality with little noise) at a resolution of 640x480.

The robot and car in the second demo are both encapsulated by a "hitbox" (an axis aligned bounding box to maximize the path tracing performance), which position is updated every frame.

I'm going to implement a movable and "shootable" light hanging from a chain, which should create dramatic shadow effects. Some basic AI path finding code so the robot starts chasing and shooting the user-controlled car might also be an option. Still thinking about implementing oriented bounding boxes which would enable some cool collapsing structures. Plenty of ideas still and new ones are coming every day, there's just not enough time to execute all of them :) On the rendering side, I think I'll shift the geometric focus of the demos to triangle meshes and two-level BVH or grid, because there's only so much you can do with spheres and boxes - even though they're relatively cheap to intersect.

I've also tried porting the code to OpenCL with the recently released OpenCL1.1 drivers from Nvidia but the OpenCL kernel refuses to build for some reason and there's no easy way to find out what's causing the error. It will take some time to get this right.

Download the executables at http://code.google.com/p/tokap-the-once-known-as-pong/downloads/list


Friday, August 19, 2011

Ray tracing in CryEngine 3!

Crytek has pioneered a lot of well known rendering techniques like screen space ambient occlusion and light propagation volumes for real-time dynamic global illumination. Proving that they're still at the forefront of real-time rendering, Crytek revealed at Siggraph that they are using a limited form of ray tracing in CryEngine 3 to enable real-time local reflections. The technique involves screen space ray marching along the direction of the reflection vector. More info about this method and lots of other interesting details in their Siggraph presentation at http://advances.realtimerendering.com/s2011/index.html

It's nice to see that ray tracing is finally being used by a leading game developer (without a doubt the most talented PC game engine developer of the moment), albeit in a limited form. If SSAO is any indication, we'll be seeing ray tracing based reflections in all of the other major game engines within the next year. From there, it's only a small step to use full ray tracing for reflections, shadows, refractions and ultimately global illumination. :)

Tuesday, August 16, 2011

Unbiased Truck with Plausible Bullet Physics!

The physics in the previous demo were funny and also a bit strange, because the chassis dove down when the wheels were going up. I discovered that the Z-angle of the chassis had to have the same sign as the Z-angle of the wheels, which gives a much more plausible result, although the wheels are still quite jerky and are jumping around because of the loose suspension. The car will pull itself to its original state in most cases, so I've decided to leave the wonky physics as is.

Rendered on 8600m gt:



Unbiased truck test drive in the Cornell Box:



New executable at http://code.google.com/p/tokap-the-once-known-as-pong/downloads/list

Some people reported problems with the last executable, so I included an updated version of "cudart.dll" this time (the CUDA 4.0 version).

Monday, August 15, 2011

Unbiased Truck with Bullet Physics!!

After lots of trial-and-error, I have finally implemented car physics in the real-time path traced Unbiased Truck demos. Bullet doesn't like it when physical objects are not placed according to Newtonian rules, which has caused some unexpected behaviour and crashes.

The Bullet SDK provides a vehicle physics example with parameters for wheel friction, suspension, chassis stiffness, etc. The "car" consists of a rigid chassis with four independent wheels. Matching the physics world with the rendered world took some time to get right: for example, since each of the four wheels can move independently from each other and from the car chassis, each "rim" had to match up perfectly with its respective wheel.

Crashing the car into the walls is just plain fun. When hitting a wall, the car seems to disintegrate at first, after which it pulls its wheels and chassis together again.

The video below was rendered on a 8600M GT at low resolution, spp and max path length to achieve a somewhat playable framerate (it should look much better on a high end Fermi GPU):

512x256 resolution, max path length=3, 4 samples per pixel/frame:



256x256 resolution, max path length=4, 4 samples per pixel/frame:



A better video with higher framerate and image quality will follow soon. The new executable demo "Unbiased Truck Bullet Physics" can be downloaded from:

http://code.google.com/p/tokap-the-once-known-as-pong/downloads/list


This is all work in progress. I'm planning to port this to the GPU path tracer developed by Jacco Bikker (which was also used in the Futuristic Buildings demos), which has support for AABB acceleration structures, better shadows, and which generally runs faster. A camera will follow the car, not only by targeting the car's center, but by moving along with it behind the car. Some basic shooting mechanics will be included as well, and maybe also some ragdoll physics with one of these:


WebGL water ray tracing demo

Link I always like a nice real-time ray tracing demo, especially when it involves physics. Evan Wallace released a very impressive WebGL demo featuring real-time raytraced water with caustics and physics (waves, buoyancy).

The demo is playable (Google Chrome browser required) at http://madebyevan.com/webgl-water/

Youtube: http://www.youtube.com/watch?v=i6aEQ5pY1aQ

Source code is available in the Chrome browser (right-click on the page > Inspect element > choose the "Scripts" button > choose "renderer.js" from the drop-down menu)

Saturday, August 13, 2011

John Carmack: "Eventually ray tracing will win"

Aaah, delightful August... Holiday, warm, sunny, relaxing, enjoying mountains and beaches alternated with reports from QuakeCon, Siggraph and High Performance Graphics :-)

John Carmack has said some interesting things about ray tracing during the Q&A following his QuakeCon keynote this year (which was mostly about the practical problems of working with MegaTextures in a production environment). I made a transcript of the relevant Q&A portion which can be seen in its entirety on youtube: http://www.youtube.com/watch?v=00Q9-ftiPVQ#t=18m30s

"I expect, as we look at next-gen console and broad enough adoption of PC stuff, that there will be some novelty games that are all raytraced or all voxeled on there. But when you look at the top end triple A titles, I do not expect that transition happening in that timeframe but I keep looking at it.
There’s a lot of these things that we look at every five years on and on and eventually… you know I do think that some form of raytracing, of forward tracing or reversed tracing rather than forward rendering will eventually win because there’s so many things that just get magically better there. There’s so much crap that we deal with in rasterisation with, okay let’s depth fade or fake our atmospheric stuff using environment maps, use shadows. And when you just say “well just trace a ray” a lot of these problems vanish. But one interesting thing that people say “look real-time raytracing on current hardware”, that’s what I did in OpenCL recently and I did some interesting work with that. But the real truth is, you don’t just trace one ray it goes sixty frames per second.
To do the things that people want to see out of ray tracing, you’re gonna need to trace a dozen rays on there if you want your soft reflections or even sharp reflections if you got bump mapping on there and not to look like a mess of noise on there, you start needing an order of magnitude more rays than that. And most people still avert their gaze from the whole problem of dynamic geometry. There’s some interesting work that goes on with very rapid GPU assisted KD tree construction that’s starting to look at some of that, but it’s still a long ways off. It’s always the problem of fighting against an entrenched incumbent where we’re doing polygon… Vertex fragment polygon based rasterizers are so far and away the most successful parallel computing architecture ever it’s not even funny. I mean all the research projects and everything else just haven’t added up to one fraction of the value that we get out of that. And there’s a lot of work, lots of smart people, lots of effort and lots of great results coming out of it. Eventually ray tracing will win, but it’s not clear exactly when it’s gonna be."

There is also a brand new video and interview with Carmack on PCPer where he's rambeling about voxels, ray tracing and Larrabee, Fusion, GPUs with ARM cores (Project Denver/Maxwell):


From the article:
"On the topic of ray tracing, a frequently debated issue on PC Perspective, Carmack does admit to finding its uses quite surprising and has spent some time building ray tracing engines for development testing. He seemed surprised by the results in his initial attempt to replace rasterization with a ray tracing engine, getting as much as 60 FPS at 720p resolutions on a Fermi-based NVIDIA graphics card. When performance dropped below the targeted frame rate he was able to either produce an image of a lower resolution and display that or use previous frames to sort of “blend” them for a smoother image. The issue though is the delta between a tech demo and fully implemented gaming engine – demos deal with static models, there is no character animation, etc. And while the fact that it runs at 60 FPS at 720p sounds impressive, if you were drawing that with a traditional rasterization engine it would be running at 1000 FPS!"
A transcript of the PCPer interview with Carmack (with some in-depth thoughts about ray tracing) can be found here: http://www.pcper.com/reviews/Editorial/John-Carmack-Interview-GPU-Race-Intel-Graphics-Ray-Tracing-Voxels-and-more/Intervi


There's also new interesting research material from HPG, mainly about ray tracing: active thread compaction for GPU path tracing (Wald) (performance boost is much less than initially thought), improving SIMD efficiency for GPU Monte Carlo rendering with stream compaction (van Antwerpen), 10x faster HLBVH (Garanzha), raytraced moblur (Gr├╝nschloss), VoxelPipe (Pantaleoni), CUDA rasterization (Laine):




Wednesday, August 10, 2011

GTS 450 video of Unbiased Sphere Stack Shooter game

Much better quality video (480p) of "Unbiased Sphere Stack Shooter" rendered on a GTS 450:



The photoreal lighting of the scene is much more obvious in this video (less noise, higher framerate and higher resolution than the previous vid which was rendered on a 8600M GT) Unfortunately Youtube puts a nasty filter over the image, the original image quality is much crisper.

The executable demo of TOKAP Unbiased Sphere Stack Shooter is available at http://code.google.com/p/tokap-the-once-known-as-pong/downloads/list (CUDA 4.0 required)

After much tinkering with the Bullet code (converting quaternions to degrees) the car physics for Unbiased Truck Soccer are finally working (just one car atm, but it looks hilarious), so I'll be posting a new demo and video soon.

Monday, August 8, 2011

Small update on CentiLeo


There is also a dedicated website about CentiLeo at http://www.centileo.com. Some interesting quotes from the website:
"CPU-based rendering solutions (even many-core, e.g. 16-core) are much slower than our GPU-based software (around 25x slower). Such 16-core CPUs are 3-4x more expensive than our GPU."

Wednesday, August 3, 2011

Unbiased Sphere Stack Shooter, the first real-time path traced shooter

A physics based demo without user interaction with the physical objects in the scene is only half as fun, so I've been working on a little physics based game where you can shoot a ball into the scene and hit physics objects. It's not a real game, it's just mindless fun and the graphics are as good as photoreal.







Features:

- real-time path traced graphics on the GPU: produces ultra-high quality physically accurate global illumination, soft shadows and reflections

- integration of the Bullet physics engine: start/pause the physics simulation by pressing 'm'

- first person camera: move forward, backwards and sideways with the arrow keys

- mouse look: click and hold the left mouse button to look around the scene (already working, but needs a bit more work to make it more robust)

- shooting mechanics: fire a ball into the stack or try hitting a bouncing sphere by pressing 'Enter'. The ball is shot from the current camera position at the current view target in the center of the screen. Due to performance reasons, only one ball is shot at a time (the same ball is 'recycled' with every shot).

Make the physics go berserk!


Video rendered on 8600M GT (a better quality video on GTS 450 will follow soon):