Filesaver hdr export half float?

Use this forum for general user support and related questions.
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Fox
Posts: 437
Joined: Sat Mar 31, 2018 11:17 am

Filesaver hdr export half float?

Post by Fox »

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 5089 times
Exported Sun on exr
Exported Sun.png
Exported Sun.png (5.95 KiB) Viewed 5089 times
Original vs Exported 2.png
Original vs Exported.png
Fox
Posts: 437
Joined: Sat Mar 31, 2018 11:17 am

Re: Filesaver hdr export half float?

Post by Fox »

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
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Filesaver hdr export half float?

Post by Dade »

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: 437
Joined: Sat Mar 31, 2018 11:17 am

Re: Filesaver hdr export half float?

Post by Fox »

Yes the blender exr export from image editor seems to be also half float even when you select full float.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Filesaver hdr export half float?

Post by Dade »

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: 437
Joined: Sat Mar 31, 2018 11:17 am

Re: Filesaver hdr export half float?

Post by Fox »

From Blender 2.79b in general saving singular 140000 float value turns into 40.469
32bit TiF to EXR.png
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Filesaver hdr export half float?

Post by Dade »

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: 437
Joined: Sat Mar 31, 2018 11:17 am

Re: Filesaver hdr export half float?

Post by Fox »

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: 437
Joined: Sat Mar 31, 2018 11:17 am

Re: Filesaver hdr export half float?

Post by Fox »

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
Developer
Posts: 4146
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Filesaver hdr export half float?

Post by B.Y.O.B. »

If you want no clamping, you can just disable it (or set it to 0 if you do it through the .cfg file).
Post Reply