Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NaN generated on HDR inverses #158

Open
remia opened this issue Oct 28, 2024 · 0 comments
Open

NaN generated on HDR inverses #158

remia opened this issue Oct 28, 2024 · 0 comments

Comments

@remia
Copy link

remia commented Oct 28, 2024

In the image dataset there are a few generated images with NaN, I specifically identified these:

images-v2/cubes/inverse_on_input/cms/pq2000_InvOutput.Academy.P3-D65_2000nit_in_P3-D65_ST2084.exr
images-v2/cubes/inverse_on_input/cms/pq4000_InvOutput.Academy.P3-D65_4000nit_in_P3-D65_ST2084.exr
images-v2/cubes/inverse_on_input/cube_faces/pq1000_InvOutput.Academy.Rec2100-D65_1000nit_in_Rec2100-D65_ST2084.exr
images-v2/cubes/inverse_on_input/cube_faces/pq2000_InvOutput.Academy.P3-D65_2000nit_in_P3-D65_ST2084.exr
images-v2/cubes/inverse_on_input/cube_faces/pq2000_InvOutput.Academy.P3-D65_2000nit_in_Rec2100-D65_ST2084.exr
images-v2/cubes/inverse_on_input/cube_faces/pq2000_InvOutput.Academy.Rec2100-D65_2000nit_in_Rec2100-D65_ST2084.exr
images-v2/cubes/inverse_on_input/cube_faces/pq4000_InvOutput.Academy.P3-D65_4000nit_in_P3-D65_ST2084.exr
images-v2/cubes/inverse_on_input/cube_faces/pq4000_InvOutput.Academy.P3-D65_4000nit_in_Rec2100-D65_ST2084.exr
images-v2/cubes/inverse_on_input/cube_faces/pq4000_InvOutput.Academy.Rec2100-D65_4000nit_in_Rec2100-D65_ST2084.exr
images-v2/cubes/inverse_on_input/cube_faces/pq500_InvOutput.Academy.Rec2100-D65_500nit_in_Rec2100-D65_ST2084.exr

This seem to be due to a division by zero happening in the inverse compression function, the way it's been dealt with in OCIO was to change the lim < 1.0001 to lim <= 1.0001 in both forward and inverse direction.

For debugging purposes, you should be able to trigger the issue using RGB [0.40898755, 0.0, 0.6531319] with InvOutput.Academy.P3-D65_4000nit_in_P3-D65_ST2084.ctl

This change also seem to significantly improve the HDR roundtrip, eg. on this case.

scottdyer added a commit to scottdyer/aces-dev that referenced this issue Nov 14, 2024
…function, improving the roundtrip especially for HDR

fix issue ampas#158
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant