f3d icon indicating copy to clipboard operation
f3d copied to clipboard

Non-PBR materials do not support HDRI

Open Meakk opened this issue 2 years ago • 5 comments

Describe the bug When using a HDRI file, reflections are not visible on Non-PBR materials (like OBJ and some Assimp formats)

To Reproduce Steps to reproduce the behavior:

  1. Open the file using f3d --hdri=/path/to/hdri.hdr example.obj
  2. Notice reflections are not visible

Expected behavior Reflections should be visible (especially at high specular coefficient)

Meakk avatar Dec 08 '22 13:12 Meakk

This one is becoming very very obvious since we have a default HDRI. Do you think it can be adressed ?

mwestphal avatar Oct 04 '23 06:10 mwestphal

It can be addressed of course, but it will take time

Meakk avatar Oct 04 '23 06:10 Meakk

Care to develop a bit the issue and possible solution ?

mwestphal avatar Jan 23 '24 07:01 mwestphal

It requires a rework of the VTK polydata mapper to sample the HDRI (aka IBL) based on some magic tricks.
With PBR, we use the computed specular term to sample the HDRI at the right roughness level.
Without PBR, the user gives the specular value directly, but there are no roughness parameters, so maybe we can just use a random value.
Alternatively, we could override all non-PBR importers to force PBR and translate the legacy diffuse-specular materials to metallic-roughness, but again there is no magic translation.

Meakk avatar Jan 23 '24 09:01 Meakk

Indeed not trivial.

mwestphal avatar Jan 23 '24 13:01 mwestphal