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

Michalis Kamburelis michalis.kambi at gmail.com
Sat Mar 17 19:32:08 PDT 2018


Thank you for all the insights!

2018-03-18 1:39 GMT+01:00 Andreas Plesch <andreasplesch at gmail.com>:
> normalSpace
> normalBias

I am not 100% sure do we need normalSpace, normalBias (and some other
fields like normalFormat, normalScale from CommonSurfaceShader).

>From what I saw, it's standard to specify normalmaps in tangent space.
And encode them with scale=(2,2,2) and bias=(-1,-1,-1), that is to
trivially pack a 3D direction (3 floats in [-1..1]) into RGB color (3
floats in [0..1]).

I would probably make the above settings just "forced" in X3D
standard, just like glTF does.

(Note: glTF has "normalTextureInfo.scale", but that's only in XY, it
is something different than CommonSurfaceShader.normalScale.)

The important fields we need are normalTexture and normalTextureCoordinatesId .

BTW: Actually, all xxxTexture fields require also
xxxTextureCoordinatesId in X3D, to be able to associate them with
texture coordinates in geometry "texCoord" field. That's also what
CommonSurfaceShader is doing. In glTF, the texture coordinates are
specified in normalTextureInfo, but it seems we don't need it. I
prefer CommonSurfaceShader approach -- xxxFactor, xxxTexture,
xxxTextureCoordinatesId .

>> 3. And the PhysicalMaterial, with it's current parameters, is an
>> alternative material. So the Appearance.material either points to
>> Material or PhysicalMaterial.
>>
>
> Agreed. It may even be worth thinking about being able to have both,
> as a fallback which then may require a 'preferred' indicator field.
>

I'm not sure do we need a mechanism to specify both PBR and non-PBR on
a single shape. Would graphic artists be interested in providing
parameters (including textures) for both versions?

In any case, instead of "preferred" field, we could change
"Apperance.material" to be MFNode and just indicate that the first one
is preferred. Just like "Apperance.shaders" works. This "preference"
mechanism was also one reason why "CommonSurfaceShader" was created as
a shader (and is placed on "Apperance.shaders").

Regards,
Michalis



More information about the x3d-public mailing list