Not logged in, Join Here! or Log In Below:  
News Articles Search    

Submitted by Bojan Sernek, posted on January 28, 2005

Image Description, by Bojan Sernek

This screenshot represents a technique I came up with to perform high dynamic range rendering and spherical harmonics lighting on pixel shader 1.3 hardware. The high dynamic range rendering effect was done with help from P. Debevec's paper on HDRTMs and the spherical harmonics lighting with help from R. Green's paper. Since both effects operate on a light probe, we've decided to combine them, and the results look promising.

The spherical harmonics lighting has been done per-vertex with 2 radiosity iterations and is PCA compressed.

The HDR rendering is done by transforming the 16-bit per component light probe into two 8-bit cube maps (retaining full precision). The geometry is rendered with both cubemaps (just vertex transform and cubemap sample) and the resulting render targets are then added together with the result from the SH lighting, and the high 8-bit render target is bloomed (horizontally and vertically). We intend to add support for a user defined rotated grid for blooming.

The whole combination can be done on any PS 1.3 compatible hardware (we've done it on a GeForce4 4200). More interesting screenshots:
  • This and more will be part of my first commercial 3d/game engine. There's also more demos there (visit and see for yourself). Of course the real engine is not done on the directx framework, like most of the samples found on the site ;)

    Thanks, Bojan Sernek.

    Image of the Day Gallery


    Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
    Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
    Brandon Bloom

    January 28, 2005, 11:37 AM

    Very interesting, and that model is freakin sweet...


    January 28, 2005, 02:03 PM

    That's freaking awesome. Can the code be optimized to run faster on PS2.0 hardware? If so, that would make one hell of a game engine.


    January 28, 2005, 06:54 PM

    what I'd like to know is if it can be done so the material doesn't look like polished metal? ie not so shiny yet still using HDR and SHL? - imo that would look really, really good.

    Well done.

    Riku Rakkola

    January 29, 2005, 03:13 AM

    That looks like basic spheremapping and fake hdri.

    Volker Schoenefeld

    January 29, 2005, 03:22 AM

    He just applied a environmental map to increase the HDR effect. You can use any material with SH, with precomputed global illumination. But the drawback is that your BRDF is very limited. Especially since it is per vertex (imagine per vertex specular lighting, it looks... well you need a very high tesselated scene :), and I have also yet to see a per pixel bumpmapping combined with SHL. Another drawback is that there will not be any animations on the model as far as I know, because SH Lighting is at the moment limited to static models only. And the precomputation time is quite intensive. Oh and the light is always on a imaginary infite sphere around the model, so you can't have local lighting. In reply to ReaperUnreal, this implies very limited usage for game engine. Yet its very nice for dynamically lit static models, as long as the light stays out of the bounding sphere of the model.

    Don't get me wrong, I love this technique (using it in my demo as well) but there are many drawbacks that should not be left unmentioned.

    Are you using Direct3D built-in PRT? If not, why not?
    And how fine is your mesh tesselated?
    I'm using RGBE format for the older hardware, do you know which is faster on your hardware in direct competition to your technique? I didn't implement HILO yet, because RGBE gives me sufficient results.

    Volker Schoenefeld

    January 29, 2005, 03:26 AM

    Riku Rakkola wrote: That looks like basic spheremapping and fake hdri.

    It is basic spheremapping (But only one part I guess, I assume he is using the lightprobe for the SH function as well. But since he way overblended the environmental map, the lighting is well hidden.)
    What do you understand by "fake hdri"? because the 16-bit hilo is a fully functional hdr technique (as is rgbe, but here the precision is less, yet very good) and i do not see any reason for calling it fake (enlighten me ;).


    January 29, 2005, 08:30 AM

    I mean it looks just as a Bloom post-process filter. As you would get when blending a quad with additive blending, textured with the luminance map of the rendered scene and blurring it a couple of times. You know as in Prince of Persia... only more subbtle.

    This is what I mean by fake hdri.

    Volker Schoenefeld

    January 29, 2005, 09:49 AM

    Are you the same person as Riku? :)
    Well you are right, it doesn't look different from simple bloom filtering. It's always hard (impossible?) to tell from an screenshot if its HDR or not. It's obvious, since the images are tonemapped, at least until we have HDR screenshots and displays ;)

    But he said its a HDR pipeline, and so i believe him (no reason not to). Its more like this screenshot could easily be done with simple spheremapping, no HDRi, no SH (using ambient occlusion for instance).

    The tricky thing about HDR is, that even in a demo its not very visible, until you really show the differences directly (by comparing hdr/nonhdr or doing some quick dark/light transitions with an auto exposure adjustment using reduce buffers). If created a demo to demonstrate exactly these points, I don't know when I will release it, but I might post some screens here in a few days.


    January 29, 2005, 06:06 PM

    I like it how the doom3-avi on their site mentions that their engine runs at "30 fps, which is faster than Doom3 on a similar configuration. However, it must be noted that our engine was developed in a matter of weeks".

    It must also be noted that Doom3 does things like, y'know, gameplay, AI, shadows, sound, that sort of thing.

    Volker Schoenefeld

    January 29, 2005, 06:37 PM

    It appears to me that the Lights in the videos do not cast any form of shadows (except the diffuse and specular term of course). Is this right (which would implicitly move the doom 3 engine comparsion in a ridiculous light), or am I just missing something?


    January 30, 2005, 04:53 AM

    Idd as Volker states there seems to be no realtime shadows whatsoever in the doom 3 video, which is one of the more stressful operations the doom3 engine performs (correct?).
    Although ofcourse we do not know if the tests were performed with shadows turned off in the doom3 engine, just to compare those certain points in the renderers.

    Anyway, very interesting stuff, both this IOTD and the rest of your project.
    Keep it up


    January 30, 2005, 06:01 AM

    I don't mean to bash your project but your way of doing things has an awful smell of origi3d :). From unproven claims down to the wanabee video presentations/marketing.

    To be more on topic, I'll just say that I really doubt the HDRI to be physically correct (as claimed on the website), the specular to be 'in-house improved' (it looks rather buggy ie: very static) or the engine shown on the video to be able to compete with even a stripped down version of the Doom 3 renderer in term of features (not to mention physics, collisions, visibility and the whole bunch of stuff that makes an engine).

    All in all, it's far from being jaw dropping stuff so you should keep the kick-ass video/marketing for later revisions ;).

    This thread contains 12 messages.
    Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.