NVIDIA / VisRTX

NVIDIA OptiX based implementation of ANARI
Other
239 stars 25 forks source link

Multi-channel colors not displayed correctly #45

Closed UX3D-haertl closed 9 months ago

UX3D-haertl commented 1 year ago

Button corners are always 0. Top corners are 2. Image1D_None_mirrorRepeat_None_None_color Top corners are 1 (inTransform scaled the texture coordinate from 2 to 1). Image1D_None_None_ 0 5, 0, 0, 0 ,  0, 0 5, 0, 0 ,  0, 0, 0 5, 0 ,  0, 0, 0, 1 _None_color Top corners are 2. outTransform extracted only the red channel. Image1D_None_None_None_ 1 0, 0, 0, 0 ,  0, 0, 0, 0 ,  0, 0, 0, 0 ,  0, 0, 0, 1 _color

UX3D-haertl commented 1 year ago

It seems like multi-channel colors are not represented correctly. E.g. (0.5, 0.5, 0.5) or all colors with higher values are displayed as white. Therefore, the Image1D sampler works correctly, but the colors are wrong. I also tested this by setting these values directly in a matte material

jeffamstutz commented 1 year ago

In looking at things closer, this may be that VisRTX was using a non-zero default for ambientRadiance on the renderer. I've changed this now on next_release: could you try again and see if that helps? In local testing, that seems to be the culprit.

UX3D-haertl commented 1 year ago

Yes, since we also still used directional lights, the scene was too bright. I now only use ambientRadiance, but I'm not sure what is the correct value to get the actual input colors. E.g. 1.0 is still too bright while 0.75 is too dim. Is this expected? What is a reasonable value?

Currently, visrtx does not build on Windows since a Windows header file is included which defines OPAQUE (which results in a conflict). I fixed this by undefining it in Material.h