[x3d-public] got Three.js and X3D?

Holger Seelig holger.seelig at yahoo.de
Tue Feb 21 04:16:57 PST 2023


There is no online converter (yet), but there is a Node npx command 'x3d-tidy‘ which uses X_ITE underneath.

https://www.npmjs.com/package/x3d-tidy

With this tool it is possible to convert, compress and minimize or beautify X3D and all other supported formats. 

An online tool is a nice idea. I will see what I can do in the next time.

Best regards,
Holger

> Am 21.02.2023 um 13:00 schrieb Michalis Kamburelis <michalis.kambi at gmail.com>:
> 
> @Holger: Fantastic news!
> 
> Do you maybe have (or plan to have) a simple "online converter" using X_ITE underneath, similar to e.g. https://castle-engine.io/convert.php ? Easy to use for people who may not want to use X_ITE for rendering on their webpage, but just want to convert from https://create3000.github.io/x_ite/#supported-file-formats -> to X3D XML?
> 
> My personal reason for asking: People sometimes ask about using SVG with Castle Game Engine, which we don't support (yet). Of course one can easily convert SVG -> PNG... but with X_ITE, I understand you convert SVG -> X3D nodes with geometry, so it remains 100% scalable. I would love to recommend people "if you want to use SVG in CGE, as a full scalable geometry, go ahead and use X_ITE converter to X3D on xxx".
> 
> Regards,
> Michalis
> 
> wt., 21 lut 2023 o 11:27 Holger Seelig <holger.seelig at yahoo.de <mailto:holger.seelig at yahoo.de>> napisał(a):
>> 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
>> 
>> 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
>> 
>> 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
>>>  
>>>  
>>> 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
>>>  
>>> 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%7C81a7bda9219a40c17d3108db13af7543%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638125416555828348%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Mka63OvSlaulJZnB%2BXUZsDq51AB%2BIdgXIUOqvRJDbpM%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%7C81a7bda9219a40c17d3108db13af7543%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638125416555828348%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=8NTGzV3KouU72GIkYSnPzG%2FwLNabVN21np1ZBcKiA%2Fk%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%7C81a7bda9219a40c17d3108db13af7543%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638125416555828348%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=aLRG4vceNU9S867SdbkZ8y5dJ1oQ2tVn5B3kczmofPI%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
>> 
>> _______________________________________________
>> 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/8ac35315/attachment-0001.html>


More information about the x3d-public mailing list