f3d
f3d copied to clipboard
Non-PBR materials do not support HDRI
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:
- Open the file using
f3d --hdri=/path/to/hdri.hdr example.obj
- Notice reflections are not visible
Expected behavior Reflections should be visible (especially at high specular coefficient)
This one is becoming very very obvious since we have a default HDRI. Do you think it can be adressed ?
It can be addressed of course, but it will take time
Care to develop a bit the issue and possible solution ?
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.
Indeed not trivial.