[x3d-public] Bad Equation in 4.0 clean version

Michalis Kamburelis michalis.kambi at gmail.com
Tue May 31 13:28:03 PDT 2022


What exactly do you perceive there as "bad equation"?

1. If you mean that ^ symbol: The "roughnessParameter ^ 2" is supposed
to be a square. We could change it to "roughnessParameter<sup>2</sup>"
to look better.

2. That being said, these equations are more-or-less copied from older
glTF spec version. I did it, but I admit I now think it wasn't the
best idea -- these equations are almost impossible to understand
without the context. The glTF specification in later version also
removed them, and instead introduced "B.3. Sample Implementation
(Informative)" section in the spec,
https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#implementation
, that does a better job of showing the equations.

So, I would be fine with removing these equations, including the
sentence "The following equations show how to calculate bidirectional
reflectance distribution function (BRDF) inputs (cdiff, F0, "α ) from
the metallic-roughness material properties." .

Our lighting spec
https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD1/Part01/components/lighting.html#LightingPhysical
anyway refers to just " calculate the physicalLightContributioni value
in accordance with the physically based rendering equations as
specified in 2.[GLTF]. " and that's enough.

3. Moreover, I think the c_diff equation is now a little different
than latest glTF equation in
https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#implementation
, glTF has

c_diff = lerp(baseColor.rgb, black, metallic)

while X3D has

c_diff = lerp(baseParameter * (1 - dielectricSpecular.r), black,
metallicParameter)

I likely copied from mistake from older glTF spec. All the more reason
to just remove these equations from X3D, I made a mistake adding them.

Regards,
Michalis

sob., 28 maj 2022 o 00:34 Brutzman, Donald (Don) (CIV)
<brutzman at nps.edu> napisał(a):


>
> Thanks for noting this problem Dick.
>
>
>
> Michalis, can you please confirm that these equations are expressed correctly:
>
>
>
> X3D4 Architecture, 12 Shape component, 12.4.6 PhysicalMaterial
> https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-CD1/Part01/components/shape.html#PhysicalMaterial
> (then scroll down, copy follows)
>
>
>
> The following equations show how to calculate bidirectional reflectance distribution function (BRDF) inputs (cdiff, F0, "α ) from the metallic-roughness material properties.
>
> const dielectricSpecular = rgb(0.04, 0.04, 0.04)
>
> const black = rgb(0, 0, 0)
>
> cdiff = lerp(baseParameter * (1 - dielectricSpecular.r), black, metallicParameter)
>
> F0 = lerp(dieletricSpecular, baseParameter, metallicParameter)
>
> α = roughnessParameter ^ 2
>
>
>
>
>
> all the best, Don
>
> --
>
> Don Brutzman  Naval Postgraduate School, Code USW/Br        brutzman at nps.edu
>
> Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA    +1.831.656.2149
>
> X3D graphics, virtual worlds, Navy robotics https:// faculty.nps.edu/brutzman
>
>
>
> From: Richard Puk <puk at igraphics.com>
> Sent: Friday, May 27, 2022 8:46 AM
> To: Brutzman, Donald (Don) (CIV) <brutzman at nps.edu>
> Subject: Bad Equation in 4.0 clean version
>
>
>
> NPS WARNING: *external sender* verify before acting.
>
>
>
> Hi, Don –
>
>
>
> This is the requested e-mail listing the bad equation at the end of 12.4.6 PhysicalMaterial.
>
>
>
> /******************************************
>
> | Richard F. Puk, Ph.D., President
>
> | Intelligraphics Incorporated
>
> | 7644 Cortina Court
>
> | Carlsbad, CA  92009-8206
>
> | Tel: +1-760-753-9027  Mobile:  +1-760-809-9027
>
> | Email:  puk at igraphics.com
>
> \******************************************
>
>



More information about the x3d-public mailing list