bodleian / archiox-mirador-plugin

An experimental plugin to display depth information captured with Lucida or Selene scanners from FactumARTE. However, the plug-in can present any normal map/albedo map combination produced from any technique.
MIT License
1 stars 0 forks source link

Add PBR shader #96

Closed BeebBenjamin closed 4 months ago

BeebBenjamin commented 7 months ago

After discussion with @jcanofuentes we decided it would be best if we make use of PBR (physically based rendering) shaders. We could either use a custom one or Three.js provides one via the MeshStandardMaterial, this will allow us to better emulate multiple materials using only one shader. The main challenge will be how to include the default parameters for each object, via mtl files or via a manifest extension. IIIF3D is currently shying away from specifying materials or textures via the manifest, which is OK if you have a 3D file associated via the manifest, however we generate ours on the fly using Three.js.

BeebBenjamin commented 6 months ago

Add a MeshPhongMaterial material exclusively for specular enhancement mode, use the PBR for visualisation/digital fascimilies.

Store the default startup values for the PBR material in a json companion file or dictionary literal that can be accessed by the Threejs canvas.

Add in a service property at the object level to the IIIF manifest that contains a key value pair called materialType, this will allow us to pass this to the Threejs canvas overlay to tell the PBR shader how to render the object.

BeebBenjamin commented 5 months ago

On QA for testing.