|
||||||||||||||||||
Add Forum to Favorites | Send Topic To a Friend | View Forum FAQ | Track this topic |
Last Thread Next Thread ![]() |
| High Dynamic Range Rendering |
|
![]() Kriss Kim Member since: 6/20/2004 From: Korea |
||||
|
|
||||
| hmmm, crush in my computer. not enable to running... |
||||
|
||||
![]() haro Member since: 3/30/2002 |
||||
|
|
||||
| The program also crashed here. Too tired to debug right now. EDIT: As far as the article goes, it was an excellent and straightforward read. [Edited by - haro on June 21, 2004 1:17:21 AM] |
||||
|
||||
![]() fractoid Member since: 2/9/2003 From: Perth, Australia |
||||
|
|
||||
| Simple, clear, easy to understand... makes me want to go and write something with HDR! :) |
||||
|
||||
![]() poly-gone Member since: 8/19/2003 |
||||
|
|
||||
| Thanks guys, I appreciate that. The "crash" occurs probably because the backbuffer isn't 1024x768 in size (when running under windowed mode) whereas the render targets are 1024x768. Resize the initial render target by calling GetClientRect(...) and size the render target accordingly. I'll making the corrections right away and mail it to the GameDev folks. |
||||
|
||||
![]() SnprBoB86 Member since: 5/29/2001 |
||||
|
|
||||
| My engine is currently not anywhere near a state where I can go try this, but I certainly want to! You made it seem so simple and easy. I am surprized that it seems so simple, but somehow after reading that I feel like I shouldn't have been surprized. |
||||
|
||||
![]() s_p_oneil Member since: 11/26/2003 From: Atlanta, GA, United States |
||||
|
|
||||
| I thought this was a good article, so please don't take this the wrong way... (I'm not trying to criticize the article, I'm just trying to point out things that readers may not have been aware of.) The concept of applying an exposure routine to convert a high range of brightness values down to 0-255 is much older than 1998. One of my favorite articles on it was Hugo Elias's at: http://freespace.virgin.net/hugo.elias/graphics/x_posure.htm His demo on real-time clouds, which was written for DOS back when DOS graphics were still king, uses it: http://freespace.virgin.net/hugo.elias/models/m_clouds.htm I believe the exposure algorithm Hugo used is more accurate as well. The blurring of the brighter portions of the image is a simple way to make it look like the light coming from them is being scattered by the air. I would probably attempt to create a scattering routine with volumetric fog/clouds to replace a fixed blur. Still, I really liked the information the article presented on implementing exposure in hardware shaders. I haven't looked into floating point render targets yet. Is it quick to do this for the entire screen, or is it fairly slow? Does anyone know if it's possible to implement this in OpenGL using extensions and/or GLSlang? Thanks, Sean [Edited by - s_p_oneil on June 23, 2004 10:54:47 AM] |
||||
|
||||
![]() CoffeeMug Member since: 3/25/2003 From: New York, NY, United States |
||||
|
|
||||
I think the article could benefit from explaining how to create HDR textures. Also, any scene can benefit from HDR, regardless whether the textures themselves are HDR or not. As a matter of fact, I don't know if HDR textures are very useful, what's important is ability not to clamp the lighting values during calculations. If you'd extrapolate on all that, the article would be perfect ![]() |
||||
|
||||
![]() s_p_oneil Member since: 11/26/2003 From: Atlanta, GA, United States |
||||
|
|
||||
| As long as it's a fully-functional render target, you should be able to render anything you want to it with any lighting scheme you want without the values being clamped. I would imagine that the render target would have to be a texture since the screen can't support more than 8-bits. It should go something like this: 1) Create a floating-point texture render target the size of the screen. 2) Render the entire scene into it, allowing a wide brighness range in the image. 3) Activate the exposure fragment shader. 4) Render the texture as one large quad onto the screen. Someone please correct me if I'm wrong, Sean |
||||
|
||||
![]() FoxHunter2 Member since: 1/7/2001 |
||||
|
|
||||
| Are there any videos out there demonstrating HDR apart from the HalfLife2 bink video? I only own a GF4 Ti4200 and thus can't try out any HDR sample apps. thanks in advance |
||||
|
||||
![]() SnprBoB86 Member since: 5/29/2001 |
||||
|
|
||||
| CoffeeMug has some excellent points. It would probably very difficult for an artist to create a HDR texture. You would need a view of the regular colors, the colors over the normal range represented in some other color, and a composite image rendered with the HDR technique. Even then it would be quite tricky switching back and forth. Now it would make sense to apply an overall brightness modifier to a texture that would allow you to push it into outside the 1.0 range. For example you could mark the skybox, sun, or a other light source's surface with having a very high brightness and then factor that into the final rendered image. |
||||
|
||||
![]() Googol PL3X Suspended Member since: 5/7/2008 From: Whakatane, New Zealand |
||||
|
||||
Not sure if anyone is still interested in this, but if you can't get it to work try replacing ID3DXEffect.Pass() with ID3DXEffect.BeginPass() and just before ID3DXEffect.End(), add the line ID3DXEffect.EndPass(). Also, the for loops can give errors so just at UINT in front of the variable declaration, here's an example of what I mean:g_pBlurX->Begin( &uPasses, 0 ); for( UINT uPass = 0; uPass < uPasses; ++uPass ) { g_pBlurX->BeginPass( uPass ); g_pd3dDevice->SetStreamSource( 0, g_pHalfBuffer, 0, sizeof( ScreenVertex ) ); g_pd3dDevice->SetFVF( D3DFVF_SCREENVERTEX ); g_pd3dDevice->DrawPrimitive( D3DPT_TRIANGLESTRIP, 0, 2 ); } g_pBlurX->EndPass(); g_pBlurX->End(); g_pd3dDevice->EndScene(); |
||||
|
||||
All times are ET (US)![]() |
Last Thread Next Thread ![]() |
|