RenderKit / ospray

An Open, Scalable, Portable, Ray Tracing Based Rendering Engine for High-Fidelity Visualization
http://ospray.org
Apache License 2.0
982 stars 178 forks source link

pathtracer: colors look faded (desaturated) #492

Closed baloe closed 2 years ago

baloe commented 2 years ago

With the OSPRay pathtracer (in Paraview 5.9.1) I am observing that surfaces are generally less saturated than the actual color they are painted with.

I am providing a demo over at https://discourse.paraview.org/t/7951

@demarle had a closer look at it and wrote:

I thought at first that this was due to secondary lighting effects. That is ParaView’s default background and lights are set up nicely for primary illumination but result in too much energy overall when the secondary rays are added in. I.e. the default lights and colors are too white for the path tracers.

However I wasn’t able to compensate for that by doing things like making the environmental color black and replacing the lightkit with a single white headlight light. Also, the OSPRay ray caster and OptiX path tracers both make better, more saturated colors than OSPRay path tracer does.

So I think this is an aspect of OSPRay’s OBJ material implementation. [...]

Note to self, simply bypassing the normalization here doesn’t help.

johguenther commented 2 years ago

Could be a gamma / sRGB conversion issue. Let me check with @demarle.

baloe commented 2 years ago

this is possibly the same issue here: https://discourse.paraview.org/t/7282

johguenther commented 2 years ago

Dave and I suspect it may be the missing linearization (from sRGB) for the transfer function, we continue to look into it to verify.

demarle commented 2 years ago

I now suspect that this is an ospray 1-2 difference that can and should be addressed in VTK. See: https://gitlab.kitware.com/vtk/vtk/-/merge_requests/8577