nvpro-samples / vk_gltf_renderer

Rendering glTF scenes with ray tracer and raster (Vulkan)
Apache License 2.0
157 stars 13 forks source link

Strange behavour with scene graph - lights #9

Closed tigrazone closed 3 months ago

tigrazone commented 3 months ago

I dont change anything. Just load scene and switch to scene graph / lights. Color is changed! And numbers of color changed spontaneously - higher and higher Take a look to video https://youtu.be/lZTm--m1-LM

Scene can be loaded from https://drive.google.com/file/d/1THsrGXYF4oSR87YTKZExM8eHbc4VEj-Y/view?usp=sharing

tigrazone commented 3 months ago

One more issue. When I try to off sun/sky for illuminate only by punctual lights I see black scene. With hdri is ok when I off illumination by hdri. Take a look to other video https://youtu.be/ARfVRTs136Q

mklefrancois commented 3 months ago

This is a really strange behavior indeed. Light color is in linear space, so for conveniency, the following functions were used

tigrazone commented 3 months ago
  • Reverting to our implementation is fixing this.

I dont change code. Just build and run

mklefrancois commented 3 months ago

What I mean is that we have functions to convert to and from sRgb space. These work and an update is coming where our functions are used.

For the sun radius == 0.0, a separate fix is on its way.

mklefrancois commented 3 months ago

The sRgb conversion is fixed in c8fa84c

Keeping open until the fix in nvpro_core is uploaded.

mklefrancois commented 3 months ago

Closing the fix in in nvpro_core