Best approach to rendering an environment map

Started by
3 comments, last by riuthamus 11 years, 2 months ago

So I'm currently implementing a full daytime change in my scene and I'm now wondering how to approach this problem.

Before what I had was my static scene with a skybox where I could use this skybox (or better use an env probe) to create prefiltered environment maps and irradiance maps for diffuse ambient and ambient specular lighting respectively. But now as the scene and the environment becomes dynamic I stand before the problem of not being able to use the old static approach to this. My current idea is to make 3 environment maps for 3 "special" daytimes like night, sunrise/sundown and daytime and interpolate between those. Is this a viable idea, or do I have to do it differently ?

My second question would be if there is a better way to render the environment from the probe itself then to rotate the camera and render 6 times the scene for each face ? As I understand I have to do this without any post-processing enabled ? What about tonemapping ?

Advertisement

Hm... basically you need just 2 renders of environment, not 6 ... if you use Dual Paraboloid mapping - see http://graphicsrunner.blogspot.cz/2008/07/dual-paraboloid-reflections.html

Tone mapping is a problem here, basically you want your environment map also in HDR (e.g. render to high precision format and don't apply tone mapping). Tone mapping is then applied when you render "final scene" from your camera on whole result (e.g. also reflections). The problem is, that you actually need some RGBA16F or RGBA32F format to store environmept nap ... maybe you could try using RGBE8 (Red-Green-Blue-Exposure) or such format, if you're memory limited.

My current blog on programming, linux and stuff - http://gameprogrammerdiary.blogspot.com

We had some of these issues and moved to SRGB, the tone map + HDR + exposure mapping made some serious headaches for the texturing of things but once you get a decent setup you like ( we created a tool to modify each of the values for all of these in game ) the textures will look like they should. I have an entire thread about it on this forum... let me look it up and link you so you can do some reading. Would help to know what language you are coding in and openGL or DX11/DX10?

EDIT: Here is the links:

http://www.gamedev.net/topic/632844-tonemapping-formula-help-math-help/

http://www.gamedev.net/topic/630256-hdr-tonemapping-skylight-fail/

Hmm well I guess I could render them to a 64bit texture...

@riuthamus I'm using DirectX11. Thanks for the links but they're about tonemapping itself. My problem is more on how to handle this for environment probes.

edit: I found some answers on sebastienlagarde's blog about this.
I'd still like to have feedback on my idea that I wrote above of making an environment for 3 different times of day. Or is there a better way ?
If I were to use a dynamic probe, how would I be able to blur them for each miplevel, like I do with the AMD cubemap gen offline ?

Ah sorry, i misunderstood what you were going for.

This topic is closed to new replies.

Advertisement