How do you create physically accurate hdri skies in Terragen 4?

Started by eapilot, May 29, 2017, 06:31:33 PM

Previous topic - Next topic

D.A. Bentley (SuddenPlanet)

#15
Quote from: eapilot on May 29, 2017, 06:31:33 PMI am researching a good way to create physically accurate hdri panoramas for Realtime rendering game engines.  From looking at Terragen 4, it can render very dynamic hdris with a sun intensity that rendered unclamped and spans the whole range of a 32 bit float texture.  This is better than most commercially available panoramic hdris because of the the technical limitations of phyiscal cameras (except if you use multiple ND filters). However, Terragen's rendering camera doesn't have a physical camera.  Can you import a physical camera that measures shutter speed, aperture, and exposure?  How can you render a cg sky in Terragen and mimic desired real-world measurements like lux values and sun to shadow ratios? At least to gauge the accuracy of the the cg sky. 

I saw that these skies are for sale.  It claims that it has a dynamic range of 25-30 stops.  I don't really know how this can be measured accurately, without real world values.

Ultimately, I would like to find

link below
http://www.sastudios.tv/cghdri/cg-hdri-v2


Hi EA Pilot,

I recently went through the same trial of figuring out how to correctly render CG Skies in Terragen to match the results you would typically get from Photography methods using HDR Merging and Stitching software.
One thing to mention is when you see Photo based HDRI's for sale listing the number of EV's or Stops, they are usually referring to the number of EV's captured through bracketing.  I could explain this further, but I'm guessing your knowledge of Photography is pretty extensive.  For CGI generated HDR Skyboxes, or HDRI's as some call them, the Dynamic Range measurement method was also something that was baffling me for awhile.  I need to analyze what Matt and Oshyan said above in further detail, but here is what I came up with to determine Dynamic Range of any given CG rendered HDR/EXR image.

First I picked up the software Photomatix Pro 6 here:  https://www.hdrsoft.com/

Second, I opened a bunch of HDRI's created by HDRiHaven:  https://hdrihaven.com/hdris/ in Photomatix Pro and recorded the Contrast Ratio value from the Histogram.
I created a spreadsheet (Google Sheets) recording my data of over 100 photography based HDRI's.

Third, I determined the equation for converting Contrast Ratio to Exposure Value (EV/Stops) which is basically just a LOG2 calculation:  https://www.rapidtables.com/calc/math/Log_Calculator.html

After figuring out the relationship between Contrast Ratio and EV I was able to go back and validate the stated EV's from the HDRIHaven's photo based HDR Panoramas and discovered that the stated EV's weren't always reflecting how much Dynamic Range was in an image.  This is because dynamic range captured is affected by the available dynamic range, or contrast in the scene (you can "over capture" scenes with too many brackets).  The scenes with the most dynamic range will most often be scenes with dark shadows and a bright sun in the scene, or night-time scenes with bright artificial light.

So in the end I discovered that on average there are no "photo based" HDR Equirectangular Panoramas that exceed 30EV's which is a contrast ratio of 1,073,741,824:1

Hopefully this can be used as some sort of reference, for comparing Terragen rendered outputs.

You probably already figured out your own methods, but I thought I'd post this for others ending up here with the same questions as us.

-Derek