[x3d-public] got Three.js and X3D? X_ITE support for .glTF, .glb, .obj, .stl, and .svg

Brutzman, Donald (Don) (CIV) brutzman at nps.edu
Tue Feb 21 09:27:23 PST 2023


Thanks for excellent news Holger!  Very helpful, now tweeted:

*       https://twitter.com/Web3DConsortium/status/1628080128726269952

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: Holger Seelig <holger.seelig at yahoo.de>
Sent: Tuesday, February 21, 2023 2:27 AM
To: Brutzman, Donald (Don) (CIV) <brutzman at nps.edu>
Cc: John Carlson <yottzumm at gmail.com>; X3D <x3d-public at web3d.org>
Subject: Re: [x3d-public] got Three.js and X3D?



I would like to announce that X_ITE now also has support for .glTF, .glb, .obj, .stl, and .svg. 😀



https://create3000.github.io/x_ite/#supported-file-formats<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcreate3000.github.io%2Fx_ite%2F%23supported-file-formats&data=05%7C01%7Cbrutzman%40nps.edu%7Ca6737771084049eae05108db13f628e0%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638125720205416148%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Ysw6EmAbdllm3JXEyIcZLZP6WKgvImvPIhNVGE%2FhEXA%3D&reserved=0>



As well as importing files, X_ITE can output XML, VRML and also JSON now by implementing toXMLString, toJSONString and toVRMLString.



https://create3000.github.io/x_ite/reference/scene-services#string-tovrmlstring-options<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcreate3000.github.io%2Fx_ite%2Freference%2Fscene-services%23string-tovrmlstring-options&data=05%7C01%7Cbrutzman%40nps.edu%7Ca6737771084049eae05108db13f628e0%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638125720205416148%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=X65nF25B7z6DqI97MplpkLiiMIyUGWBuWDHGzNN1ve8%3D&reserved=0>



Best regards,

Holger







   Am 21.02.2023 um 07:39 schrieb Brutzman, Donald (Don) (CIV) <brutzman at nps.edu<mailto:brutzman at nps.edu>>:



   Thanks John, your suggestions pretty closely match mine.  Workflow seems external to X3D4 pathways, typically performed offline.  It seems sensible to avoid intermediate-format conversions if possible, since that offers more potential for “lost in translation” conversion problems.



   Please note that X3D4 specification only supports glTF loading and rendering, not .obj files.  Specification excerpts follow:





   *    X3D4 Architecture, Networking component, 9.4.2 Inline
   *    https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-DIS/Part01/components/networking.html#Inline
   *    The run-time system can support any number of 3D model resource types as long as those follow the abstract model definition (see 2.[RFC2077]), provide a registered content type ( e.g., model/x3d-xml, model/gltf-bin, model/stl, etc.), and can be determined with some form of content negotiation (see 2.[RFC2616]). The run-time system must support at least one X3D type ( e.g., model/x3d-xml) but can also support and negotiate any number of X3D encodings and (optionally) non-X3D representation formats. Support for loading glTF assets (see 2.[GLTF]) also requires support for Shape component level 2 and Lighting component level 4.



   *    X3D4 Architecture, Networking component, Table 9.3 — Networking component support levels
   *    https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-DIS/Part01/components/networking.html#t-supportLevels
   *    Level 4, prerequisites Core 1 and Grouping 1, Nodes/Features and Support:



Model support

Support for glTF models in Inline nodes, in .gltf (model/gltf+json) and .glb (model/gltf-binary) formats.

Requires support for Shape component level 2 and Lighting component level 3.

Minimum required glTF support:

*       transformation hierarchy,
*       meshes,
*       physical materials,
*       loading of external binary data referenced from .gltf files ( e.g., for vertex coordinates).



   *    X3D4 Architecture, Clause 2 Normative references
   *    https://www.web3d.org/specifications/X3Dv4Draft/ISO-IEC19775-1v4-DIS/Part01/references.html#GLTF
   *    GL Transmission Format (glTF) Specification, The Khronos Group, Version 2.0, 2021.
   *    https://github.com/KhronosGroup/glTF/tree/master/specification/2.0<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FKhronosGroup%2FglTF%2Ftree%2Fmaster%2Fspecification%2F2.0&data=05%7C01%7Cbrutzman%40nps.edu%7Ca6737771084049eae05108db13f628e0%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638125720205416148%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=OSVjA8GN3rywetq9mD5%2FZ9mBXNll8uXdb37FGdt9jjw%3D&reserved=0>





   Careful scrutiny of the prose above should reveal that we do not forbid browser support for other formats.  A premier example browser which not only loads and displays numerous formats but typically can also save back out as X3D or VRML:



   *    Castle Game Engine, view3dscene 4.2.0
   *    view3dscene is a viewer for many 3D model formats: glTF, X3D, VRML, Collada, 3DS, MD3, Wavefront OBJ, STL and (2D) Spine JSON and sprite sheets (in CGE, Cocos2d, Starling XML formats).
   *    4.2. Converting to X3D
   *    https://castle-engine.io/view3dscene.php#section_converting<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcastle-engine.io%2Fview3dscene.php%23section_converting&data=05%7C01%7Cbrutzman%40nps.edu%7Ca6737771084049eae05108db13f628e0%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638125720205416148%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=ah3%2FoLvzULRISznxjTZ%2FenOioAmtg%2FtX5Y3k4NDicQI%3D&reserved=0>



   Our master list of conversion and import/export tools follow.  Additions and updates always welcome, anything else out there that anyone wants to recommend?



   *    X3D Resources: Conversions and Translation Tools
   *    https://www.web3d.org/x3d/content/examples/X3dResources.html#Conversions



   *    X3D Resources: Export and Import by Applications
   *    https://www.web3d.org/x3d/content/examples/X3dResources.html#Export



   Have fun with Castle Game Engine view3dscene!  8)



   all the best, Don

   --

   Don Brutzman  Naval Postgraduate School, Code USW/Br        brutzman at nps.edu<mailto: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<http://faculty.nps.edu/brutzman>



   From: John Carlson <yottzumm at gmail.com<mailto:yottzumm at gmail.com>>
   Sent: Monday, February 20, 2023 6:01 PM
   To: Brutzman, Donald (Don) (CIV) <brutzman at nps.edu<mailto:brutzman at nps.edu>>
   Cc: X3D Public Mailing List (x3d-public at web3d.org<mailto:x3d-public at web3d.org>) <x3d-public at web3d.org<mailto:x3d-public at web3d.org>>
   Subject: Re: [x3d-public] got Three.js and X3D?



   My tendency would be to go from X3D to glTF or COLLADA to glTF and then load glTF into three.js.  Also x3d to OBJ looks like a thing with aopt.



   I believe both OBJ and glTF are supported by X3d4.



   OBJ is native to three.js



   If you find a tessellation library in all of this, that would good to know.



   John



   On Mon, Feb 20, 2023 at 5:47 PM Brutzman, Donald (Don) (CIV) <brutzman at nps.edu<mailto:brutzman at nps.edu>> wrote:

      Three.js is an independently developed Javascript library.  Wondering about relationship (if any) for X3D use.  Some X3D folks have used it in the past but am not seeing any common ground at

      •     https://threejs.org/docs/#manual/en/introduction/Loading-3D-models<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fthreejs.org%2Fdocs%2F%23manual%2Fen%2Fintroduction%2FLoading-3D-models&data=05%7C01%7Cbrutzman%40nps.edu%7Ca6737771084049eae05108db13f628e0%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638125720205416148%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=sZDdYqsjPEsRhD7Dx3fc1mtRCEG7JeGGhzB34VtM6p0%3D&reserved=0>

      Searching a little more, found some older posts:

      * https://github.com/dividab/three-x3d-loader<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdividab%2Fthree-x3d-loader&data=05%7C01%7Cbrutzman%40nps.edu%7Ca6737771084049eae05108db13f628e0%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638125720205416148%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=QBJiCHu6wPVIsLOCcGW%2FMErBiqK0CMFevVH%2FZq373no%3D&reserved=0>

      * https://stackoverflow.com/questions/20810737/importing-x3d-files-into-three-js<https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstackoverflow.com%2Fquestions%2F20810737%2Fimporting-x3d-files-into-three-js&data=05%7C01%7Cbrutzman%40nps.edu%7Ca6737771084049eae05108db13f628e0%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638125720205416148%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=TFG%2FfeYBF%2FnWIwceqDEFbHsEMdIK6s4BFWfC%2BATa8cY%3D&reserved=0>

       Apparent overlap: capability for loading glTF models.

       Just curious, thanks for all opinions.  If there is something worth including on X3D Resources, will add it.

      all the best, Don

      --

      Don Brutzman  Naval Postgraduate School, Code USW/Br        brutzman at nps.edu<mailto: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<http://faculty.nps.edu/brutzman>



      _______________________________________________
      x3d-public mailing list
      x3d-public at web3d.org<mailto:x3d-public at web3d.org>
      http://web3d.org/mailman/listinfo/x3d-public_web3d.org

   _______________________________________________
   x3d-public mailing list
   x3d-public at web3d.org<mailto: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/20230221/919df893/attachment-0001.html>


More information about the x3d-public mailing list