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

Andreas Plesch andreasplesch at gmail.com
Sat Mar 17 11:45:49 PDT 2018


I agree with Michalis that 1:1 translation of the Blinn Phong shading model
parameters we are used to PBR shading parameters is not possible. There are
approximations which may be an option but would probably always be inferior
to the original rendering, for carefully constructed materials.

Furthermore, it is considered visually distracting to use both PBR and
Phong shading in the same scene although certainly technically possible. I
have not seen this and perhaps visual conventions would adjust readily.

glTF2 allows for point/directional lights, so there must be some consensus
on how to apply these lights to PBR materials but this needs research into
engines. Image Based Lighting (IBL) is the preferred method presumably
because it provides a direct value for any incidence angle and can be
importance sampled.

There is semantic overlap between the physical material node by Sturm et
al. which has all the fancy maps as fields and the proposed
commonsurfaceshader node. Perhaps there is an opportunity to unify. I think
that means adding the commonsurfaceshader node fields as fields to
material, or reversely have a new PBR surfaceshader node with the textures
and only the factors (colors) in the pbrmaterial node. Another option may
be to add all these maps for both shading models as fields to Appearance,
parallel to the existing texture field. New nodes for new functionality may
provide overall a better extension mechanism.

glTF has an extension mechanism and a much discussed but never finalized
extension are Phong materials, called materials common.

I would consider webvr and custom shaders only loosely connected to PBR. It
may be possible to develop a PBR component independently.

So to me the main missing piece may be lighting: How to use existing X3D
lights with PBR. How to use and spec. IBL for Blinn-Phong X3D materials, I
think, is already covered by the cubemaps spec.

-Andreas



Message: 2
Date: Fri, 16 Mar 2018 17:37:37 +0100
From: Michalis Kamburelis <michalis.kambi at gmail.com>
To: Don Brutzman <brutzman at nps.edu>
Cc: X3D Graphics public mailing list <x3d-public at web3d.org>
Subject: Re: [x3d-public] Physically Based Materials (PBR) in X3D
Message-ID:
        <CAKzBGZMuo_eh+aa_upF9M87RwuUFTjLJbcpra=FHobzCOCHvMA at mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"

  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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20180317/cf0db0d1/attachment.html>


More information about the x3d-public mailing list