[x3d-public] Finding required fields (Appearance)

Andreas Plesch andreasplesch at gmail.com
Wed Aug 7 16:33:18 PDT 2024


Shorter answer:

Let me clarify that I fully agree that an Appearance field value is
not strictly required in which case it will be NULL which in turn
leads to an unlit white rendering.

Since this is rarely useful (sometimes it is)  I originally listed the
minimal Shape node which leads to a more expected rendering and then
can be modified as needed, as a more practical response..

Longer answer:

I think the real question may be what are useful default values.
Additionally, should NULL be ever used as a default value since it is
not obvious what a NULL value may indicate or what consequences it may
have. After all, non-node valued fields never have null values as
defaults.

For example, for the Appearance field in Shape I would have expected
the default value to be an Appearance node with its default values for
its fields. Similarly, I would have expected for the Material field in
Appearance a default value which is a Material node with its default
values.

Of course, it is not possible to change the default values of existing
nodes but for new nodes careful consideration may be given to
assigning default values to node fields which may not be NULL.

-Andreas

> Date: Wed, 7 Aug 2024 13:47:29 -0500
> From: John Carlson <yottzumm at gmail.com>
> To: Joe D Williams <joedwil at earthlink.net>
> Cc: "Extensible 3D (X3D) Graphics public discussion"
>         <x3d-public at web3d.org>, Michalis Kamburelis <michalis.kambi at gmail.com>
> Subject: Re: [x3d-public] Finding required fields (Appearance)
> Message-ID:
>         <CAGC3UEmFeFAEMAG-ZUkO9fvTmrX3n3sxW2rf4Sc3+XZLMF2jdw at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> If you just take my subject, without reading the whole message, you might
> assume that I am talking about an Appearance node instead of appearance
> field.
>
> My question was, is the appearance field required in Shape.
>
> Sure, geometry and material are not required either.
>
> For context, the question was, what?s the minimal code for a graphical
> object in X3DOM.
> Andreas and I had come up with two different answers, and I was trying to
> use documentation to determine whether an Appearance node was required.
> The X3DOM didn?t list NULL as a default value.  Andreas? approach was to
> try actual examples.
>
> I?m pretty sure that just a shape node and a geometry node are required to
> show a graphical object, but at this point, let?s try actual examples.
>
> Thanks,
>
> John
>
> On Sat, Aug 3, 2024 at 5:37?PM Joe D Williams <joedwil at earthlink.net> wrote:
>
> > >  Finding required fields (Appearance) ...
> >
> >
> >
> >
> > https://www.web3d.org/documents/specifications/19775-1/V4.0/Part01/components/shape.html#Shape
> >
> >
> >
> >
> >
> >
> > https://www.web3d.org/documents/specifications/19775-1/V4.0/Part01/components/shape.html#Appearance
> >
> >
> >
> >
> >
> >
> > https://www.web3d.org/documents/specifications/19775-1/V4.0/Part01/components/shape.html#Material
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Please look at the x3d standard. As you mentioned, default geometry is
> > null in Shape.
> >
> >
> >
> > If there is a geometry then the Shape Material node is used. For Material
> > there is a default set which would tend to make the geometry visible. For
> > example, default transparency is 0.
> >
> >
> >
> > My, my, my, ... how the material node has grown along with PBR for 4.0:)
> >
> >
> >
> > All Best,
> >
> > Joe
> >
> >
> >
> >
> >
> > Shape : X3DShapeNode {
> >   SFNode  [in,out] appearance  NULL     [X3DAppearanceNode]
> >   SFBool  [in,out] bboxDisplay FALSE
> >   SFBool  [in,out] castShadow  TRUE
> >   SFNode  [in,out] geometry    NULL     [X3DGeometryNode]
> >   SFNode  [in,out] metadata    NULL     [X3DMetadataObject]
> >   SFBool  [in,out] visible     TRUE
> >   SFVec3f []       bboxCenter  0 0 0    (-?,?)
> >   SFVec3f []       bboxSize    -1 -1 -1 [0,?) or ?1 ?1 ?1
> > }
> >
> >
> >
> > Appearance : X3DAppearanceNode {
> >   SFNode   [in,out] acousticProperties NULL   [AcousticProperties]
> >   SFFloat  [in,out] alphaCutoff        0.5    [0,1]
> >   SFString [in,out] alphaMode          "AUTO" ["AUTO", "OPAQUE", "MASK",
> > "BLEND"]
> >   SFNode   [in,out] backMaterial       NULL   [X3DOneSidedMaterialNode]
> >   SFNode   [in,out] fillProperties     NULL   [FillProperties]
> >   SFNode   [in,out] lineProperties     NULL   [LineProperties]
> >   SFNode   [in,out] material           NULL   [X3DMaterialNode]
> >   SFNode   [in,out] metadata           NULL   [X3DMetadataObject]
> >   SFNode   [in,out] pointProperties    NULL   [PointProperties]
> >   MFNode   [in,out] shaders            []     [X3DShaderNode]
> >   SFNode   [in,out] texture            NULL   [X3DTextureNode]
> >   SFNode   [in,out] textureTransform   NULL   [X3DTextureTransformNode]
> > }
> >
> >
> >
> >
> >
> > Material : X3DOneSidedMaterialNode {
> >   SFFloat  [in,out] ambientIntensity          0.2          [0,1]
> >   SFNode   [in,out] ambientTexture            NULL
> > [X3DSingleTextureNode]
> >   SFString [in,out] ambientTextureMapping     ""
> >   SFColor  [in,out] diffuseColor              0.8 0.8 0.8  [0,1]
> >   SFNode   [in,out] diffuseTexture            NULL
> > [X3DSingleTextureNode]
> >   SFString [in,out] diffuseTextureMapping     ""
> >   SFColor  [in,out] emissiveColor             0 0 0        [0,1]
> >   SFNode   [in,out] emissiveTexture           NULL
> > [X3DSingleTextureNode]
> >   SFString [in,out] emissiveTextureMapping    ""
> >   SFNode   [in,out] metadata                  NULL
> > [X3DMetadataObject]
> >   SFFloat  [in,out] normalScale               1            [0, ?)
> >   SFNode   [in,out] normalTexture             NULL
> > [X3DSingleTextureNode]
> >   SFString [in,out] normalTextureMapping      ""
> >   SFFloat  [in,out] occlusionStrength         1            [0,1]
> >   SFNode   [in,out] occlusionTexture          NULL
> > [X3DSingleTextureNode]
> >   SFString [in,out] occlusionTextureMapping   ""
> >   SFFloat  [in,out] shininess                 0.2          [0,1]
> >   SFNode   [in,out] shininessTexture          NULL
> > [X3DSingleTextureNode]
> >   SFString [in,out] shininessTextureMapping   ""
> >   SFColor  [in,out] specularColor             0 0 0        [0,1]
> >   SFNode   [in,out] specularTexture           NULL
> > [X3DSingleTextureNode]
> >   SFString [in,out] specularTextureMapping    ""
> >   SFFloat  [in,out] transparency              0            [0,1]
> > }
> >
> >
> >
> >
> >
> > not mention PhysicalMaterial and  UnlitMaterial.
> >
> >
> >
> >
> >
> >
> >
> > -----Original Message-----
> > From: Extensible 3D (X3D) Graphics public discussion <x3d-public at web3d.org
> > >
> > Sent: Aug 2, 2024 10:34 AM
> > To: Michalis Kamburelis <michalis.kambi at gmail.com>
> > Cc: John Carlson <yottzumm at gmail.com>, Extensible 3D (X3D) Graphics
> > public discussion <x3d-public at web3d.org>
> > Subject: Re: [x3d-public] Finding required fields (Appearance)
> >
> >
> > I got something for x3d schema, but X3DUOM was blank.  I don?t have my
> > computer and I?m using chrome.  I?m at the airport.
> >
> > Should I use the spec on the road and tooltips? CGE?
> >
> > John
> >
> > On Fri, Aug 2, 2024 at 9:35?AM John Carlson <yottzumm at gmail.com> wrote:
> >
> >> I don?t know if Apple can still prevent other browsers from avoiding
> >> Apple?s Safari renderer on iOS.  The issue was that apparently, the pages
> >> were blank because I was viewing XML schema and X3DUOM.  Maybe I didn?t
> >> wait long enough.  AFAIK, there?s no view source on Safari on iOS?  Anyone
> >> know a trick?
> >>
> >> I was unable to search through X3D JSON Schema on GitHub because the page
> >> crashed.
> >>
> >> I can?t even search through my X3DUOM to JSON schema mapping on a web
> >> page which is rendered HTML.
> >>
> >> I will try chrome unless the Firefox is proved to work on iOS.
> >>
> >> John
> >>
> >> On Fri, Aug 2, 2024 at 7:31?AM Michalis Kamburelis <
> >> michalis.kambi at gmail.com> wrote:
> >>
> >>> Shape.appearance can be NULL.
> >>>
> >>> I'm not sure about notes of iOS and Safari, it should naturally work
> >>> to search GitHub or to browse X3D specs :) You can also install other
> >>> browsers, lke Firefox, on iOS.
> >>>
> >>> Michalis
> >>>
> >>> czw., 1 sie 2024 o 17:32 John Carlson via x3d-public
> >>> <x3d-public at web3d.org> napisa?(a):
> >>> >
> >>> > I?m looking for a way to determine whether an Appearance node is
> >>> required, viewable  in iOS Safari? Default is NULL in Shape, so I assume
> >>> not.
> >>> >
> >>> > I?m going to check X3D JSON Schema.  Safari bombs when searching on
> >>> GitHub.
> >>> >
> >>> > Any approach would be great, I may even try vim.
> >>> >
> >>> > John
> >>> > _______________________________________________
> >>> > x3d-public mailing list
> >>> > x3d-public at web3d.org
> >>> > http://web3d.org/mailman/listinfo/x3d-public_web3d.org
> >>
> >>
> >
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20240807/13c29e42/attachment-0001.html>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
>
>
> ------------------------------
>
> End of x3d-public Digest, Vol 185, Issue 12
> *******************************************



-- 
Andreas Plesch
Waltham, MA 02453



More information about the x3d-public mailing list