Planetside Software Forums

General => Terragen Discussion => Topic started by: paq on May 12, 2013, 01:14:15 PM

Title: Black sun disk when converting .exr into .hdr ?
Post by: paq on May 12, 2013, 01:14:15 PM
Hello,

Goal : Create a spherical and stereographic HDR sky using terragen .exr output.

I'm just trying to figure out what's the problem with terragen sun disk.

As soon as you try to convert .exr terragen files into either an .hdr format, or a low dynamic range format, the sun disk turn to black, or pink, or any other crazy colors.

Ptgui also give crazy result when trying to tone map .exr terragen skies, not a big deal as I only want .hdr (so no tone mapping), but PTGUI just failed to export an .exr stichting result (I have to bug report this, but I'm not sure where to start).

I'm not really sure what's the side effect of disabling the sun disk visibility into terragen. I was hoping to find a solution to keep it on in my hdr sky, because with some render engine (modo, maxwell), this disk could help to create sharp shadows using hdr lighting only ... well in theory because so far I wasnt able to test it  :'(

And if it's not a Terragen mistake, which panorama stiching software can I use to build spherical and stereographic .exr skies ?

- Ptgui failed with my files (I have big black square in the sun area)
- Hugin do not open .exr  ... and converting .exr into .hdr = black sun
- Autodesk stiching software seems to handle the .exr pretty well, but there is no stereographic output, and no way to position the 5 terragen images in an numerical way.

Title: Re: Black sun disk when converting .exr into .hdr ?
Post by: Matt on May 12, 2013, 05:19:30 PM
This happens because Terragen's sun is too bright for some image formats (or conversion methods) to handle. You can decrease the brightness of the sun pixels by increasing the sun's visible disc diameter. Each pixel brightness is then reduced to compensate for the increased surface area, so the total output of the sun is the same.

The default diameter is 0.5 degrees, which is very close to how the Sun appears from Earth. First, try with a much larger diameter (e.g. 5) to see if it solves the problem. If it does, try smaller values to find what you can get away with, because 5 would produce very soft shadows.

Matt
Title: Re: Black sun disk when converting .exr into .hdr ?
Post by: paq on May 12, 2013, 09:03:05 PM
Hi Matt,

Thank you so much !!!

The result is very nice with a sun degree at 1. I'll try to reduce it a little bit more to see where is the limit.
So here's a little render test, using modo environment importance sampling, and off course no light.

Terragen dynamic range is huge !
Title: Re: Black sun disk when converting .exr into .hdr ?
Post by: Dune on May 13, 2013, 03:01:06 AM
Quotebecause 5 would produce very soft shadows
Does it indeed? I have to try that.
Title: Re: Black sun disk when converting .exr into .hdr ?
Post by: Matt on May 13, 2013, 01:47:26 PM
Quote from: Dune on May 13, 2013, 03:01:06 AM
Quotebecause 5 would produce very soft shadows
Does it indeed? I have to try that.

If you use the render as an environment to light the scene in another renderer, e.g. Modo, Maxwell, VRay, then yes, the size of the sun will affect the softness of the shadows because the visible sun is now creating the lighting. In Terragen, the visible disc is independent of the soft shadows, but of course you can set the soft shadow diameter to 5 to get soft shadows if you like.

Matt
Title: Re: Black sun disk when converting .exr into .hdr ?
Post by: Matt on May 13, 2013, 01:49:24 PM
Quote from: paq on May 12, 2013, 09:03:05 PM
Hi Matt,

Thank you so much !!!

The result is very nice with a sun degree at 1. I'll try to reduce it a little bit more to see where is the limit.
So here's a little render test, using modo environment importance sampling, and off course no light.

Terragen dynamic range is huge !

Yep, better than an HDR photograph :)

Matt
Title: Re: Black sun disk when converting .exr into .hdr ?
Post by: midnight_stories on October 27, 2015, 10:46:19 AM
This info is worth its weight in gold, been scratching my head for the last 3 days.
and just increasing the Deg worked straight away plus now I can do soft shadows if I want.
It works perfect !
Title: Re: Black sun disk when converting .exr into .hdr ?
Post by: TheBadger on October 27, 2015, 04:49:04 PM
QuoteYep, better than an HDR photograph :)

Matt

That in its self is pretty remarkable, really.