• entries
    422
  • comments
    1540
  • views
    488871

My latest pet-project...

Sign in to follow this  

127 views

For my last journal post before I go on holiday (No more me till at least 5th September!). I'll leave you all with a slightly longer rambling as a "taster" of what I hope to do in September [grin]

I said in my last journal post that I was going to resurrect one of my old platform games. Had a look into that but, to be brutally honest, couldn't be bothered [lol]. Instead I decided to work on my "HDR Demo" code instead.

I've not had so much fun coding in a LONG time (refactoring F1CM to unicode doesn't even come close). You know that feeling when it "just works"? I had to tear myself away from the PC at around 2am.

A bit of background
I've probably written about it before in this journal, but ever since I set my eyes on the rthdribl demo (Check it out if you haven't already) I knew I had to get me some of that High Dynamic Range Imagery (HDRI) coolness. I'm also hoping to do my final year dissertation into using realtime HDR for scientific/visualization technology.

My "HDR Demo" codebase is something I've been working on for a while - basically bits and pieces inspired and "borrowed" from other samples. Last night I ripped a lot of it out, upgraded it to the August SDK framework and got it working a lot better than I had before.

Where is this going..
The theory behind an HDRI pipeline is pretty damn simple as far as advanced graphics go - whilst there are lots of things that need doing each individual step is relatively straight forward and simple to understand.

However the bit that took me the longest to figure out was how to actually implement all of the various steps. Every example I've read through has been a bit of a mess of functions, render target swapping and effect-file shading. My "HDR Demo" might not be quite as impressive, but the idea is to cut down on the fluff.

It was originally my own pet-project to help myself learn HDRI, but I'm starting to think it might well be of use to others.

Current progress...
I haven't got any code for you guys to try yet, but I've got a few images. Images are required for good journals [smile]


This is the display as it currently stands. Not too impressive I know...

I opted for creating an HDR image using the simplest possible means - that is the classic 3D spining cube. Except in this case, the vertex diffuse component is a packed HDR colour (later unpacked inside the shader), so the HDR render target does have some > 1.0f values in it.

This part is likely to change as I'm not too convinced that the conversion to HDR is working as I intended. I'm having to use some awkward tricks to get around (what appears to be) clamping and resolution limits for either my hardware or the API. Seems that the standard COLOR0 semantic is either clamping or very low resolution (lots of horrific mach bands). For the time being it's using a somewhat obscure packing into TEXCOORD0 and TEXCOORD1 - which don't have the resolution/clamping issue.

Note that in my image above, it's showing (bottom right) the 6 luminance maps that are generated for each frame. This is a crucial part - I want my demo to show each and every step in the rendering pipeline. It's the key to exposing the theory and implementation.


The above image is a simple template that I'm going to implement as a background to the rendered display. The path around the top-right is each successive iteration of the luminance calculations, finally feeding into the finally rendered image. Later on I'll add an additional path showing each step in creating a bloom filter.


This final image is a manual composite of the previous two, and what I'm hoping the final display will look a bit like. Each texture is specifically drawn over a part of the underlying diagram, and due to it all being real-time you can manipulate the main image and see how each corresponding step changes accordingly.

Next time on the path with a ramblin' man...
If this works out how I'm hoping then I'll release the full (highly commented) source code and demo sometime in mid september. Probably make it a post in the DirectX forums like I did with the F1 Car - see if Coder will make it a sticky [smile]

Leave me a comment for when I get back - not had many comments left lately ([headshake]), would be useful to know if people will find this useful or not!! [smile]

That's all for now, I'm gonna go pack up my bag and go to Spain [grin]
If I don't return, the locals beat me up because I can't speak spanish and they can't talk binary.
Sign in to follow this  


5 Comments


Recommended Comments

Have fun in Spain. Whereabouts are you going? My grandparents live out on the east coast in Javea, so I know the area eastwards of Alicante/Valencia relatively well.

Share this comment


Link to comment
Quote:
Whereabouts are you going?

North coast of spain, place called "Noja" (not sure about the spelling). Flying into Bilbao airport - got to be at Stanstead at 0500GMT (it's 2231GMT now).

Quote:
I can't wait to see more of this. (but I guess I have too. :))

You will indeed have to wait. Hopefully it'll be worth waiting for!

As much as I love my programming/etc.. I have every intention of ignoring it totally for the next 14 days [wink]

Cheers,
Jack

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now