Jump to content


Car demo - deferred rendering


8 replies to this topic

#1 Vilem Otte

    Valued Member

  • Members
  • PipPipPipPip
  • 362 posts

Posted 03 March 2010 - 03:00 PM

Posted Image


Description
Hello,

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:
Posted Image Posted Image
Posted Image Posted Image

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.

#2 JarkkoL

    Senior Member

  • Members
  • PipPipPipPip
  • 477 posts

Posted 03 March 2010 - 03:12 PM

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?

#3 imerso

    Senior Member

  • Members
  • PipPipPipPip
  • 433 posts
  • LocationBrasil

Posted 03 March 2010 - 03:17 PM

definitely looks good!

#4 legloups

    New Member

  • Members
  • PipPip
  • 21 posts

Posted 03 March 2010 - 07:55 PM

Good job, the render is beautiful and the physics too :)

#5 sebh

    New Member

  • Members
  • PipPip
  • 17 posts

Posted 04 March 2010 - 10:21 AM

Good work!

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?

#6 Vilem Otte

    Valued Member

  • Members
  • PipPipPipPip
  • 362 posts

Posted 04 March 2010 - 09:06 PM

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 Posted Image is combined with deferred buffers - reflections deferred buffer Posted Image and lit deferred buffer Posted Image

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:
Posted Image
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.
My blog about game development (and not just game development) - http://gameprogramme...y.blogspot.com/

If you don't know how to speed up application, go "roarrrrrr!", hit the compiler with the club and use -O3 :D

#7 JarkkoL

    Senior Member

  • Members
  • PipPipPipPip
  • 477 posts

Posted 04 March 2010 - 10:00 PM

Ok, so I take that you compute raytracing on CPU and pass full frames of the raytraced buffer to GPU each frame for composition?

#8 Vilem Otte

    Valued Member

  • Members
  • PipPipPipPip
  • 362 posts

Posted 08 March 2010 - 11:22 AM

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.
My blog about game development (and not just game development) - http://gameprogramme...y.blogspot.com/

If you don't know how to speed up application, go "roarrrrrr!", hit the compiler with the club and use -O3 :D

#9 elfrank

    New Member

  • Members
  • Pip
  • 1 posts

Posted 28 June 2010 - 08:48 PM

how do you compute the secondary rays?





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users