<div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US" style="overflow-wrap: break-word;"><div class="gmail-m_-6094402764905065042WordSection1"><p class="MsoNormal"> <u></u></p><p class="MsoNormal">Likely we should create a set of examples from each of the languages you’ve listed (and more) to show how to do it.</p></div></div></blockquote><div><br></div><div>Here is a start:</div><div><br></div><div>- svg</div><div><br></div><div><a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Element/defs">https://developer.mozilla.org/en-US/docs/Web/SVG/Element/defs</a><br></div><div><a href="https://www.w3.org/html/wiki/SVGElements/defs">https://www.w3.org/html/wiki/SVGElements/defs</a><br></div><div><br></div><div><div><p class="MsoNormal">- glTF<u></u><u></u></p><p class="MsoNormal"><br></p><p class="MsoNormal"><a href="https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#indices-and-names">https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#indices-and-names</a><br></p><p class="MsoNormal">by index into a library array</p><p class="MsoNormal"><br></p></div><div><p class="MsoNormal">- a-frame<u></u><u></u></p><p class="MsoNormal"><br></p><p class="MsoNormal"><a href="https://aframe.io/docs/1.3.0/core/asset-management-system.html">https://aframe.io/docs/1.3.0/core/asset-management-system.html</a><br></p><p class="MsoNormal"><a href="https://aframe.io/docs/1.3.0/core/mixins.html">https://aframe.io/docs/1.3.0/core/mixins.html</a><br></p><p class="MsoNormal"><br></p></div><div><p class="MsoNormal">- collada</p></div></div><div><br></div><div><a href="https://www.khronos.org/files/collada_reference_card_1_4.pdf">https://www.khronos.org/files/collada_reference_card_1_4.pdf</a> : The library_* elements (modules)<br></div><div><br></div><div>All of those have examples, except for collada. Perhaps I can collect the examples and put them onto a wiki page.</div><div><br></div><div>Cheers, Andreas</div><div><br></div><div>PS: Here is a collada conversion of the simple gltf box at <a href="https://github.com/KhronosGroup/glTF-Sample-Models/blob/master/2.0/Box/glTF/Box.gltf">https://github.com/KhronosGroup/glTF-Sample-Models/blob/master/2.0/Box/glTF/Box.gltf</a></div><div><br></div><div><?xml version="1.0" encoding="utf-8"?><br><COLLADA version="1.5.0" xmlns="<a href="http://www.collada.org/2008/03/COLLADASchema">http://www.collada.org/2008/03/COLLADASchema</a>"><br>  <asset><br>    <contributor /><br>    <unit meter="1" /><br>  </asset><br>  <library_lights /><br>  <library_materials><br>    <material id="Red" name="Red"><br>      <instance_effect url="#effect-Red" /><br>    </material><br>  </library_materials><br>  <library_effects><br>    <effect id="effect-Red" /><br>  </library_effects><br>  <library_cameras /><br>  <library_geometries><br>    <geometry id="mesh_1"><br>      <mesh><br>        <source id="mesh_1-position" name="position"><br>          <float_array id="mesh_1-position-array" count="72">-0.5 -0.5 0.5 0.5 -0.5 0.5 -0.5 0.5 0.5 0.5 0.5 0.5 0.5 -0.5 0.5 -0.5 -0.5 0.5 0.5 -0.5 -0.5 -0.5 -0.5 -0.5 0.5 0.5 0.5 0.5 -0.5 0.5 0.5 0.5 -0.5 0.5 -0.5 -0.5 -0.5 0.5 0.5 0.5 0.5 0.5 -0.5 0.5 -0.5 0.5 0.5 -0.5 -0.5 -0.5 0.5 -0.5 0.5 0.5 -0.5 -0.5 -0.5 -0.5 0.5 -0.5 -0.5 -0.5 -0.5 -0.5 0.5 -0.5 0.5 -0.5 -0.5 0.5 0.5 -0.5 </float_array><br>          <technique_common><br>            <accessor source="#mesh_1-position-array" count="24" stride="3"><br>              <param name="X" type="float" /><br>              <param name="Y" type="float" /><br>              <param name="Z" type="float" /><br>            </accessor><br>          </technique_common><br>        </source><br>        <source id="mesh_1-normal" name="normal"><br>          <float_array id="mesh_1-normal-array" count="72">0 0 1 0 0 1 0 0 1 0 0 1 0 -1 0 0 -1 0 0 -1 0 0 -1 0 1 0 0 1 0 0 1 0 0 1 0 0 0 1 0 0 1 0 0 1 0 0 1 0 -1 0 0 -1 0 0 -1 0 0 -1 0 0 0 0 -1 0 0 -1 0 0 -1 0 0 -1 </float_array><br>          <technique_common><br>            <accessor source="#mesh_1-normal-array" count="24" stride="3"><br>              <param name="X" type="float" /><br>              <param name="Y" type="float" /><br>              <param name="Z" type="float" /><br>            </accessor><br>          </technique_common><br>        </source><br>        <vertices id="mesh_1-vertices"><br>          <input semantic="POSITION" source="#mesh_1-position" /><br>        </vertices><br>        <triangles material="default" count="12"><br>          <input semantic="VERTEX" source="#mesh_1-vertices" offset="0" /><br>          <input semantic="NORMAL" source="#mesh_1-normal" offset="1" /><br>          <p>0 0 1 1 2 2 3 3 2 2 1 1 4 4 5 5 6 6 7 7 6 6 5 5 8 8 9 9 10 10 11 11 10 10 9 9 12 12 13 13 14 14 15 15 14 14 13 13 16 16 17 17 18 18 19 19 18 18 17 17 20 20 21 21 22 22 23 23 22 22 21 21</p><br>        </triangles><br>      </mesh><br>    </geometry><br>  </library_geometries><br>  <library_images /><br>  <library_visual_scenes><br>    <visual_scene id="Scene"><br>      <node id="Node--0" sid="Node--0" name="Node #0" type="NODE"><br>        <matrix>1 0 0 0 0 0 1 0 0 -1 0 0 0 0 0 1</matrix><br>        <node id="Node--1" sid="Node--1" name="Node #1" type="NODE"><br>          <matrix>1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1</matrix><br>          <instance_geometry url="#mesh_1"><br>            <bind_material><br>              <technique_common><br>                <instance_material symbol="mat0" target="#Red" /><br>              </technique_common><br>            </bind_material><br>          </instance_geometry><br>        </node><br>      </node><br>    </visual_scene><br>  </library_visual_scenes><br>  <library_animations /><br>  <scene><br>    <instance_visual_scene url="#Scene" /><br>  </scene><br></COLLADA><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US" style="overflow-wrap: break-word;"><div class="gmail-m_-6094402764905065042WordSection1"><p class="MsoNormal"><u></u><u></u></p><p class="MsoNormal">Test cases welcome.<br><u></u></p><p class="MsoNormal"><u></u></p><div><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New""><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">all the best, Don<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">-- <u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">Don Brutzman  Naval Postgraduate School, Code USW/Br        <a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a><u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA    +1.831.656.2149<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:10pt;font-family:"Courier New"">X3D graphics, virtual worlds, Navy robotics https://</span> <span style="font-size:10pt;font-family:"Courier New""><a href="http://faculty.nps.edu/brutzman" target="_blank">faculty.nps.edu/brutzman</a><u></u><u></u></span></p></div><p class="MsoNormal"><u></u> <u></u></p><div><div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0in 0in"><p class="MsoNormal"><b>From:</b> Andreas Plesch <<a href="mailto:andreasplesch@gmail.com" target="_blank">andreasplesch@gmail.com</a>> <br><b>Sent:</b> Thursday, March 10, 2022 1:08 PM<br><b>To:</b> Joseph D Williams <<a href="mailto:joedwil@earthlink.net" target="_blank">joedwil@earthlink.net</a>><br><b>Cc:</b> Brutzman, Donald (Don) (CIV) <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>>; X3D Graphics public mailing list <<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>><br><b>Subject:</b> Re: [x3d-public] X3DParticleEmitter node inherit fromX3DChildNode(rather than X3DNode)<u></u><u></u></p></div></div><p class="MsoNormal"><u></u> <u></u></p><div><div><div><p class="MsoNormal">Good comments.<u></u><u></u></p></div><div><blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in"><div><div><ul type="disc"><li class="gmail-m_-6094402764905065042gmail-m-8356456586784332503msolistparagraph">MetadataSet to have X3DNode nodes <u></u><u></u></li></ul><p class="MsoNormal">If I understand it, the idea of ending meta to include actual user code for the scenegraph is exactly the sort of extension wanting to be “worthwhile to deviate a bit and be more permissive than the spec” that dooms the long-term validation operation. Maybe good for something with simple structure that looks convenient and logical and seemingly convenient to implement at first thought and elementary usage, then ends up making something definitely not to be best practice. Please delineate the “worthwhile” parts that make a case.<u></u><u></u></p></div></div></blockquote><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">I only know that this construction shows up in most of x-ite examples, and is how the Titania editor saves a scene, simple or complex. I can only deduce that this decision was deliberate but cannot speak to the specific motivation by the author. Speculating, the feature seems to be valuable for authoring. It should be possible to convert to standard x3d automatically by moving the DEF node from the MetadataSet to the first USE node, perhaps by xslt.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Not quite sure how validation would be affected.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><div><p class="MsoNormal">I agree that Metadata nodes should be limited to actual metadata but a library node seems sensible.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div></div><div><p class="MsoNormal">Here is a list of other, well established scene graph systems which do have a concept of a non-renderable library which is separate and can then be referenced as needed:<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">- svg<u></u><u></u></p></div><div><p class="MsoNormal">- glTF<u></u><u></u></p></div><div><p class="MsoNormal">- a-frame<u></u><u></u></p></div><div><p class="MsoNormal">- collada (I believe)<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">it is a natural concept and perhaps allows for cleaner user code organization. Having two alternative ways to define a DEF node (in a library, and as a first scene graph node) does seem to invite friction, and would need to be carefully considered.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Andreas<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in"><div><div><p class="MsoNormal"> <u></u><u></u></p><div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0in 0in"><p class="MsoNormal"><b>From: </b><a href="mailto:andreasplesch@gmail.com" target="_blank">Andreas Plesch</a><br><b>Sent: </b>Tuesday, March 8, 2022 11:39 AM<br><b>To: </b><a href="mailto:brutzman@nps.edu" target="_blank">Brutzman, Donald (Don) (CIV)</a><br><b>Cc: </b><a href="mailto:x3d-public@web3d.org" target="_blank">X3D Graphics public mailing list</a><br><b>Subject: </b>Re: [x3d-public] X3DParticleEmitter node inherit fromX3DChildNode(rather than X3DNode)<u></u><u></u></p></div><p class="MsoNormal"> <u></u><u></u></p><div><div><p class="MsoNormal">Yes, I am pretty sure Holger is aware. I only brought it up because Titania/x-ite typically stays very close to the spec. But this is a capability where Titania/x-ite found it worthwhile to deviate a bit and be more permissive than the spec. This decision may point to the value of having a way to DEF any X3DNode (not just child nodes) outside of the scene graph, outweighing strict compliance.<u></u><u></u></p><div><p class="MsoNormal"> <u></u><u></u></p></div><div><p class="MsoNormal">All the best, Andreas<u></u><u></u></p></div></div><p class="MsoNormal"> <u></u><u></u></p><div><div><p class="MsoNormal">On Tue, Mar 8, 2022 at 2:22 PM Brutzman, Donald (Don) (CIV) <<a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a>> wrote:<u></u><u></u></p></div><blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin:5pt 0in 5pt 4.8pt"><div><div><p class="MsoNormal" style="margin-left:4.8pt">MetadataSet is only allowed to contain other Metadata* nodes or comments.  Other content will fail validation (and will not load or import in the X3DJSAIL Java and X3DPSAIL Python libraries).<u></u><u></u></p><p class="MsoNormal" style="margin-left:4.8pt"> <u></u><u></u></p><p class="MsoNormal" style="margin-left:4.8pt">The right way to cache non-rendered content for DEF/USE libraries is to put them as children nodes within a Switch node with whichChoice=’-1’.<u></u><u></u></p><p class="MsoNormal" style="margin-left:4.8pt"> <u></u><u></u></p><p class="MsoNormal" style="margin-left:4.8pt"><span style="font-size:10pt;font-family:"Courier New"">all the best, Don</span><u></u><u></u></p><p class="MsoNormal" style="margin-left:4.8pt"><span style="font-size:10pt;font-family:"Courier New"">-- </span><u></u><u></u></p><p class="MsoNormal" style="margin-left:4.8pt"><span style="font-size:10pt;font-family:"Courier New"">Don Brutzman  Naval Postgraduate School, Code USW/Br        <a href="mailto:brutzman@nps.edu" target="_blank">brutzman@nps.edu</a></span><u></u><u></u></p><p class="MsoNormal" style="margin-left:4.8pt"><span style="font-size:10pt;font-family:"Courier New"">Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA    +1.831.656.2149</span><u></u><u></u></p><p class="MsoNormal" style="margin-left:4.8pt"><span style="font-size:10pt;font-family:"Courier New"">X3D graphics, virtual worlds, Navy robotics https://</span> <span style="font-size:10pt;font-family:"Courier New""><a href="http://faculty.nps.edu/brutzman" target="_blank">faculty.nps.edu/brutzman</a></span><u></u><u></u></p><p class="MsoNormal" style="margin-left:4.8pt"> <u></u><u></u></p><div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0in 0in"><p class="MsoNormal" style="margin-left:4.8pt"><b>From:</b> x3d-public <<a href="mailto:x3d-public-bounces@web3d.org" target="_blank">x3d-public-bounces@web3d.org</a>> <b>On Behalf Of </b>Andreas Plesch<br><b>Sent:</b> Tuesday, March 8, 2022 10:11 AM<br><b>To:</b> X3D Graphics public mailing list <<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>><br><b>Subject:</b> Re: [x3d-public] X3DParticleEmitter node inherit from X3DChildNode(rather than X3DNode)<u></u><u></u></p></div><p class="MsoNormal" style="margin-left:4.8pt"> <u></u><u></u></p><div><div><p class="MsoNormal" style="margin-left:4.8pt">Of note is that Titania and x-ite allow MetadataSet to have X3DNode nodes, eg. any node, in the value field, not just X3DMetadataObject nodes.<u></u><u></u></p></div><div><p class="MsoNormal" style="margin-left:4.8pt"> <u></u><u></u></p></div><div><p class="MsoNormal" style="margin-left:4.8pt">This allows MetadataSet to be used as a NodesLibrary for DEF/USE purposes. In fact, this kind of redirection is the default setup for scenes created in Titania.<u></u><u></u></p></div><div><p class="MsoNormal" style="margin-left:4.8pt"> <u></u><u></u></p></div><div><p class="MsoNormal" style="margin-left:4.8pt">SVG also has a NodesLibrary equivalent, the <defs> element:<u></u><u></u></p></div><div><p class="MsoNormal" style="margin-left:4.8pt"> <u></u><u></u></p></div><div><p class="MsoNormal" style="margin-left:4.8pt"><a href="https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%2Fdocs%2FWeb%2FSVG%2FElement%2Fdefs&data=04%7C01%7Cbrutzman%40nps.edu%7C95cb4840eb58436e0d9508da02da2e52%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637825433437663668%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=5JaI6%2BSLM%2F8KrjdebrqukV9UIaHU9Sz5lfBRdiHTEkc%3D&reserved=0" target="_blank">https://developer.mozilla.org/en-US/docs/Web/SVG/Element/defs</a><u></u><u></u></p></div><div><p class="MsoNormal" style="margin-left:4.8pt"> <u></u><u></u></p></div><div><p class="MsoNormal" style="margin-left:4.8pt">-Andreas<u></u><u></u></p></div><div><p class="MsoNormal" style="margin-left:4.8pt"> <u></u><u></u></p></div><div><blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0in 0in 0in 6pt;margin:5pt 0in 5pt 4.8pt"><p class="MsoNormal" style="margin-bottom:12pt;margin-left:9.6pt">Date: Mon, 7 Mar 2022 21:29:41 +0100<br>From: Michalis Kamburelis <<a href="mailto:michalis.kambi@gmail.com" target="_blank">michalis.kambi@gmail.com</a>><br>To: Joseph D Williams <<a href="mailto:joedwil@earthlink.net" target="_blank">joedwil@earthlink.net</a>><br>Cc: GPU Group <<a href="mailto:gpugroup@gmail.com" target="_blank">gpugroup@gmail.com</a>>,  "X3D Public Mailing List<br>        (<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>)" <<a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a>><br>Subject: Re: [x3d-public] X3DParticleEmitter node inherit from<br>        X3DChildNode(rather than X3DNode)<br>Message-ID:<br>        <<a href="mailto:CAKzBGZNToR-7CmaUzRxBE3xx9J6j2mPgmvKAjQKpGQxjdY_0hA@mail.gmail.com" target="_blank">CAKzBGZNToR-7CmaUzRxBE3xx9J6j2mPgmvKAjQKpGQxjdY_0hA@mail.gmail.com</a>><br>Content-Type: text/plain; charset="UTF-8"<br><br>Perhaps I should have written<br><br>"""<br>The nodes within NodesLibrary don't make any effect, they are not<br>traversed. They are only to be reUSEd (referenced) by other parts of<br>the graph."<br>"""<br><br>This makes the wording consistent with how e.g. Switch is described.<br>Sure you have all the nodes in memory, you just don't traverse to<br>inactive parts of Switch, LOD, NodesLibrary etc.<br><br>Regards,<br>Michalis<u></u><u></u></p></blockquote></div></div></div></div></blockquote></div><p class="MsoNormal"><br clear="all"><u></u><u></u></p><div><p class="MsoNormal"> <u></u><u></u></p></div><p class="MsoNormal">-- <u></u><u></u></p></div><p class="MsoNormal">Andreas Plesch<br>Waltham, MA 02453<u></u><u></u></p><p class="MsoNormal"> <u></u><u></u></p></div></div></blockquote></div><p class="MsoNormal"><br clear="all"><u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><p class="MsoNormal">-- <u></u><u></u></p><div><div><div><p class="MsoNormal">Andreas Plesch<br>Waltham, MA 02453<u></u><u></u></p></div></div></div></div></div></div></div></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Andreas Plesch<br>Waltham, MA 02453</div></div></div></div>