<div dir="auto">This looks great, Don. I wonder if this could be used for stereoscopic viewing?</div><div dir="auto"><br></div><div dir="auto">John </div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jun 1, 2024 at 12:43 PM Brutzman, Donald (Don) (CIV) via x3d-public <<a href="mailto:x3d-public@web3d.org">x3d-public@web3d.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="#467886" vlink="#96607D" style="word-wrap:break-word"><div class="m_4603382575135679942WordSection1"><p class="MsoNormal">The X in X3D is Extensible. An important aspect of that is the ability of an X3D model to export a scene sub-graph node, for potential use by a parent model which can load and access it via Inline. The IMPORT/EXPORT statements support the Inline node to establish this capability. Events can then be ROUTEd to and fro between the parent model and the child Inline model.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Bottom line up front (BLUF): it works! Test screenshots for three players:<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><ul style="margin-top:0in" type="disc"><li class="m_4603382575135679942MsoListParagraph" style="margin-left:0in"><a href="https://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/InlineImportCastleModelViewer.png" target="_blank">https://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/InlineImportCastleModelViewer.png</a><u></u><u></u></li><li class="m_4603382575135679942MsoListParagraph" style="margin-left:0in"><a href="https://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/InlineImportX_ITE.png" target="_blank">https://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/InlineImportX_ITE.png</a><u></u><u></u></li><li class="m_4603382575135679942MsoListParagraph" style="margin-left:0in"><a href="https://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/InlineImportX3DOM.png" target="_blank">https://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/InlineImportX3DOM.png</a><u></u><u></u></li></ul><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Details follow. The X3D 4.0 Architecture specification defines this functionality:<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><ul style="margin-top:0in" type="disc"><li class="m_4603382575135679942MsoListParagraph" style="margin-left:0in">X3D Architecture version 4.0 ISO/IEC 19775-1, clause 4 Concepts, 4.4.6 Import/Export <u></u><u></u></li><li class="m_4603382575135679942MsoListParagraph" style="margin-left:0in"><a href="https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/concepts.html#ImportExportsemantics" target="_blank">https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/concepts.html#ImportExportsemantics</a><u></u><u></u></li></ul><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal" style="margin-left:.25in">4.4.6 Import/Export semantics<u></u><u></u></p><p class="MsoNormal" style="margin-left:.25in">The IMPORT feature allows authors to incorporate content defined within Inline nodes or created programmatically into the namespace of the containing file for the purposes of event routing. In contrast with external prototyping (see 4.4.5 External prototype semantics), which allows access to individual fields of nodes defined as prototypes in external files, IMPORT provides access to all the fields of an externally defined node with a single statement (see 9.2.5 IMPORT statement).<u></u><u></u></p><p class="MsoNormal" style="margin-left:.25in"><u></u> <u></u></p><p class="MsoNormal" style="margin-left:.25in">Importing nodes from an Inlined file is accomplished with two statements: IMPORT and EXPORT. The IMPORT statement is used in the containing file to define which nodes of an Inline are to be incorporated into the containing file's namespace. The EXPORT statement is used in the file being Inlined, to control access over which nodes within a file are visible to other files (see 9.2.6 EXPORT statement). EXPORT statements are not allowed in prototype declarations.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Continuing: Dick and I have been working on resolving all issues with the X3D XML Encoding revision to match X3D 4.0. Making good progress, documenting resolution of all issues in Mantis (as usual). We expect to submit this working draft to ISO in the coming weeks. As part of these efforts, we realized that the XML example for X3D Inline/EXPORT/IMPORT was not in our example archives. Implementing and evaluating further revealed an attribute error in the XML Encoding specification prose that implementers were able to figure out correctly.<u></u><u></u></p><div style="border:none;border-bottom:solid windowtext 1.5pt;padding:0in 0in 1.0pt 0in"><p class="MsoNormal" style="border:none;padding:0in"><u></u> <u></u></p></div><p class="MsoNormal"><u></u> <u></u></p><ul style="margin-top:0in" type="disc"><li class="m_4603382575135679942MsoListParagraph" style="margin-left:0in">Mantis 697, 4.3.12 IMPORT/EXPORT statement syntax - Attribute inconsistency<u></u><u></u></li><li class="m_4603382575135679942MsoListParagraph" style="margin-left:0in"><a href="https://www.web3d.org/member-only/mantis/view.php?id=697" target="_blank">https://www.web3d.org/member-only/mantis/view.php?id=697</a><u></u><u></u></li></ul><p class="MsoNormal"><u></u> <u></u></p><ul style="margin-top:0in" type="disc"><li class="m_4603382575135679942MsoListParagraph" style="margin-left:0in">X3D XML Encoding version 4.0, clause 4 Concepts, 4.3.12 IMPORT/EXPORT statement syntax<u></u><u></u></li><li class="m_4603382575135679942MsoListParagraph" style="margin-left:0in"><a href="https://web3d.org/specifications/X3Dv4Draft/ISO-IEC19776-1v4.0-WD1/Part01/concepts.html#IMPORT_EXPORTStatementSyntax" target="_blank">https://web3d.org/specifications/X3Dv4Draft/ISO-IEC19776-1v4.0-WD1/Part01/concepts.html#IMPORT_EXPORTStatementSyntax</a><u></u><u></u></li></ul><p class="MsoNormal" style="margin-left:.25in"><span style="font-size:12.0pt;color:black">The following XML syntax applies to the IMPORT/EXPORT functionality of X3D.<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:.25in"><span style="font-size:12.0pt;color:black">An IMPORT statement consists of an IMPORT element followed by attributes </span><span style="font-size:10.0pt;color:black">inlineDEF</span><span style="font-size:12.0pt;color:black">, </span><span style="font-size:10.0pt;color:black;background:yellow">importedDEF</span><span style="font-size:12.0pt;color:black;background:yellow">,</span><span style="font-size:12.0pt;color:black"> </span><s><span style="font-size:10.0pt;color:black;background:orange">exportedDEF</span></s><s><span style="font-size:12.0pt;color:black;background:orange">,</span></s><span style="font-size:12.0pt;color:black"> and <span style="background:yellow">(optionally)</span> </span><span style="font-size:10.0pt;color:black">AS</span><span style="font-size:12.0pt;color:black">.<u></u><u></u></span></p><p class="MsoNormal" style="margin-left:.25in"><span style="font-size:12.0pt;color:black">An EXPORT statement consists of an EXPORT element followed by attributes </span><span style="font-size:10.0pt;color:black">localDEF</span><span style="font-size:12.0pt;color:black"> and <span style="background:yellow">(optionally)</span> </span><span style="font-size:10.0pt;color:black">AS</span><span style="font-size:12.0pt;color:black">.<u></u><u></u></span></p><p class="MsoNormal" style="margin-right:0in;margin-bottom:13.5pt;margin-left:.25in"><span style="color:black">EXAMPLE <span style="background:yellow">15 </span><s><span style="background:orange">2</span></s> The following depicts the XML encoding of an EXPORT statement <span style="background:yellow">within the inlined InlineExport.x3d model:</span><u></u><u></u></span></p><p class="MsoNormal" style="margin-left:.25in"><span style="font-size:10.5pt;color:black;background:yellow"><!-- file InlineExport.x3d --></span><span style="font-size:10.5pt;color:black"><br><Transform DEF='T1'> <span style="background:yellow"><!-- contained 3D content --> </Transform></span><br><span style="background:yellow"><!-- Hint: EXPORT statement follows node of interest, since localDEF field is similar to USE with type IDREF --></span><br><EXPORT localDEF='T1' AS='RootTransform'/></span><span style="font-size:12.0pt;color:black"><u></u><u></u></span></p><p class="MsoNormal" style="margin-right:0in;margin-bottom:13.5pt;margin-left:.25in"><span style="color:black">EXAMPLE <span style="background:yellow">16 </span> <s><span style="background:orange">1</span></s> The following depicts the XML encoding of an IMPORT statement <span style="background:yellow">within a parent scene that corresponds to a separate Inline model:</span><u></u><u></u></span></p><p class="MsoNormal" style="margin-left:.25in"><span style="font-size:10.5pt;color:black;background:yellow"><!-- file InlineImport.x3d --></span><span style="font-size:10.5pt;color:black"><br><Inline <span style="background:yellow">DEF='MyInlineModel' url='"InlineExport.x3d"'</span> <s><span style="background:orange">DEF='I1' url='"someUrl.x3d"'</span></s>/><br><IMPORT<br> <span style="background:yellow">inlineDEF='MyInlineModel'</span> <s><span style="background:orange">inlineDEF='I1'</span></s><br> <span style="background:yellow">importedDEF='RootTransform'</span> <s><span style="background:orange">exportedDEF='RootTransform'</span></s><br> <span style="background:yellow">AS='MyInlineRootTransform'</span> <s><span style="background:orange">AS='I1Root'</span></s>/><br><OrientationInterpolator DEF='MySpinner' <span style="background:yellow">key='0 0.3333 0.6667 1' keyValue='0 1 0 0, 0 1 0 2.094395, 0 1 0 4.18879, 0 1 0 0'</span>/><br><ROUTE<br> fromNode='MySpinner' fromField='value_changed'<br> <span style="background:yellow">toNode='MyInlineRootTransform'</span> <s><span style="background:orange">toNode='I1Root'</span></s> toField='set_rotation'/></span><span style="font-size:12.0pt;color:black"><u></u><u></u></span></p><div style="border:none;border-bottom:solid windowtext 1.5pt;padding:0in 0in 1.0pt 0in"><p class="MsoNormal" style="border:none;padding:0in"><u></u> <u></u></p></div><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">I’ve created and added a pair of scenes to the X3D Examples archives to demonstrate this functionality. Note that the child model has a Text description that remains stable, while the geometry can get animated by the parent model. These paired models conclusively demonstrate that everything is working satisfactorily.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><ul style="margin-top:0in" type="disc"><li class="m_4603382575135679942MsoListParagraph" style="margin-left:0in">X3D Example Archives: Basic, X3D Specifications, Inline Export<u></u><u></u></li><li class="m_4603382575135679942MsoListParagraph" style="margin-left:0in"><a href="https://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/InlineExport.x3d" target="_blank">https://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/InlineExport.x3d</a><u></u><u></u></li><li class="m_4603382575135679942MsoListParagraph" style="margin-left:0in"><a href="https://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/InlineExportIndex.html" target="_blank">https://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/InlineExportIndex.html</a><u></u><u></u></li></ul><p class="MsoNormal"><u></u> <u></u></p><ul style="margin-top:0in" type="disc"><li class="m_4603382575135679942MsoListParagraph" style="margin-left:0in">X3D Example Archives: Basic, X3D Specifications, Inline Import<u></u><u></u></li><li class="m_4603382575135679942MsoListParagraph" style="margin-left:0in"><a href="https://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/InlineImport.x3d" target="_blank">https://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/InlineImport.x3d</a><u></u><u></u></li><li class="m_4603382575135679942MsoListParagraph" style="margin-left:0in"><a href="https://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/InlineImportIndex.html" target="_blank">https://www.web3d.org/x3d/content/examples/Basic/X3dSpecifications/InlineImportIndex.html</a><u></u><u></u></li><li class="m_4603382575135679942MsoListParagraph" style="margin-left:0in"><a><span style="color:windowtext;text-decoration:none"><img border="0" src="cid:ii_18fd4eef9baad7999131" style="width:357px;max-width:100%"></span></a><u></u><u></u></li></ul><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">It was great to see this important functionality working in X3DOM, X_ITE, and Castle Model Viewer. Congratulations and thanks!!<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Correct authoring support for Inline, EXPORT and IMPORT nodes is also supported in X3D-Edit.<u></u><u></u></p><ul style="margin-top:0in" type="disc"><li class="m_4603382575135679942MsoListParagraph" style="margin-left:0in">X3D-Edit is a free, open-source Extensible 3D (X3D) Graphics authoring tool for simple high-quality authoring, editing, import/export, validation and viewing of X3D scenes.<u></u><u></u></li><li class="m_4603382575135679942MsoListParagraph" style="margin-left:0in"><a href="https://savage.nps.edu/X3D-Edit" target="_blank">https://savage.nps.edu/X3D-Edit</a><u></u><u></u></li></ul><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Have fun with X3D4 extensibility! <span style="font-family:"Segoe UI Emoji",sans-serif">😊</span><u></u><u></u></p><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Courier New""><u></u> <u></u></span></p><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Courier New"">all the best, Don<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Courier New"">-- <u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:9.0pt;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:9.0pt;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:9.0pt;font-family:"Courier New"">X3D graphics, virtual worlds, navy robotics <a href="https://faculty.nps.edu/brutzman" target="_blank">https://faculty.nps.edu/brutzman</a><u></u><u></u></span></p><p class="MsoNormal"><u></u> <u></u></p></div></div>_______________________________________________<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" rel="noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
</blockquote></div></div>