[x3d-public] KHR_materials_emissive_strength

Michalis Kamburelis michalis.kambi at gmail.com
Fri Feb 10 05:02:34 PST 2023


Sorry for delay with answering -- just getting back to my TODOs :)

In short: I agree it would be useful to express this in X3D. It makes
sense for HDR, when the colors you output don't need to fit in 0..1
range. It is just a simple multiplier for emissive.

Notes:

1. glTF spec prohibits the use of it on unlit materials ("This
extension must not be used on a material that also uses
KHR_materials_unlit."). In your proposal, adding it to
X3DOneSidedMaterialNode means that it is available on X3D
UnlitMaterial too.

    And I agree with your approach :) Let's make it simple, make it
just for X3DOneSidedMaterialNode. Adding emissiveStrength only to
PhysicalMaterial, or only to PhysicalMaterial and Material, would
actually make things harder to implement and understand.

2. Note that there's an alternative way of doing this, and this way
actually may work in a lot of existing browsers :) It will work in
CGE/view3dscene. Namely:

    An X3D implementation could support values > 1 in emissiveColor
(SFColor), even though X3D spec says that SFColor values should fit in
0..1. This means that converting glTF emissiveStrength to X3D -> you
just do "x3d.emissiveColor := glTF.emissiveStrength *
glTF.emissiveFactor", and it really achieves the same effect on
screen. The equation on
https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_emissive_strength#implementation-notes
to multiply is simple enough :)

   Though I would say this is a "hack". To support authoring tools,
splitting it into emissiveColor (with SFColor, with components limited
to 0..1) and SFFloat emissiveStrength (0..unbounded) is better, having
these 2 as independent parameters feels more useful for author.

To cut the log story short, I agree with adding
X3DOneSidedMaterialNode.emissiveStrength exactly as Holger suggests.

Regards,
Michalis

sob., 4 lut 2023 o 02:35 Holger Seelig <holger.seelig at yahoo.de> napisał(a):
>
> glTF has an extension KHR_materials_emissive_strength:
>
> https://github.com/KhronosGroup/glTF/tree/main/extensions/2.0/Khronos/KHR_materials_emissive_strength
>
> Test files and screenshot here:
>
> https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/EmissiveStrengthTest
>
> To implement this in X3D there is a need for a new field in X3DOneSidedMaterialNode
>
> X3DOneSidedMaterialNode {
>>   SFFloat [in,out] emissiveStrength 1 [0, ∞)
> }
>
> It would be nice if we could add this.
>
> Best regards,
> Holger
>
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org



More information about the x3d-public mailing list