... | ... | @@ -46,10 +46,18 @@ See [the converter wiki](https://code.ill.fr/instrument-control/protos/nomad-3d/ |
|
|
|
|
|
### Configurations
|
|
|
|
|
|
*TODO : advices about config management : only median/min/max eventually, hide duplicates, etc*
|
|
|
*TODO : advices about config management : only median/min/max eventually, hide duplicates, etc*
|
|
|
|
|
|
## Miscellaneous
|
|
|
## Material
|
|
|
|
|
|
### Material
|
|
|
The visual properties of a Nomad 3D model are stored as [Phong materials](https://en.wikipedia.org/wiki/Phong_shading), one for each component. However the viewer uses [Physically based Rendering (PBR)](https://www.marmoset.co/posts/basic-theory-of-physically-based-rendering/) to get a more realistic result. The conversion between the two illumination models is not usual so a simple and arbitrary conversion is applied :
|
|
|
|
|
|
*TODO : conversion to PBR* |
|
|
```math
|
|
|
pbr.color = phong.diffuse
|
|
|
pbr.metalness = cap(length(phong.specular), 0, 1)
|
|
|
pbr.roughness = 1 - cap(phong.shininess / maxShininess, 0, 1)
|
|
|
```
|
|
|
|
|
|
where `maxShininess = 250`.
|
|
|
|
|
|
The Phong diffuse color defines the base color of the object. The specular color (which is usually a shade of gray) defines the metalness of the object : white for metallic components, black for non-metal ones. The shininess defines the roughness of the object : the more it is shiny the less it is rough (with an arbitrary maximum shininess). |