Wednesday, February 29, 2012

Brigade 2 Physics Bricks WIP 2

I've altered some things in  the scene to look more like the original video (http://www.youtube.com/watch?v=bSQoJW9ajmU), such as materials, floor texture, and lighting. The scene is now lit by the sky and by an area light floating above the brick tower. I've also implemented shooting physics for the orange ball, which can be shot from any camera view.

Reference picture (from original scene by Phymec at http://www.youtube.com/watch?v=bSQoJW9ajmU):


Real-time rendered recreation of the scene in Brigade 2:



Real-time rendered video:

http://www.youtube.com/watch?v=y-VkOZXMw8M  (50-60 fps)

The number of dynamic bricks is reduced to maintain a high framerate and because the physics become increasingly twitchy with more moving objects. I'm quite happy with the result so far, as it shows that in simple scenes Brigade 2 can achieve the same photorealistic quality in materials and lighting as an offline unbiased renderer (in this case LuxRender's SmallLuxGPU), but in real-time and with real-time physics and moving objects.

I've also made a fly-through video of Random City, which is another real-time path traced WIP demo that I'm working on:

http://www.youtube.com/watch?v=VUoXmsu-7bg


Monday, February 27, 2012

Brigade 2 physics bricks WIP 1

I'm currently working on a new Brigade powered physics demo which is inspired by http://www.youtube.com/watch?v=bSQoJW9ajmU, an awesome photorealistic physics animation rendered with OpenCL path tracing, which took only 25 seconds per HD frame to render on 2 ATI HD 4890 cards. 

Although 25 seconds/frame is already extremely fast for physically based (unbiased) animation rendering, my goal is to render the same physics animation in real-time with the Brigade 2 path tracer on 2 GTX 580s.

Short WIP videos:

http://www.youtube.com/watch?v=kDXef25LyPo

http://www.youtube.com/watch?v=B-GaDZqnt6I



There's still some things to do: scale and lighting must be adjusted, the floor should have a different texture with a bump map and some specularity and the orange ball must be made into a physical rigid object, hitting the brick wall. I will also try to implement Voronoi fracture.

Friday, February 24, 2012

Crash course, a new Brigade powered game

Roeny (one of Brigades developers) and eikons from IGAD have sent me a link to a funny looking game, which is rendered with real-time path tracing using the Brigade engine. The game was made for the Global Game Jam 2012,  in which small teams of game development students (programmers, artists and level designers) have to come up with an idea and develop a complete game within a strict time budget of 48 hours.




The game is also available for download at  http://globalgamejam.org/2012/crash-course 

To run it, you'll need a pretty powerful machine with SM 2.0 CUDA enabled GPUs (Fermi and up).

Thursday, February 23, 2012

Interior test continued

Playing some more with Brigade 2. I really can't get enough of its awesome and ultrafast photorealistic rendering quality, it's as if you're walking around inside a photograph. Only a headmounted display is missing to make the illusion complete.

I've made yet another short video, this time rendered at 1280x720 (full render resolution), to show that Brigade can really render with superb image quality in just a few milliseconds:


The quality at this resolution is almost perfect: multiple reflections, refractions, glossy and diffuse surfaces, soft shadows, ambient occlusion, depth of field and subtle diffuse interreflection (mostly visible on the character) all render perfectly and combine just as you would expect in the real world. Take for example the reflection of the shadow cast by the glass horse (reflection+refraction+shadow): this effect would be completely undoable in a rasterizer, which struggles already with multiple transparent objects obscuring each other. No current game handles reflections of dynamic objects and characters well (let alone multiple reflections) and the reflected objects don't cast any shadows. Reflections of refracting objects aren't even an option. Luckily though, mirror rooms are not very common in the real world, so this special case can be safely ignored in games (unless you want to make a game in which ballrooms play a prominent role :).    

This is my current wallpaper, 1600x900 render resolution, which rendered in just 4 seconds on 2 GTX 580s (actually it  looked noise-free in under one second):


In future experiments, I will be focussing on achieving the highest possible lighting quality in real-time. For example, I think the amazing photoreal animations in the following videos (rendered with OpenCL GPU path tracing) will be possible in real-time very soon:

http://www.youtube.com/watch?v=wPjsvA5f4pE

http://www.youtube.com/watch?v=bSQoJW9ajmU

UPDATE: an avid reader of my blog advised me to add buttons for Twitter and Facebook, I'm still looking for the most unobtrusive way to add them ;-) Thanks Huub!

Wednesday, February 22, 2012

Brigade 2 interior + character test

Character test with Brigade 2 and depth-of-field

Fang model from Final Fantasy XIII, free to download from http://www.gfx-3d-model.com/




Depth-of-field:
 Blinn shader:


A few days ago, a 3d artist sent me an interior scene he wanted me to test with Brigade 2. The scene has a rather complex lighting setup: a living room which is indirectly lit by a built-in light source directed at the ceiling (with light bouncing off of the ceiling) and by environment light passing through a corridor and 2 layers of glass (clear and milky glass) on one side and light coming through a window semicovered by vertical window blinds on the other side. I love tough challenges, so I tried to tweak the materials and lighting in Brigade as close as possible to the real thing. To my surprise, the scene rendered pretty fast which I hope to show in a video soon. 

Some screens of this interior scene:

Environment light only:

These are some screens from another interior scene (400k triangles) with "easier" lighting. As I'm not an interior architect, the colors are downright horrible right now (most of them are default), but the point is that Brigade can handle complex geometry very well:



And to conclude another WIP shot from "Random City", showing color bleeding from the floor onto the buildings and multiple reflections in the windows:


Videos of these tests will be posted soon, if my upload bandwidth allows it :-)

Monday, February 20, 2012

Real-time photorealistic interior scene at 60 fps

My last youtube video got 9 likes, which is three times the usual number, so I must be doing something right I guess. Some people also asked me to make a video without motion blur (frame averaging), to see how much this would affect the image quality. For your entertainment, I made a lower res video at 60 fps (it actually ran at 70 fps, but the FRAPS video capturing steals some frames and is capped at 60 fps), in which I'm toggling the blur on and off (see the yellow BLUR stat on the left):

Video (480p, 16 spp, 60 fps): http://www.youtube.com/watch?v=udWNc_YeN20

As you can see, noise is more apparent in shadows, glass and glossy surfaces when there is no blurring. 

Real-time image quality at 38-39 frames per second:

Without blur (16 spp):

With blur (16 spp with frame averaging and stationary camera):

Converged (after 2 seconds):


The last version of Brigade 2 that the developers sent me is so fast it's not even funny anymore. Below is a screenshot of a new demo that I'm working on called "Random City" showing Brigade 2 can easily break 60 fps at 16 spp on 2 high end GPUs (221 million random samples per second!). Videos will follow soon after I've added some random stuff like cars and trees.

Random City WIP screenshot (rendered at 16 spp with frame averaging, 64 fps):

Friday, February 17, 2012

Real-time photorealistic interior scene with Brigade 2

Just a simple test to show how well the latest version of Brigade runs on a system with 2 GTX 580s. The scene uses multiple importance sampling and renders extremely fast, regardless of the materials being used (Blinn, diffuse, glass and specular) or the number of reflections. The new engine is truly a joy to play with, I've tested a number of complex 3D models containing over half a million triangles and Brigade doesn't break a sweat. 

The following video was rendered at 640x360 (720p screen resolution) with 16 spp per frame (15-25 fps):




Some 720p screens:

 
Depth of field:

Yep, path tracing has come a long way and it's finally ready for primetime!!  Time for some hardcore testing :-) Stay tuned next week for a real-time path traced fly-through of Random City.

Thursday, February 16, 2012

Bidirectional path tracing in OptiX


While there are a lot of unidirectional GPU path tracers in the wild, bidirectional path tracers running purely on the GPU are still very uncommon. BDPT helps in speeding up convergence in scenes with lots of indirect lighting, such as the alleys in Sponza and interior scenes and also makes caustics appear much faster than unidirectional path tracers. In late 2010, there was a fantastic demo by Dietger van Antwerpen (former Brigade developer) showing Kelemen-style Metropolis light transport on top of a bidirectional GPU path tracer (see http://raytracey.blogspot.com/2010/12/real-time-metropolis-light-transport-on.html) and this guy seems to have found a way to make it work on the GPU with OptiX: 


 Should be interesting to see further results.

Wednesday, February 15, 2012

Real-time path tracing of complex buildings with Brigade 2 on 2 GTX 580s

I finally got a new system specifically built to do some serious real-time path tracing tests. It contains 1 quad core Core-i7 and 2 GTX 580 GPUs and it just rips through the most complex scenes you throw at it. Brigade 2 doesn't use the CPU for rendering, but it is important for dynamic scenes that require multiple BVH updates/rebuilds, which is currently done on the CPU. 

The Brigade 2 path tracer can really show its muscle on such a powerful system and regularly breaks 250 million rays per second as can be seen in the following video of a real-time path traced building containing 430k triangles (640x480 full render resolution, 8 spp per frame, motion blur with frame averaging): 




Color bleeding from the floor on the overhanging structure:
Orange color bleeding on the disk shaped roof:

The building model is free and can be found on http://www.3dmodelfree.com/3dmodel/list475-1.htm (requires 3D Studio Max). The next logical step is to build a street and eventually an entire city, in which you can leisurely cruise around GTA 4 style. It's perfectly doable, I'll post some screens and vids soon. Photorealistic gaming, it's just around the corner :-)

Tuesday, February 7, 2012

Brigade 2: buildings test 1

A new test with Brigade 2 showing highly detailed architecture (220k triangles):

Video: http://www.youtube.com/watch?v=MvBjBANaXvs



The building is a free model from http://www.designshoot.com/large-architectural-building-3d-model-max.html/. It's supposed to look much more realistic with textures, I'm still learning how to properly texture and assign materials. 

Monday, February 6, 2012

Brigade 2: driving test 1

Another simple test with Brigade 2. I've managed to make the camera follow the vehicle while it's driving, which greatly enhances the immersion. I've also added a ramp to the scene:




4 spp with frame averaging, note the diffuse color bleeding from the floor onto the blocks at the left:

In a next test I will add some spiffy looking and highly detailed architecture to the scene (untextured at first). This image shows color bleeding and the use of diffuse, glossy, perfectly specular and refractive materials, all path traced in real-time:

Videos of this scene will be posted tomorrow. 

Friday, February 3, 2012

Trailer of Brigade powered real-time path traced game "It's about time"!

Today, the Brigade developers released an astonishing trailer for "It's about time", a puzzle game set in an Aztec city which is real-time path traced using the Brigade 2 engine.




Download a higher quality video at  http://igad.nhtv.nl/~bikker/files/About.avi

Some of the features that are showcased in the video:

- dynamic day/night cycles: with this technology, high quality precomputed light maps like the ones used in Mirror's Edge (which by far has the best static lighting in a game) are no longer needed. Pixel-perfect soft or hard shadows and indirect lighting are calculated on-the-fly

real-time path traced diffuse color bleeding: no instant radiosity or derivatives are used, which only affect 

real depth-of-field: no z-buffer based post-process hack, but the real thing computed by stochastically jittering the origins of eye rays to simulate a physical lens 

real raytraced ambient occlusion:  no screen space AO using the depth buffer

- dynamic objects receive the exact same direct and indirect lighting as their environment and their material properties can also affect their surroundings 

- an unlimited number of lights can be used

- reflections/refractions/glossy surfaces don't seem to be used in this video but can be handled effortlessly as shown by the Reflect game (reflective spheres, glass tubes)

Dynamic day/night cycle:

Shadow (blocked sunlight) + ambient occlusion (blocked skylight) under the box:

Long stretched shadows are rendered with pixel-perfect accuracy, which is plainly impossible with today's rasterization based shadowing techniques:


Reddish diffuse color bleeding + true raytraced depth of field:

Pillars with very subtle greenish color bleeding from light bounced of of the ground:


An overview of the game world:


It's evident that real-time path tracing is a feasible option for games with many outdoor environments, even today. With some selective filtering of diffuse indirect lighting, even indoors shouldn't be too problematic when avoiding pathological cases such as a room that is only lit by light coming through a narrow opening. 

The ease of creating a game with this tech is unrivaled: artists don't have to worry about wrong looking or badly aliased shadows, reflections, transparency or any combinations of those. It will look just as expected right out of the box. There would also be no waiting time (for baked lighting) between iterations any longer.

To end this post with a cheesy conclusion: Yes, we are witnessing the future of real-time game graphics today! It's about time really.

I really can't wait to play this game (and mod the hell out of it).

Thursday, February 2, 2012

Separable subsurface scattering

This has nothing to do with ray tracing, but this is a truly amazing video demonstrating a new technique to realistically render human skin:

Vimeo vid: http://vimeo.com/36048029

Original blogpost, including executable demo + source code: http://www.iryoku.com/separable-sss-released