Monday, February 28, 2011

Doom 3 path traced with OptiX

http://developer.nvidia.com/forums/index.php?showtopic=5892

Seems like a nice idea, but currently it's far from real-time and it doesn't look very spectacular. Imo, it should use the Brigade path tracer for better performance and quality.

UPDATE: the guys working on this have posted a new screenshot, showing much improved global illumination by using Russian roulette:



Everything looks much brighter now and actually starts to have that path traced look. Unfortunetly textures and geometry are pretty low resolution. And it's still way too slow for real-time (30 minutes for this 2048x2048 image on GTX480 + Tesla C2050).

Friday, February 25, 2011

LuxRender releases LuxMark 1.0, an OpenCL based path tracing benchmark for GPU and/or CPU

Wonderful little program, which is able to run entirely on the GPU, but can also run on CPU only or on both CPU and GPU: http://www.luxrender.net/wiki/LuxMark

It would be really awesome if a real-time pathtraced dynamic benchmark like this one (http://www.youtube.com/watch?v=33rU1axSKhQ) could be included in LuxMark, where users can interactively control the number of samples per pixel and the path length with sliders (just like in Tokap) and can interact with the physics as well. It's perfectly possible to path trace the scene from the OpenCL path tracing video in real-time and it would give LuxRender and its OpenCL path tracing effort some much deserved awareness!

Thursday, February 24, 2011

Some ideas for Tokap

While thinking about ways to make the ray traced Pong game more fun, some other ideas came to mind. If you think about it, there are a lot of simple games that can be built using just a few spheres. Some ideas:

- cube and pyramid of spheres. Shoot a sphere to see it collapse!
Newton's Cradle:



- A mountain landscape made out of spheres (originally from smallpt by Kevin Beason):


- Amiga juggler: http://www.youtube.com/watch?v=-yJNGwIcLtw The character is entirely made out of spheres.

- A game like this one http://www.donpixel.com/play/050912180926/ using spheres instead of boxes.

- A cool real-time path traced physics animation like this: http://www.youtube.com/watch?v=33rU1axSKhQ, originally developed by Chiaroscuro from Luxrender running on SmallptGPU.

As long as the number of spheres remains modest, these scenes could be path traced in real-time (with tokaspt) on a high end GPU and provide very realistic looking graphics with nice physics. Since the geometry of the "physics world" is decoupled from that of the "graphics world", the sphere-only limitation of tokaspt doesn't apply to the physics simulation, which can actually use real planes and boxes. These planes and boxes can then be approximated with spheres in tokap, while still producing 100% accurate physics as if the ball is rolling on a real plane, so even a snooker game should be possible!

There is also an amazing real-time raytraced game called "AntiPlanet" which is running on CPU but also has a version running on CUDA (http://www.virtualray.ru/eng/download.html). It's a first person shooter game where the entire scene is made out of spheres, including the weapons and monsters, and has been in development since 2001 (see http://www.virtualray.ru/eng/news.html)

Videos of AntiPlanet:

"AntiPlanet2 - indie game with real time ray tracing 3D engine which only does spheres. It has multi core and CUDA versions. The game is "doom"-style 3D shooter. The sperical graphics design is inspired by abstractionism and cubism genres of fine arts. Program download page www.virtualray.ru/eng/download.html

Night-time scene. Video was rendered in 1920x1200 resolution, system Core Duo 1860 + GeForceGTX 280"

Screenshot of AntiPlanet:

It would be awesome if the CUDA ray tracing engine of AntiPlanet could be upgraded to use path tracing. 'Tokaspt' could be used as a base framework, but it doesn't have acceleration structures (such as BVH) which are a must if you want to raytrace the thousands of spheres in AntiPlanet at acceptable frame rates. The video shows that 30 fps at 1920x1200 resolution is possible on a GTX280 with 'plain' ray tracing, very impressive numbers due to the fact that ray-sphere intersections are much cheaper than ray-triangle intersections. If the ray tracing engine would be extended to path tracing, I'm pretty sure that real-time GI (coming from a HDR skydome) would be possible at 960x600 resolution on a GTX580 with this game.

Tuesday, February 22, 2011

Voxel based global illumination video

Last week at I3D, a very interesting paper about voxel-based global illumination was presented, which was already available for some time at Kesen Huang's I3D page. But now there is also a video of the technique in action!


The paper also contains some results of voxel-based path tracing, which are unfortunately not shown in the video.

The voxel grid allows a coarse scene representation, which is much cheaper for calculating real-time GI. Pixar, PDI Dreamworks and VoxLOD use a similar technique (see http://raytracey.blogspot.com/2010/08/faster-raytraced-global-illumination-by.html)

Video of Caustic Graphics at Imagination Technologies stand

After the fake article, some real news about Caustic Graphics:

http://www.youtube.com/watch?v=xPq08cyKFY4. Not sure if there is GI in there. Disappointing visuals and a totally misleading and deceiving comparison between rasterization and ray tracing. This guy should go work for Intel :)

And a promotional short showing a simulation of how real-time ray tracing on iPhone would look: http://vimeo.com/19937145

It doesn't look like Caustic Graphics has anything compelling to show yet. Maybe they shouldn't show anything before they have a working sample of the Caustic Two card. In fact, it's starting to look more and more like the Larrabee debacle: pathetic real-time raytracing demos on phony, unmarketable hardware.


Wednesday, February 16, 2011

Some details about the new PowerVR GPU with Caustic Graphics ray tracing hardware. UPDATE: Hoax! (see comments)

Just saw this article: http://segaleaks.wordpress.com/2011/02/02/powervr-engineer-speaks/

Quote:

“CPU ray tracing has received tremendous speed ups in the past decade, with works on acceleration structures, traversal algorithms, and packet (or frustum) traversal. While these advancements brought ray tracing into the real-time area, the speed is still generally not acceptable.

PowerVR presents a solution, which proposes to place a small dedicated hardware ray traversal engine (RTE) directly on the GPU die.

The RTE has been confirmed to run at frequencies above 2GHz and can fit into an area less than 15mm2, achieving performance of over 1000 million rays per second.”

1000 million rays/second? Not bad at all! It's not clear if this number relates to coherent or incoherent rays, but Caustic's solution seems to reorganize incoherent rays in a way that they appear as coherent to the GPU. According to the Optix paper by Parker et al., a GTX 480 is able to trace almost 200 million ambient occlusion rays/s (when using the hand-optimized ray tracing kernel from Aila and Laine). So this new PowerVR GPU would be five times faster than a GTX480! Definitely something to keep an eye on. It's going to be interesting what Nvidia's reaction will be. I would like them to include some fixed function raytracing hardware as well, because it would be much faster and much more power efficient, but raytracing has to become mainstream before that happens.

UPDATE: As pointed out by Tomas in the comments, the article is apparently a hoax. Too bad, but thanks to Tomas for clearing this up!

All the numbers in the hoax article (2 Ghz, 15 mm2, 1000 million rays/sec) are pulled straight from the paper by Tomas Davidovic entitled "Performance Considerations When Using a Dedicated Ray Traversal Engine" (http://www.davidovic.cz/wiki/lib/exe/fetch.php/school/davidovic_wscg2011/davidovic_wscg2011.pdf)
except that the paper mentions 100 million rays/sec for the RTE instead of 1000 million rays/sec.

Very pathetic journalism, this article would fit much better at a site like semi-accurate where you know beforehand you're reading trash).

Tuesday, February 15, 2011

720p video of Tokap Arcade Madness running on a GTX 580 in 1080p!!!

This is really great, I asked someone with a GTX580 (Radiant from Octane render forum) if he could capture a video of the Tokap game, and he has done a truly fantastic job, running Tokap Arcade Madness in 1080p(!) and fiddling and tinkering with as much parameters as possible. Thank you Radiant!!!

More than 6 minutes of pure awesomeness if I may say so myself:


ENJOY! Just twelve months ago, who would have thunk that real-time path tracing at 1080p would have been possible today? :-D

Some screen captures:



Download 'Tokap Arcade Madness' at

Currently working on integrating the open source Bullet 3D physics engine into Tokap, to have some real physics based gameplay. Stay tuned!

Saturday, February 12, 2011

Cool new Nvidia tech demo with real-time raycasting!

These guys know how to impress, check it out:
http://www.youtube.com/watch?v=SbSo7onX9qI&hd=1

"Crank is a realtime graphics demo developed for NVIDIA. The demo showcases several NVIDIA technologies such as:

3D-VISION
CUDA
PhysX.

Crank was commissioned by NVIDIA to promote Fermi - NVIDIA's latest brand of GPU architecture, and used during the opening keynote at the 2010 GPU Technology Conference in San Jose, California.

This application was devloped in C++, using DirectX10 for rendering. The demo contains simulations of rigid bodies and a rendering of a 3D-version of the Koch Snowflake fractal.

Unleashing the massive parallel computing power in NVIDIA's new GeForce 400-series, the demo showcases an unprecedented display of realtime graphics and physics simulation."

Tuesday, February 8, 2011

Update 9 on real-time path traced Pong: Tokap latest version "Arcade Madness"

Completely over the top: bouncing, breathing, color changing balls. Video was captured in real-time on a 8600M GT!!! 16 samples per pixel (no motion blur)







Download link for all Tokap SRC code and EXEs: http://code.google.com/p/tokap-the-once-known-as-pong/

Real physics with bouncing angle depending on where the ball hits the paddle are next! Also the lightsource will bathe the scene in a dramatic red hue when the player fails to rebound the ball :)

If anyone with a Nvidia GPU which is more powerful than my 8600M GT (preferably a Fermi card ;) could make a short video capture of this demo and upload it, please do!

Monday, February 7, 2011

Update 8: Fooling around with tokap :-D

This thing is so great!!! I just can't stop making variations in the scene, LOL... Dynamic global illumination and path tracing FTW! I wish I had a better video card though :)



Sunday, February 6, 2011

Update 7: Real-time path traced Cornell Box Pong is finally working!!! Source and Exe available!

Major update!!! Thanks to the awesome help of Kerrash, a coder with OpenGL and CUDA experience, I can finally present a working version of Cornell Box Pong, which has now been renamed to "The once known as Pong" (Tokap for short as a tribute to tokaspt, the fantastic GPU raytracer it's based upon).

All of the changes to the tokaspt source code in Tokap are 100% the work of Kerrash, for which I'm eternally grateful. I just provided him with the scene. The Pong ball now bounces for real, and there is user interaction with both of the paddles, or with just one paddle while the other is controlled by a basic AI routine. The game also features motion blur, which can be disabled in the source code (In the 'tokaspt.cc' file search for a value called 'BLUR_AMOUNT'. This number tells the engine how many frames to wait before completely throwing away the previous pixels. Setting to '0' will cause a refresh for every frame, having no motion blur. Recompile)

VIDEOS:

A video of a WIP version of Tokap (where the ball is following a sine wave path, with and without motion blur), made by Kerrash on a Nvidia GTS 250: http://www.youtube.com/watch?v=pqUdOpJq4l0




A video by Kerrash of Tokap with one AI controlled paddle, running on a Nvidia GTS 250: http://www.youtube.com/watch?v=9svQE79XAPI




Youtube of the latest version running on my 8600M GT (this is the version with extremely slow ball speed, 4 samples per pixel motion blurred at 5 fps)




Youtube of tokap running on a GTX 570 (video by Anonymous from comments). Normal speed, no motion blur, 64 samples per pixel at 10 fps:



Scene interaction, 1 fps at 32 samples per pixel (motion blurred to 160 spp) on 8600M GT:
http://www.youtube.com/embed/gYl-uYtTKSY

Check it out!



Replace the src folder from tokaspt with the new src folder and overwrite all files, then recompile.

You can stilll use the UI of the original tokaspt i.e. change number of samples per pixel, ray depth, size, color and emitter properties of spheres, add spheres...

32-bit Tokap AI version with 4 different ball speeds (normal, slow, very slow and extremely slow ball speed). Download this version if you don't have a very fast CUDA card.

A CUDA enabled GPU is required, Fermi is recommended but even a 8600M GT works ;-) If you have problems with compiling the code, there could be files missing from your CUDA SDK. Download this zip with missing CUDA files. Try compiling with Visual Studio 2008, VS2010 was not tested. Win 64 could give problems as well. All credits for the code modifications to tokaspt go to Kerrash! The gameplay is still work in progress. I will try to integrate Box2D physics in the source code. In the meantime, enjoy!

UPDATE: Anonymous posted the timings for tokap1_2_players on a GTX 580 in the comments:

Default: 60 fps (blurry tail)
8 spp: 60 fps (blurry tail)
12 spp: 44 fps (accumulator tail)
16 spp: 30 fps
20 spp: 28 fps
24 spp: 20 fps
28 spp: 20 fps
32 spp: 17 fps
"At lower spp's it seems like the motion blur is kind of working, but after 12 spp it becomes weird and looks like a poorly sampled accumulator buffer. It's playable, but noisy, at 4 spp. Still noisy at 64 spp (10 fps) but it could be mistaken for film grain (maybe). Although you can then see 5 copies of the ball trailing behind it (motion blur)"
This means that the GTX580 is about 20 times faster than my 8600M GT and that Tokap is playable with high image quality at 10 fps on this card.
Hopefully Nvidia or AMD will make a similar tech demo for their next-generation GPUs.

Thursday, February 3, 2011

Update 6 Cornell Box Pong: first physics test

I've recreated and programmed the scene from Cornell Box Pong in Box2D, an awesome open-source 2D physics engine. I've made a video of the whole process:

youtube Cornell Box Pong physics test (fraps heavily reduces the framerate of the physics simulation)




The size and position of the the 3D spheres in tokaspt's Cornell Box Pong scene are exactly replicated in the Box2D scene. The walls are curved, because they are part of huge intersecting spheres and the lightsource is a huge light emitting sphere which peeks through the sphere representing the ceiling, as shown at the end of the video. The right paddle is currently just bouncing up and down, but it will be controlled later on by some basic AI routine. The left paddle is user controlled with mouse or keys. The Pong ball has mass, friction and restitution characteristics. Unlike the original Pong game, which uses a top down view, Cornell Box Pong uses a side view and the Pong ball in this game is subjected to gravitational forces as it bounces around in the Cornell Box.

The physics engine outputs the continuously changing x and y coordinates of the Pong ball and the paddles which can be fed to the real-time path traced CBP scene running inside tokaspt. It also tells if a collision between the Pong ball and one of the side walls has occurred, which means the game ends and another begins.