Home » Community » Forums » » High Dynamic Range Rendering
  Intel sponsors gamedev.net search:   
[Control Panel] [Register] [Bookmarks] [Who's Online] [Active Topics] [Stats] [FAQ] [Search]

Add Forum to Favorites |  Send Topic To a Friend | View Forum FAQ | Track this topic


 Last Thread Next Thread 
 High Dynamic Range Rendering
Post Reply 
hmmm, crush in my computer.

not enable to running...



 User Rating: 1015   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

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]

 User Rating: 1268   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

Simple, clear, easy to understand... makes me want to go and write something with HDR! :)

 User Rating: 1402   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

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.

 User Rating: 1032   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

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.

 User Rating: 1118   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

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]

 User Rating: 1215   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

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

 User Rating: 1498   |  Rate This User  Send Private MessageView ProfileView Journal Report this Post to a Moderator | Link

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


 User Rating: 1215   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

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

 User Rating: 1038   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

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.

 User Rating: 1118   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

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();



 User Rating: 929   |  Rate This User  Send Private MessageView Profile Report this Post to a Moderator | Link

All times are ET (US)

Post Reply
 Last Thread Next Thread 
Forum Rules:
You may not post new threads
You may post replies
You may not edit your posts
You may not use HTML in your posts
Jump To:
Administrative Options: