[x3d-public] X3DParticleEmitter node inherit fromX3DChildNode(rather than X3DNode)

John Carlson yottzumm at gmail.com
Thu Mar 10 19:19:17 PST 2022


>From what hat I recall, buffers is a grouping node for buffer’s

On Thu, Mar 10, 2022 at 8:41 PM Brutzman, Donald (Don) (CIV) <
brutzman at nps.edu> wrote:

> Sorry I thought we were talking about Metadata examples, not DEF/USE
> id/idref identifier/copy-by-reference kinds of reuse.
>
>
>
> BTW am puzzled by glTF example, it looks like “bufferViews” is intended to
> point to “buffers” but actually points at something called “buffer” which
> does not appear to be defined.  Is “buffer” a reserved term for a different
> data structure, or a misspelling?
>
>
>
> all the best, Don
>
> --
>
> Don Brutzman  Naval Postgraduate School, Code USW/Br
> brutzman at nps.edu
>
> Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA
> +1.831.656.2149
>
> X3D graphics, virtual worlds, Navy robotics https://
> faculty.nps.edu/brutzman
>
>
>
> *From:* Andreas Plesch <andreasplesch at gmail.com>
> *Sent:* Thursday, March 10, 2022 2:29 PM
> *To:* Brutzman, Donald (Don) (CIV) <brutzman at nps.edu>
> *Cc:* Joseph D Williams <joedwil at earthlink.net>; X3D Graphics public
> mailing list <x3d-public at web3d.org>; Jakub Flotyński <
> flotynski at kti.ue.poznan.pl>
> *Subject:* Re: [x3d-public] X3DParticleEmitter node inherit
> fromX3DChildNode(rather than X3DNode)
>
>
>
> NPS WARNING: *external sender* verify before acting.
>
>
>
>
>
> Likely we should create a set of examples from each of the languages
> you’ve listed (and more) to show how to do it.
>
>
>
> Here is a start:
>
>
>
> - svg
>
>
>
> https://developer.mozilla.org/en-US/docs/Web/SVG/Element/defs
> <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%7C71b726f7803c4453578608da02e56444%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637825481566341786%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=SnVCDx91lJdcpdtElaeY7q8EuqvklS1%2FtJHE%2BY%2F3IEo%3D&reserved=0>
>
> https://www.w3.org/html/wiki/SVGElements/defs
> <https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.w3.org%2Fhtml%2Fwiki%2FSVGElements%2Fdefs&data=04%7C01%7Cbrutzman%40nps.edu%7C71b726f7803c4453578608da02e56444%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637825481566341786%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=aUiYIRLUZnwwEQokDtQBjCRKLP0P7tpeqGpnBEfbqX0%3D&reserved=0>
>
>
>
> - glTF
>
>
>
>
> https://www.khronos.org/registry/glTF/specs/2.0/glTF-2.0.html#indices-and-names
> <https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.khronos.org%2Fregistry%2FglTF%2Fspecs%2F2.0%2FglTF-2.0.html%23indices-and-names&data=04%7C01%7Cbrutzman%40nps.edu%7C71b726f7803c4453578608da02e56444%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637825481566341786%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=WXsL2sAj5x5O0qXplpV7fsRW6aR0an0r4X4jKvSmiEw%3D&reserved=0>
>
> by index into a library array
>
>
>
> - a-frame
>
>
>
> https://aframe.io/docs/1.3.0/core/asset-management-system.html
> <https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Faframe.io%2Fdocs%2F1.3.0%2Fcore%2Fasset-management-system.html&data=04%7C01%7Cbrutzman%40nps.edu%7C71b726f7803c4453578608da02e56444%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637825481566341786%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=ZSoNXKKQcGNEoMoE%2FQPJZOY3b2kH%2B4Q2ySULFfyzJ6k%3D&reserved=0>
>
> https://aframe.io/docs/1.3.0/core/mixins.html
> <https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Faframe.io%2Fdocs%2F1.3.0%2Fcore%2Fmixins.html&data=04%7C01%7Cbrutzman%40nps.edu%7C71b726f7803c4453578608da02e56444%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637825481566341786%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=27kABl7V5hTwUd9IjVHXH3zqIsFMfWFveJettlVdPuo%3D&reserved=0>
>
>
>
> - collada
>
>
>
> https://www.khronos.org/files/collada_reference_card_1_4.pdf
> <https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.khronos.org%2Ffiles%2Fcollada_reference_card_1_4.pdf&data=04%7C01%7Cbrutzman%40nps.edu%7C71b726f7803c4453578608da02e56444%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637825481566341786%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=vwKXCN5ZEmHLt6mImNrcCvkoAh0ibEoBgSyhx%2BflXKM%3D&reserved=0>
> : The library_* elements (modules)
>
>
>
> All of those have examples, except for collada. Perhaps I can collect the
> examples and put them onto a wiki page.
>
>
>
> Cheers, Andreas
>
>
>
> PS: Here is a collada conversion of the simple gltf box at
> https://github.com/KhronosGroup/glTF-Sample-Models/blob/master/2.0/Box/glTF/Box.gltf
> <https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FKhronosGroup%2FglTF-Sample-Models%2Fblob%2Fmaster%2F2.0%2FBox%2FglTF%2FBox.gltf&data=04%7C01%7Cbrutzman%40nps.edu%7C71b726f7803c4453578608da02e56444%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637825481566341786%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=QpxauQKjQWMX6h8gkImVz3bBwgWPwIUaSDGglygdFiA%3D&reserved=0>
>
>
>
> <?xml version="1.0" encoding="utf-8"?>
> <COLLADA version="1.5.0" xmlns="
> http://www.collada.org/2008/03/COLLADASchema
> <https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.collada.org%2F2008%2F03%2FCOLLADASchema&data=04%7C01%7Cbrutzman%40nps.edu%7C71b726f7803c4453578608da02e56444%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637825481566341786%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=Qva0eEoVLsNK7oSp6aq51cMcKFG%2By7XklLsyYY3PW94%3D&reserved=0>
> ">
>   <asset>
>     <contributor />
>     <unit meter="1" />
>   </asset>
>   <library_lights />
>   <library_materials>
>     <material id="Red" name="Red">
>       <instance_effect url="#effect-Red" />
>     </material>
>   </library_materials>
>   <library_effects>
>     <effect id="effect-Red" />
>   </library_effects>
>   <library_cameras />
>   <library_geometries>
>     <geometry id="mesh_1">
>       <mesh>
>         <source id="mesh_1-position" name="position">
>           <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>
>           <technique_common>
>             <accessor source="#mesh_1-position-array" count="24"
> stride="3">
>               <param name="X" type="float" />
>               <param name="Y" type="float" />
>               <param name="Z" type="float" />
>             </accessor>
>           </technique_common>
>         </source>
>         <source id="mesh_1-normal" name="normal">
>           <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>
>           <technique_common>
>             <accessor source="#mesh_1-normal-array" count="24" stride="3">
>               <param name="X" type="float" />
>               <param name="Y" type="float" />
>               <param name="Z" type="float" />
>             </accessor>
>           </technique_common>
>         </source>
>         <vertices id="mesh_1-vertices">
>           <input semantic="POSITION" source="#mesh_1-position" />
>         </vertices>
>         <triangles material="default" count="12">
>           <input semantic="VERTEX" source="#mesh_1-vertices" offset="0" />
>           <input semantic="NORMAL" source="#mesh_1-normal" offset="1" />
>           <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>
>         </triangles>
>       </mesh>
>     </geometry>
>   </library_geometries>
>   <library_images />
>   <library_visual_scenes>
>     <visual_scene id="Scene">
>       <node id="Node--0" sid="Node--0" name="Node #0" type="NODE">
>         <matrix>1 0 0 0 0 0 1 0 0 -1 0 0 0 0 0 1</matrix>
>         <node id="Node--1" sid="Node--1" name="Node #1" type="NODE">
>           <matrix>1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1</matrix>
>           <instance_geometry url="#mesh_1">
>             <bind_material>
>               <technique_common>
>                 <instance_material symbol="mat0" target="#Red" />
>               </technique_common>
>             </bind_material>
>           </instance_geometry>
>         </node>
>       </node>
>     </visual_scene>
>   </library_visual_scenes>
>   <library_animations />
>   <scene>
>     <instance_visual_scene url="#Scene" />
>   </scene>
> </COLLADA>
>
>
>
> Test cases welcome.
>
>
>
> all the best, Don
>
> --
>
> Don Brutzman  Naval Postgraduate School, Code USW/Br
> brutzman at nps.edu
>
> Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA
> +1.831.656.2149
>
> X3D graphics, virtual worlds, Navy robotics https://
> faculty.nps.edu/brutzman
>
>
>
> *From:* Andreas Plesch <andreasplesch at gmail.com>
> *Sent:* Thursday, March 10, 2022 1:08 PM
> *To:* Joseph D Williams <joedwil at earthlink.net>
> *Cc:* Brutzman, Donald (Don) (CIV) <brutzman at nps.edu>; X3D Graphics
> public mailing list <x3d-public at web3d.org>
> *Subject:* Re: [x3d-public] X3DParticleEmitter node inherit
> fromX3DChildNode(rather than X3DNode)
>
>
>
> Good comments.
>
>
>    - MetadataSet to have X3DNode nodes
>
> 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.
>
>
>
> 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.
>
>
>
> Not quite sure how validation would be affected.
>
>
>
> I agree that Metadata nodes should be limited to actual metadata but a
> library node seems sensible.
>
>
>
> 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:
>
>
>
> - svg
>
> - glTF
>
> - a-frame
>
> - collada (I believe)
>
>
>
> 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.
>
>
>
> Andreas
>
>
>
>
>
> *From: *Andreas Plesch <andreasplesch at gmail.com>
> *Sent: *Tuesday, March 8, 2022 11:39 AM
> *To: *Brutzman, Donald (Don) (CIV) <brutzman at nps.edu>
> *Cc: *X3D Graphics public mailing list <x3d-public at web3d.org>
> *Subject: *Re: [x3d-public] X3DParticleEmitter node inherit
> fromX3DChildNode(rather than X3DNode)
>
>
>
> 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.
>
>
>
> All the best, Andreas
>
>
>
> On Tue, Mar 8, 2022 at 2:22 PM Brutzman, Donald (Don) (CIV) <
> brutzman at nps.edu> wrote:
>
> 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).
>
>
>
> 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’.
>
>
>
> all the best, Don
>
> --
>
> Don Brutzman  Naval Postgraduate School, Code USW/Br
> brutzman at nps.edu
>
> Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA
> +1.831.656.2149
>
> X3D graphics, virtual worlds, Navy robotics https://
> faculty.nps.edu/brutzman
>
>
>
> *From:* x3d-public <x3d-public-bounces at web3d.org> *On Behalf Of *Andreas
> Plesch
> *Sent:* Tuesday, March 8, 2022 10:11 AM
> *To:* X3D Graphics public mailing list <x3d-public at web3d.org>
> *Subject:* Re: [x3d-public] X3DParticleEmitter node inherit from
> X3DChildNode(rather than X3DNode)
>
>
>
> 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.
>
>
>
> 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.
>
>
>
> SVG also has a NodesLibrary equivalent, the <defs> element:
>
>
>
> https://developer.mozilla.org/en-US/docs/Web/SVG/Element/defs
> <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%7C71b726f7803c4453578608da02e56444%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C637825481566498003%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=fWfdIffjmDjNN%2FLZkZKXD6XecQj%2BHBAlDBeNhIWI%2BjI%3D&reserved=0>
>
>
>
> -Andreas
>
>
>
> Date: Mon, 7 Mar 2022 21:29:41 +0100
> From: Michalis Kamburelis <michalis.kambi at gmail.com>
> To: Joseph D Williams <joedwil at earthlink.net>
> Cc: GPU Group <gpugroup at gmail.com>,  "X3D Public Mailing List
>         (x3d-public at web3d.org)" <x3d-public at web3d.org>
> Subject: Re: [x3d-public] X3DParticleEmitter node inherit from
>         X3DChildNode(rather than X3DNode)
> Message-ID:
>         <
> CAKzBGZNToR-7CmaUzRxBE3xx9J6j2mPgmvKAjQKpGQxjdY_0hA at mail.gmail.com>
> Content-Type: text/plain; charset="UTF-8"
>
> Perhaps I should have written
>
> """
> The nodes within NodesLibrary don't make any effect, they are not
> traversed. They are only to be reUSEd (referenced) by other parts of
> the graph."
> """
>
> This makes the wording consistent with how e.g. Switch is described.
> Sure you have all the nodes in memory, you just don't traverse to
> inactive parts of Switch, LOD, NodesLibrary etc.
>
> Regards,
> Michalis
>
>
>
>
> --
>
> Andreas Plesch
> Waltham, MA 02453
>
>
>
>
>
>
> --
>
> Andreas Plesch
> Waltham, MA 02453
>
>
>
>
> --
>
> Andreas Plesch
> Waltham, MA 02453
> _______________________________________________
> 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/20220310/385a2366/attachment-0001.html>


More information about the x3d-public mailing list