Filesaver hdr export half float?

Use this forum for general user support and related questions.
Fox
Posts: 137
Joined: Sat Mar 31, 2018 11:17 am

Filesaver hdr export half float?

Post by Fox » Tue Dec 25, 2018 5:14 pm

I was getting in a LuxCore a reflection where sun center was black, so like doughnut.
Is the filesaver hdr export half float?
The original floats on hdr between 65536 - 140288 are replaced with 1.00E+010

Original Sun on hdr
Original Sun.png
Original Sun.png (7.85 KiB) Viewed 594 times
Exported Sun on exr
Exported Sun.png
Exported Sun.png (5.95 KiB) Viewed 594 times
Original vs Exported 2.png
Original vs Exported.png

Fox
Posts: 137
Joined: Sat Mar 31, 2018 11:17 am

Re: Filesaver hdr export half float?

Post by Fox » Fri Dec 28, 2018 2:29 pm

I did scale all the float values down on hdr. Highest is now 65000.
Reduced random with BiDirVMcpu start radius 5 times.
Turned on path.clamping.variance.maxvalue = 1599999967232 (just in case when there is some small default value).

Sun spots are still not fully gone. Maybe it's mix material between 2 nk data materials. Like when i mixed null material with glass and got 40 digit energy levels compared to only glass that had 2 digit.
Sun spots.png

User avatar
Dade
Developer
Posts: 2131
Joined: Mon Dec 04, 2017 8:36 pm

Re: Filesaver hdr export half float?

Post by Dade » Fri Dec 28, 2018 3:46 pm

I'm looking at the code and the conversion between float and half is done by OpenImageIO (so this looks more like an OIIO problem than Lux). However you have to consider that any number larger than 65520 can not be written in half float format:
Integers equal to or above 65520 are rounded to "infinity" (if using round-to-even, or equal to or above 65536 if using round-to-zero, or strictly above 65504 if using round-to-infinity).
(from https://en.wikipedia.org/wiki/Half-prec ... int_format)

So all the values larger 65520 should be just clamped as "infinity". You are pretty much working outside a the range of values half format can handle.
Support LuxCoreRender project with salts and bounties

Fox
Posts: 137
Joined: Sat Mar 31, 2018 11:17 am

Re: Filesaver hdr export half float?

Post by Fox » Fri Dec 28, 2018 4:02 pm

Yes the blender exr export from image editor seems to be also half float even when you select full float.

User avatar
Dade
Developer
Posts: 2131
Joined: Mon Dec 04, 2017 8:36 pm

Re: Filesaver hdr export half float?

Post by Dade » Fri Dec 28, 2018 4:18 pm

Fox wrote:
Fri Dec 28, 2018 4:02 pm
Yes the blender exr export from image editor seems to be also half float even when you select full float.
Not sure if it is a BlendLuxCore problem or just a Blender problem in general.
Support LuxCoreRender project with salts and bounties

Fox
Posts: 137
Joined: Sat Mar 31, 2018 11:17 am

Re: Filesaver hdr export half float?

Post by Fox » Fri Dec 28, 2018 4:53 pm

From Blender 2.79b in general saving singular 140000 float value turns into 40.469
32bit TiF to EXR.png

User avatar
Dade
Developer
Posts: 2131
Joined: Mon Dec 04, 2017 8:36 pm

Re: Filesaver hdr export half float?

Post by Dade » Fri Dec 28, 2018 10:59 pm

Fox wrote:
Fri Dec 28, 2018 4:53 pm
From Blender 2.79b in general saving singular 140000 float value turns into 40.469
32bit TiF to EXR.png
Have you tried to export the scene and to render/save with LuxCoreUI ? My first answer was about LuxCore code but I think BlendLuxCore goes trough Blender to save an .exr so trying to use LuxCoreUI may be a workaround.
Support LuxCoreRender project with salts and bounties

Fox
Posts: 137
Joined: Sat Mar 31, 2018 11:17 am

Re: Filesaver hdr export half float?

Post by Fox » Fri Dec 28, 2018 11:48 pm

I only rendered the scene with LuxCore ui, not in Blender.
I'm pretty sure it's only VMC issue, can't see any of that in Classic BiDir.
Or maybe the gap 0.1 mm between 2 volume interfaces.
0.1mm gap.png

Fox
Posts: 137
Joined: Sat Mar 31, 2018 11:17 am

Re: Filesaver hdr export half float?

Post by Fox » Sat Dec 29, 2018 2:23 pm

Removing 0.1 mm gaps didn't fix dark sun center, anyways this is easy fix in image editor.
Sun max brightness 65 000
path.clamping.variance.maxvalue = 159999996723281818181818181818
glass reflectance is set to 0.333
No gap.png

User avatar
B.Y.O.B.
Developer
Posts: 2252
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Filesaver hdr export half float?

Post by B.Y.O.B. » Sat Dec 29, 2018 4:10 pm

If you want no clamping, you can just disable it (or set it to 0 if you do it through the .cfg file).
Support LuxCoreRender project with salts and bounties

Post Reply