<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
{mso-style-priority:34;
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
mso-ligatures:none;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:1644693908;
mso-list-type:hybrid;
mso-list-template-ids:-460799758 591300040 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
{mso-level-start-at:0;
mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;
mso-fareast-font-family:Calibri;
mso-bidi-font-family:"Times New Roman";}
@list l0:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level3
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
@list l0:level4
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level5
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level6
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
@list l0:level7
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Symbol;}
@list l0:level8
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:"Courier New";}
@list l0:level9
{mso-level-number-format:bullet;
mso-level-text:;
mso-level-tab-stop:none;
mso-level-number-position:left;
text-indent:-.25in;
font-family:Wingdings;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal>Acknowledged all, thanks.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>The way to use a prototype to only extend the fields in a node is to declare a new prototype node containing the original node as first node, include the original fields with IS connections (as appropriate) then add new fields of interest.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Example follows, preserving original fields and adding an ‘enabled’ field.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><ul style='margin-top:0in' type=disc><li class=MsoListParagraph style='margin-left:0in;mso-list:l0 level1 lfo1'>X3D Example Archives: X3D4WA, X3D for Web Authors, Chapter 14 Prototypes, Material Modulator<o:p></o:p></li><li class=MsoListParagraph style='margin-left:0in;mso-list:l0 level1 lfo1'>Mimic a Material node and modulate the diffuseColor field as an animation effect, provided as a prototype for reusability.<o:p></o:p></li><li class=MsoListParagraph style='margin-left:0in;mso-list:l0 level1 lfo1'>https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter14Prototypes/MaterialModulatorIndex.html<o:p></o:p></li><li class=MsoListParagraph style='margin-left:0in;mso-list:l0 level1 lfo1'>https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter14Prototypes/MaterialModulator.x3d<o:p></o:p></li></ul><p class=MsoNormal><o:p> </o:p></p><ul style='margin-top:0in' type=disc><li class=MsoListParagraph style='margin-left:0in;mso-list:l0 level1 lfo1'>X3D Example Archives: X3D4WA, X3D for Web Authors, Chapter 14 Prototypes, Material Modulator Examples<o:p></o:p></li><li class=MsoListParagraph style='margin-left:0in;mso-list:l0 level1 lfo1'>Demonstrate multiple instances of an external prototype.<o:p></o:p></li><li class=MsoListParagraph style='margin-left:0in;mso-list:l0 level1 lfo1'>https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter14Prototypes/MaterialModulatorExamplesIndex.html<o:p></o:p></li><li class=MsoListParagraph style='margin-left:0in;mso-list:l0 level1 lfo1'>https://x3dgraphics.com/examples/X3dForWebAuthors/Chapter14Prototypes/MaterialModulatorExamples.x3d<o:p></o:p></li></ul><div><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Courier New"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Courier New"'>all the best, Don<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Courier New"'>-- <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Courier New"'>Don Brutzman Naval Postgraduate School, Code USW/Br brutzman@nps.edu<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Courier New"'>Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA +1.831.656.2149<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Courier New"'>X3D graphics, virtual worlds, navy robotics https://faculty.nps.edu/brutzman<o:p></o:p></span></p></div><p class=MsoNormal><o:p> </o:p></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b>From:</b> GPU Group <gpugroup@gmail.com> <br><b>Sent:</b> Monday, July 3, 2023 4:05 PM<br><b>To:</b> Andreas Plesch <andreasplesch@gmail.com><br><b>Cc:</b> Brutzman, Donald (Don) (CIV) <brutzman@nps.edu>; X3D Graphics public mailing list <x3d-public@web3d.org><br><b>Subject:</b> Re: [x3d-public] x3d extensions through Metadata; ExternProtoDeclare also possible<o:p></o:p></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>Tangentially related: <o:p></o:p></p><div><p class=MsoNormal>a) tuple nodes in web3d: like script or protoDeclare fields - configurable field types, but that's all it is - a collection of fields.<o:p></o:p></p></div><div><p class=MsoNormal>- and can be ROUTEd as SFNodes<o:p></o:p></p></div><div><p class=MsoNormal>b) Blender import - where to hide non-blender nodes and information, in such a way they can be exported and reconstituted in the exported scene<o:p></o:p></p></div><div><p class=MsoNormal>-Doug<o:p></o:p></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>On Mon, Jul 3, 2023 at 3:46 PM Andreas Plesch <<a href="mailto:andreasplesch@gmail.com">andreasplesch@gmail.com</a>> wrote:<o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><p class=MsoNormal>Hi Don,<br><br><MetadataSet name="NewFields4.1" containerField='metadata'><!—list of<br>fields follow --></MetadataSet> would work. On the other hand, I may<br>prefer use of the reference field to avoid a level of hierarchy:<br><br><MetadataFloat reference="NewFields4.1" name="sortKey" value="1"<br>containerField='metadata' /><br><br>After all, reference is supposed to be used for a well-defined class<br>of Metadata, perhaps with a Schema.<br><br>We should keep in mind that there will be extensions which are not<br>candidates for v4.1.<br><br>Describing the SFNode representation, I also had thought about reusing<br>ProtoInstance, with or without ProtoExternDeclare. But how would one<br>then represent extension fields to existing nodes like Shape ?<br><br>I guess it is possible to mix and match Metadata and Proto but it<br>seems not ideal.<br><br>Best, Andreas<br><br><br>On Mon, Jul 3, 2023 at 3:48 PM Brutzman, Donald (Don) (CIV)<br><<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>> wrote:<br>><br>> Good efforts, thanks for thinking this possibility through farther. Agreed that new fields might be added this way<br>><br>> <MetadataSet name="NewFields4.1" containerField='metadata'><!—list of fields follow --></MetadataSet> though nodes do seem trickier.<br>><br>><br>><br>> Another thought, belatedly: we might also use more-familiar ExternProtoDeclare constructs to define signatures for any new nodes of interest.<br>><br>><br>><br>> While we usually work hard to provide essential implementations in X3D for such declarations (possibly including even Script and Shader nodes), it is also possible that an X3D browser might recognize particular externproto nodes of interest and apply its own native implementation. The ExternProtoDeclare might even point to a stub that let any player read and handle them without rendering or error.<br>><br>><br>><br>> Then including a ProtoInstance for each usage of each new node also has familiar, simple syntax.<br>><br>><br>><br>> all the best, Don<br>><br>> --<br>><br>> Don Brutzman Naval Postgraduate School, Code USW/Br <a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a><br>><br>> Watkins 270, MOVES Institute, Monterey CA 93943-5000 USA +1.831.656.2149<br>><br>> X3D graphics, virtual worlds, navy robotics <a href="https://faculty.nps.edu/brutzman" target="_blank">https://faculty.nps.edu/brutzman</a><br>><br>><br>><br>> -----Original Message-----<br>> From: x3d-public <<a href="mailto:x3d-public-bounces@web3d.org" target="_blank">x3d-public-bounces@web3d.org</a>> On Behalf Of Andreas Plesch<br>> Sent: Monday, July 3, 2023 11:51 AM<br>> To: X3D Graphics public mailing list <<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>><br>> Subject: Re: [x3d-public] x3d extensions through Metadata<br>><br>><br>><br>> While Metadata could provide a backward compatible way to represent non-standard fields and nodes, it seems difficult to use such Metadata nodes for events and routes.<br>><br>><br>><br>> It would mean for a browser to establish implicit, internal bi-directional routes between an extension Metadata node and the actual field of a scene graph node. This becomes similar to Prototypes and quite difficult to track properly for a browser.<br>><br>><br>><br>> A potential solution may be to disregard extension Metadata nodes for routing to the represented nodes. Extension Metadata nodes would only be used initially to populate extension fields and add extension nodes to the scene graph.<br>><br>><br>><br>> In effect this means that for MetadataSets representing SFNodes it will be necessary to include another MetadataString child which defines the DEF name of the represented extension node. So the name for this MetadataString could be 'DEFname' and the value the name which can be used for routing. Unfortunately, it would not be possible to use the name field of the MetadataSet since the name field contains the node name ("Depthmode"). It is also not possible to use the DEF statement because it will refer to the Metadata node, not the represented SFNode.<br>><br>><br>><br>> This way there is complete information to construct the scene graph node during first loading and add it.<br>><br>><br>><br>> This also would mean routes with a fromNode or toNode to an extension node with a DEFname of say "readonlyDepthmask" represented by a MetadataSet would be legal even although there is no DEF statement with such a name, only the corresponding MetadataString. If validators check for routes, they would have to account for this.<br>><br>> Similarly routes with fromField or toField to an extension field, say "sortKey", would be also legal although the field is only represented by MetadataXXX node with the name of the field.<br>><br>><br>><br>> Perhaps this all means that the integrity of routes cannot be completely validated if Metadata are used to represent extension fields and nodes.<br>><br>><br>><br>> It is probably time to put together examples for easier discussion.<br>><br>><br>><br>> -Andreas<br>><br>><br>><br>> On Sun, Jul 2, 2023 at 1:45 PM Andreas Plesch <<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>> wrote:<br>><br>> ><br>><br>> > X3D Browsers may have non-standard extensions such as fields and<br>><br>> > nodes. It has been suggested that a backwards compatible way to access<br>><br>> > such extensions could be accomplished through Metadata nodes. This way<br>><br>> > a X3D file using such extensions still can conform strictly to the<br>><br>> > syntactic standard.<br>><br>> ><br>><br>> > It should be possible for browsers to have general and automatic<br>><br>> > recognition of such extension fields and nodes provided in Metadata.<br>><br>> > Here is a first draft mechanism:<br>><br>> ><br>><br>> > A metadata node would advertise that it is eligible to be considered<br>><br>> > as an extension, probably through a reference value of say<br>><br>> > "x3dExtension", or by being contained in a special Metadataset with<br>><br>> > such a name or reference.<br>><br>> ><br>><br>> > Then a browser would check the Metadata name and if the name is<br>><br>> > equivalent to an implemented field of the parent node, the browser<br>><br>> > would use the value of the Metadata and use it in some way as the<br>><br>> > value of the field (This could also apply to standard fields).<br>><br>> ><br>><br>> > Since Metadata values can only be of type MFString, MFFloat, MFDouble,<br>><br>> > MFBool or MFInt32 there needs to be some translation to field values.<br>><br>> ><br>><br>> > Most translations are obvious but SF/MFNode fields are not. One option<br>><br>> > is to provide the xml string of an SFNode as the value in a<br>><br>> > MetadataString node. But this may be too encoding specific. On the<br>><br>> > other hand there is the standard SAI function createX3DFfromString<br>><br>> > for that.<br>><br>> ><br>><br>> > So another option is to use MetadataSet for SFNode. name would still<br>><br>> > be the field name for the SFNode. Then the children of MetadataSet<br>><br>> > would contain the fields of the SFNode node. In addition there would<br>><br>> > be a MetadataString node with name "nodeName" which has the node name<br>><br>> > as the value. This is more verbose but crosses encodings.<br>><br>> ><br>><br>> > MFNode fields would also use MetadataSet. The only children would be<br>><br>> > MetadataSet of the SFNode kind.<br>><br>> ><br>><br>> > I will have to check how well that kind of mechanism would fit with<br>><br>> > processing of metadata in x3dom. It may not fit that well.<br>><br>> ><br>><br>> > Any feedback, or ideas welcome,<br>><br>> ><br>><br>> > Andreas<br>><br>> > --<br>><br>> > Andreas Plesch<br>><br>> > Waltham, MA 02453<br>><br>><br>><br>><br>><br>><br>><br>> --<br>><br>> Andreas Plesch<br>><br>> Waltham, MA 02453<br>><br>><br>><br>> _______________________________________________<br>><br>> x3d-public mailing list<br>><br>> <a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br>><br>> <a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br><br><br><br>-- <br>Andreas Plesch<br>Waltham, MA 02453<br><br>_______________________________________________<br>x3d-public mailing list<br><a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br><a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><o:p></o:p></p></blockquote></div></div></div></body></html>