[x3d-public] Physically Based Materials (PBR) in X3D

Michalis Kamburelis michalis.kambi at gmail.com
Fri Mar 16 09:37:37 PDT 2018


  2018-03-16 17:01 GMT+01:00 Michalis Kamburelis <michalis.kambi at gmail.com>:
> 2018-03-16 14:05 GMT+01:00 Don Brutzman <brutzman at nps.edu>:
>> Regarding backwards compatibility.  It would be interesting to consider
>> whether, instead of adding new nodes, we might go ahead and completely
>> extend existing Material node and other lighting-related capabilities.  This
>> has potential benefit of keeping the X3D v4 scene graph more closely
>> consistent for X3D v3 and VRML97 content, allowing superior rendering of all
>> content as the default rendering mode in X3D v4.  A backwards-compatibility
>> rendering mode also might be possible for when authors explicitly want it...
>
> To my knowledge, such upgrade path (to just take old X3D 3 content and
> render it with PBR) is not possible, in the general case. Not without
> significantly changing the look of X3D 3 content, in a way that is not
> necessarily better (when the conversion from "Phong parameters->PBR
> parameters" was done automatically).
>
> The parameters for PBR (albedo, roughness) are really different than
> non-PBR Phong (diffuse, specular). The material specification is
> different, and the light specification is also different (lights in
> PBR need an "environment map", like ImageCubeMapTexture, to make these
> cool reflections you see on the screenshots from PBR renderers).
>
> IOW, the materials require different preparations by the graphic
> artist / content creator. The PBR workflow for graphic artists (and
> how it differs from the workflow for Phong lighting model) is nicely
> described on https://www.marmoset.co/posts/physically-based-rendering-and-you-can-too/
> . You cannot just toggle a boolean flag in the renderer to say "render
> this with PBR".
>
> Unity3d had the same choice, and they decided to *not* upgrade
> materials in existing projects. They keep a large set of shaders doing
> Phong lighting, and the existing materials use these Phong shaders.
> The Phong shaders can be even still used in new projects. If someone
> wants to convert his/her project to PBR, then (s)he must walk through
> all the materials and lights, and upgrade them, setting suitable
> parameter values, and creating new textures as necessary. The
> resulting look with be unavoidably different anyway.
>
> That's because, as far as the math is concerned, the PBR equations are
> not a "more general form" of non-PBR equations. PBR equations impose
> some limits that the non-PBR equations did not.
>

Addendum to the above:

There are actually two ways to express PBR parameters, the

1. metallic-roughness
2. specular-glossiness

The 2nd version (specular-glossiness) has parameters that resemble the
Phong model a bit more, and *may* be easier to automatically upgrade
(so Phong lighting model -> PBR with specular-glossiness parameters).
But it seems that it  only means "easier to upgrade for a graphic
artist", and not "so easy to upgrade that it can be done
automatically".

See e.g.

- https://jmonkeyengine.github.io/wiki/jme3/advanced/pbr_part1.html
about the pros/cons of each model.
- https://instantuv.org/wp-content/uploads/2017/03/pbr2016.pdf
mentions both these approaches.
- https://docs.unity3d.com/Manual/StandardShaderMaterialCharts.html
shows both workflows in Unity PBR (standard) material.

However, it seems to me that X3D should adopt the "metallic-roughness"
model of PBR. Reasons:

- This is what glTF did. That's the most important reason. glTF only
uses the metallic-roughness version. So if we want easy and perfect
interoperability with glTF 2.0 (and I think we should), then we need
to also adopt the metallic-roughness version, or (like e.g. Unity3d)
allow to choose between metallic-roughness and specular-glossiness .

- Allowing both PBR models (metallic-roughness and
specular-glossiness) means more complication in the spec. If the glTF
decided that only metallic-roughness is enough, then it's likely also
true for X3D.

- Even though Unity allows to choose between these two approaches,
they still do not convert non-PBR materials to PBR with
specular-glossiness. This suggests that the automatic conversion is
not possible, at least not in a way that would be acceptable to *all*
the models in the wild.

Regards,
Michalis



More information about the x3d-public mailing list