[X3D-Ecosystem] Loading into X3DPSAIL (for Maya and Blender)
John Carlson
yottzumm at gmail.com
Tue Jan 27 10:17:35 PST 2026
I am now considering traversing the Blender object hierarchy and exporting
“Blender XML,” such that I can translate Blender object structures directly
to XML. Then I will work towards translating X3D XML to Blender XML for
loading using Blender XML examples, and write a Blender XML import for
Blender. Maybe I should use JSON? What extension should I use?
Somehow this seems very brittle.
H**k,
John
On Tue, Jan 27, 2026 at 11:16 AM John Carlson <yottzumm at gmail.com> wrote:
> I’m totally on board with that for X3D encodings in general, but I’m
> currently narrowing down to using an X3D Python “encoding,” not a binding.
>
> On Tue, Jan 27, 2026 at 10:39 AM Bergstrom, Aaron <aaron.bergstrom at und.edu>
> wrote:
>
>> All,
>>
>>
>>
>> I keep a python dictionary that I pass a node type to in the form of a
>> string, and it returns an x3d.py node object.
>>
>>
>>
>> I keep a custom version of x3d.py to which I’ve added CGE, X_ITE, and
>> X3DOM (sort of) node classes, so I can also export experimental nodes such
>> as a CGE Skin, X_ITE material extensions, or X3DOM CommonSurfaceShader.
>>
>>
>>
>> The dictionary includes all of the X3D 4.0 node types, as well as a
>> variety of pending 4.1 nodes and browser specific nodes as described above.
>>
>>
>>
>> It basically looks like this:
>>
>>
>>
>> def instantiateNodeFromString(x3dType):
>>
>> x3dNodeMapping = {
>>
>> ####################################### A
>>
>> 'AcousticProperties':AcousticProperties,
>>
>> 'Analyser':Analyser,
>>
>> 'Anchor':Anchor,
>>
>> 'AnisotropyMaterialExtension':AnisotropyMaterialExtension, #
>> X_ITE - glTF extension
>>
>> ***snip***
>>
>> 'VolumeData':VolumeData,
>>
>> 'VolumeEmitter':VolumeEmitter,
>>
>> 'VolumePickSensor':VolumePickSensor,
>>
>> ####################################### W
>>
>> 'WaveShaper':WaveShaper,
>>
>> 'WindPhysicsModel':WindPhysicsModel,
>>
>> 'WorldInfo':WorldInfo
>>
>> }
>>
>>
>>
>> return x3dNodeMapping[x3dType]()
>>
>>
>>
>>
>>
>>
>>
>> Aaron
>>
>>
>>
>> *From:* John Carlson <yottzumm at gmail.com>
>> *Sent:* Tuesday, January 27, 2026 1:30 AM
>> *To:* Don Brutzman <don.brutzman at gmail.com>
>> *Cc:* Bergstrom, Aaron <aaron.bergstrom at und.edu>; X3D Ecosystem public
>> discussion <x3d-ecosystem at web3d.org>
>> *Subject:* Re: Loading into X3DPSAIL (for Maya and Blender)
>>
>>
>>
>> I think that Aaron was writing something that converted class names into
>> X3D Python classes (and to scene graph objects?), but I haven’t heard much
>> about it or if he imports X3D directly into Maya or some X3DPSAIL
>> derivative (and then to Maya). I am will to work on something that
>> generates a XML Python loader (from X3DUOM), just realize I haven’t decided
>> on a single loader class or multiple loader classes. Opinions? At least I
>> can take a first crack at it. I probably won’t use AI at all. I’ll study
>> the structure of the Java version, but I do prefer ElementTree over DOM for
>> this use case.
>>
>>
>>
>> Likely, it will be an adjunct to X3DPSAIL.
>>
>>
>>
>> I think the best test for reliability is to do roundtrip testing on the
>> archive, which will also test XML output.
>>
>>
>>
>> John
>>
>> On Mon, Jan 26, 2026 at 6:01 PM Don Brutzman <don.brutzman at gmail.com>
>> wrote:
>>
>> Yes "X3DLoaderDOM.java (load DOM into scenegraph)" was difficult to
>> write, requires manual coding and time-consuming to debug. It works and
>> the generator for it is checked into open source as a key part of X3DJSAIL.
>>
>> -
>> https://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/X3DLoaderDOM.html
>> - (on web3d.org but direct access is blocked, library not is version
>> control since it is large and changeable; copy attached)
>>
>> The PythonX3dSmokeTests.py program builds a lot of snippets of python
>> scene graph. The same approach might be used to walk any X3D tree and
>> construct a python scene graph. If such code works, and is reliable, we
>> can promote that code and integrate it as part of the x3d.py distribution.
>>
>> -
>> https://www.web3d.org/x3d/stylesheets/python/examples/PythonX3dSmokeTests.py
>>
>> all the best, Don
>>
>> --
>>
>> X3D Graphics, Maritime Robotics, Distributed Simulation
>>
>> Relative Motion Consulting https://RelativeMotion.info
>>
>>
>>
>>
>>
>> On Mon, Jan 26, 2026 at 2:54 PM John Carlson <yottzumm at gmail.com> wrote:
>>
>> Thanks for fixing the TODO to add XML!
>>
>>
>>
>> I have tried to add Python code which loads JSON into an X3DPSAIL scene
>> graph and failed. I have zero confidence in my ability to load stuff into
>> in memory scene graphs, preferring to load things into DOM first. This
>> applies to much of my work, including JSON validation with X3D XML schema.
>>
>>
>>
>> I am attempting to load JSON into a CGE scene graph, but there’s no real
>> evidence that it works yet. I have a mostly working DOM solution.
>>
>>
>>
>> I realize X3DLoaderDOM.java (load DOM into scenegraph) is a lot of work,
>> and if this was mostly automated, please tell us how if it’s not a
>> national secret. If we have that, then Python might be a lot easier!
>>
>>
>>
>> My overall plan is to push JSON things into DOM for loading, but Aaron
>> might have a good solution for all encodings!
>>
>>
>>
>> I am reminded how Xj3D translated XML into a VRML scene graph. Not
>> ideal, but.
>>
>>
>>
>> My priorities are first CGE, then Blender import. I realize my
>> priorities change a lot. If we had a way to export into Blender from
>> X3DPSAIL, this would make working on X3DPSAIL import much more attractive.
>> Easier said than done.
>>
>>
>>
>> John
>>
>>
>>
>> On Mon, Jan 26, 2026 at 3:51 PM Don Brutzman <don.brutzman at gmail.com>
>> wrote:
>>
>> Regarding C/C++/C# open source, no such library has yet been shared. As
>> with our autogenerated Java and Python libraries, these are strong
>> candidates for autogeneration once proper design patterns are written.
>> Once written, library testing using the X3D Example Archives would be
>> essential for success and straightforward to perform.
>>
>>
>>
>> Regarding X3D loaders in Python for X3DPSAIL, none has been written yet.
>> Please be aware that .x3d files are written in valid XML. Refreshed TODO
>> list:
>>
>> - Python X3D Package x3d.py, X3D Python Scene Access Interface
>> Library (X3DPSAIL)
>> - The x3d.py Python X3D Package supports programmers with Python
>> interfaces and objects for standards-based X3D programming, all as open
>> source.
>> - https://www.web3d.org/x3d/stylesheets/python/python.html#TODO
>>
>> 🔖 <https://www.web3d.org/x3d/stylesheets/python/python.html#TODO> TODO
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> Lots! Much progress continues. For a release-summary log, please see *history
>> log for this page*.
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>>
>> - *TODO: clean up x3d.html documentation autogenerated by pydoc.
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>*
>> - *TODO: We need a "Getting Started" tutorial on this page. This
>> is a good opportunity... who wants to help?!
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>*
>> - *TODO: utility support for loaders from XML (.x3d or .xml),
>> ClassicVRML (.x3dv), VRML97 (.wrl), and JSON (.json or .x3dj) files.
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>*
>> - *TODO: distribution support for Jupyter Notebook (initial
>> example works), Apache Zeppelin notebook, Anaconda distribution of Python,
>> and other data-science platforms.
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>*
>>
>> To facilitate library review, I was recently able to autogenerate Python
>> documentation for x3d.py using the pydoc tool.
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> - *https://www.web3d.org/x3d/stylesheets/python/x3d.html*
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> Please note that each X3D node has the following methods listed.
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> Methods defined here:
>> *HTML5*(self, indentLevel=0)
>> Provide HTML5 output serialization using modified
>> XML encoding with no singleton self-closing elements.
>> *JSON*(self, indentLevel=0, syntax='JSON')
>> Provide *X3D*
>> output serialization using JSON encoding (usable for .json file suffix).
>> *VRML*(self, indentLevel=0, VRML97=False)
>> Provide *X3D*
>> output serialization using VRML encoding (usable for .x3dv or .wrl file suffix).
>> *XML*(self, indentLevel=0, syntax='XML')
>> Provide Canonical *X3D*
>> output serialization using XML encoding (usable for .x3d file suffix).
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> Am thinking the HTML5 method is no longer needed, this was written when
>> X3DOM had trouble with self-closing elements.
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> Thanks for all efforts that might improve x3d.py.
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> all the best, Don
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> -- <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> X3D Graphics, Maritime Robotics, Distributed Simulation
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> Relative Motion Consulting *https://RelativeMotion.info*
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> On Sun, Jan 25, 2026 at 4:18 AM John Carlson <*yottzumm at gmail.com*>
>> wrote: <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> I guess I didn't send this earlier.
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> I did see the standards progress page. For C/C++/C#, are any libraries
>> open source? I’m thinking COIN 3D, OpenInventor, H3D. Maybe others. I
>> see there’s an ISO documentation for each language, but apparently the
>> standard isn’t open source???? I’m looking for opportunities for X3DJSONLD
>> serialization. OpenInventor (COIN 3D) looks super complex.
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> For X3DPSAIL, can you point me at an example of loading XML or DOM into a
>> scenegraph? Maybe I missed something???? I’m looking for something like
>> CreateX3DFromString()??? I realized I can create Python from XML, just
>> like my tools can go from JSON to DOM to Python; but my toolchain isn’t
>> Python. Running stylesheets in Python would be a great example.
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> Looking here: <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>>
>> *https://www.web3d.org/x3d/stylesheets/python/examples/PythonX3dSmokeTests.py*
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> On Sun, Jan 25, 2026 at 12:19 AM Don Brutzman <*don.brutzman at gmail.com*>
>> wrote: <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> Standards planning status appears on the following page.
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> - *X3D Standards Progress | Web3D Consortium*
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>> - *https://www.web3d.org/x3d/progress*
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> Scroll past overview prose to find links to each version completed, in
>> progress and planned.
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> all the best, Don
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> -- <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> X3D Graphics, Maritime Robotics, Distributed Simulation
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> Relative Motion Consulting *https://RelativeMotion.info*
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> On Fri, Jan 23, 2026 at 7:44 PM John Carlson via X3D-Ecosystem <
>> *x3d-ecosystem at web3d.org*> wrote:
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> A quick search reveals this page:
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> *https://wiki.web3d.org/wiki/index.php/X3D_Python_Language_Binding*
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> This link on the page is dead?
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> *https://github.com/Web3DConsortium/X3D/tree/master/ISO-IEC%2019777*
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>>
>> Btw: both 19776-4 and 19776-5 are titled JSON encoding?????
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> ==================================
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> I could start writing a Python binding standard? Except we have three
>> versions, one based on GraalPy/X3DJSAIL and one based on “normal”
>> python-X3DPSAIL, and if course H3D, which AFAIK, has C++ underneath? I
>> believe CGE may also have plans for Python.
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> GraalPy examples are here:
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>>
>> *https://github.com/coderextreme/X3DJSONLD/tree/master/src/main/graalpy/net/coderextreme*
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> Python examples are on the X3D archives, some duplicated here:
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>>
>> *https://github.com/coderextreme/X3DJSONLD/tree/master/src/main/python/net/x3djsonld/data*
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> It seems like the pure python implementation (pythonic) has more sway and
>> implementations, so I am willing to capitulate, even though, in my
>> experience, X3DJSAIL generates better JSON! It was never really my idea to
>> go with a pure python version though, but I don’t know how to install
>> GraalPy in Blender! I will pay anyone $100 if they can make blender run
>> GraalPy for import/export addons on Windows! I’m guessing X3DPSAIL can run
>> stylesheets as well? Perhaps it’s time to convert stylesheets to pure
>> Java, with a stylesheet of course!
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> As far as support, GraalPy is supported by Oracle, and Python is
>> supported by Microsoft (Does Guido still work there?).
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> It would be very nice to have a renderer for X3DJSAIL and X3DPSAIL (see
>> previous post)!
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> Has anyone used Xj3D from GraalPy?
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> ==================================
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> On Fri, Jan 23, 2026 at 8:52 PM John Carlson <*yottzumm at gmail.com*>
>> wrote: <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> Apologies, I just noticed I meant X3D python binding.
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> On Fri, Jan 23, 2026 at 8:50 PM John Carlson <*yottzumm at gmail.com*>
>> wrote: <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> What’s the status of the Python encoding standard? Would my
>> participation help?
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> Instead of spending time on Blender currently, my thought is to go back
>> to developing an “X3D” JSON to CGE scenegraph converter, as that can be
>> developed beyond DOM loading. Does anyone know a good Pascal LLM? I do
>> find begin/end rather tedious.
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> If there’s a lot of demand for a Blender HAnim export currently, I will
>> reconsider. Or X3D to glTF conversion.
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> John <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>> --
>> X3D-Ecosystem mailing list
>> *X3D-Ecosystem at web3d.org*
>> *http://web3d.org/mailman/listinfo/x3d-ecosystem_web3d.org*
>> <https://www.web3d.org/x3d/stylesheets/python/python.html>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-ecosystem_web3d.org/attachments/20260127/b15c4bf4/attachment-0001.html>
More information about the X3D-Ecosystem
mailing list