vilem_otte at March 3rd, 2010 10:00 — #1
as most of you probably noticed by now, I'm still not dead (and/or married) and continuing in my passion - and thats programming, especially graphics demos and game development.
So what am I having to show - this image is showing (as you might noticed) Porsche Cayenne model rendered on my own technology, along with Havok physics (but well it can't be seen until it is not moving).
So to the technical details - the graphics engine is made from hybrid renderer - it is based on 2 renderer kinds, the deferred renderer along with real time ray tracer.
I finally achieved shadows I was trying to achieve for very long time (improving the algorithm for almost 2 years or so), and this still isn't the end (it will never be). Although it approached quality, where it is general, fully scalable and fast solution ... to achieve physically plausible soft shadows, either high frequency or low frequency.
Whole solution is based upon lots of math, and sampling (who would expect that) ... the algorithm is basically same as when you're computing ray traced area shadows ... but heavily optimized to achieve everything in real time on mainstream hardware.
Another thing in this demo is (probably not seen until I post wire image) progressive tessellation, it is pretty much useless for this one (except for getting "meshsmooth" like effect) - because there isn't any displacement mapping present ... but I would definitely count it as good effect.
And I shall continue ... another one is real time dynamic reflections inside deferred renderer (it was heavy magic to achieve this one), eh... to achieve this one to move in real time. And I'm happy for that.
There is also cool ambient occlusion present. The last new technical thing is multisampling inside MRT, that is also supported on current version.
Okay, some more images of this cool car are here:
And I have also video updated on youtube - Here Or you can visit my blog, where you can view the progress of development on demo - Here
I would like to hear any comments and I can try to answer any question from you.
jarkkol at March 3rd, 2010 10:12 — #2
Very nice, good job! I like car physics in the video too (: Can you tell more details how you combine raytracing with traditional rasterized GPU rendering?
vrnunes at March 3rd, 2010 10:17 — #3
legloups at March 3rd, 2010 14:55 — #4
Good job, the render is beautiful and the physics too
sebh at March 4th, 2010 05:21 — #5
Can you give some details about your shadowing algorithm? What sort of light is used here? Area or the sky? Something interesting may also be done for shadow coming from the sky with importance sampling. (I have seen some paper on this)
If I understand, your shadows are ray traced? What kind of data structure do you use?
Everything else is rendered using the deferred renderer?
vilem_otte at March 4th, 2010 16:06 — #6
Thanks for the comments, I finally got to answer here ... so let's start...
#JarkkoL - I'll post here few images, that will get you the basic idea how to combine rasterized (deferred) and ray traced buffers together (they're combined inside a pixel/fragment shader):
Ray traced buffer contains AO and shadows ](http://2.bp.blogspot.com/_PHCyn95roV0/S4_GOiYeLOI/AAAAAAAAAGI/ERgB1jwZq0g/s1600-h/RTBufferOUT.PNG[/img]) is combined with deferred buffers - reflections deferred buffer ](http://1.bp.blogspot.com/_PHCyn95roV0/S4_GNho1hOI/AAAAAAAAAFw/fmq_e2RCdAI/s200/DSreflOUT.PNG[/img]) and lit deferred buffer ](http://2.bp.blogspot.com/_PHCyn95roV0/S4_GNcL_wuI/AAAAAAAAAFo/3zl8WgBqoPc/s200/DSOUT.PNG[/img])
Hope that you get the basic idea -> e.g. computing deferred buffer(s) and ray traced buffers and after everything combine them together to get final results.
#sebh - There is area light in the scene, I also developed very nice GI algorithms for inside/outside use ... but it still needs a lot of fine tuning, so it is not used here.
Here are just shadows separated and maxed out:
For ray tracing most suitable structures are KD trees (mostly for static scenes) and bounding volume (interval) hierarchies (for dynamic scenes) ... and this scene is dynamic -> so BVHs/BIHs are better for this purpose ... and thus I'm using them (BIHs to be exact).
As written a bit up - ambient occlusion and shadows are generated inside ray traced buffer and reflections and lit scene is generated inside deferred buffers. All is combined then to get high quality image result.
I've post few images on my blog where shadows/AO (separated and combined) were maxed out ... so you can just look there and see how it looks when they are at maximum quality.
jarkkol at March 4th, 2010 17:00 — #7
Ok, so I take that you compute raytracing on CPU and pass full frames of the raytraced buffer to GPU each frame for composition?
vilem_otte at March 8th, 2010 06:22 — #8
Basically yes, althought would also be possible to compute them using CUDA/OpenCL (holding them on GPU all the time might also give better results than transferring from memory to GPU).
Anyway I don't know about speed boost if I would swap to GPU raytracing, because GPU is pretty much used at full scale while performing multisampled deferred rendering.
elfrank at June 28th, 2010 16:48 — #9
how do you compute the secondary rays?