[X3D-Ecosystem] Loading into X3DPSAIL (for Maya and Blender)
John Carlson
yottzumm at gmail.com
Tue Jan 27 09:10:14 PST 2026
Yes, X3DPSAIL is x3d.py. I think something else is x3dpsail, some pyjnius
thing. I have a GraalPy code that uses X3DJSAIL now, pretty much superior
to pyjnius.
But we’re speaking of X3DPSAIL. Get lucky!
https://www.web3d.org/x3d/stylesheets/python/python.html
I do have an abandoned repo by the name x3dpsail. Most of my python work
is in X3DJSONLD nowdays. There’s also x3danari, HAnimUtilityKit and ci2had
(coordinate interpolator to hanim displacer). All my X3DUOM work is in
X3DJSONLD, which uses python to generate all kinds of stuff for JavaScript
programs, like my serializers.
I tried to fix my CGE json to scene graph and fixed a few bugs, but
statements, DEF/USE and container fields aren’t handled yet. I don’t think
I have to artificially create containerField or worry about it for JSON, so
I’ll delete that. Be wary that JSON should not have a @containerField
property.
So currently, I set up a Zoom chat to discuss Python loading into Maya,
Blender and Pynari programs. I’m interested in getting good rendering for
X3DPSAIL.
John
On Tue, Jan 27, 2026 at 9:49 AM Bergstrom, Aaron <aaron.bergstrom at und.edu>
wrote:
> John,
>
>
>
> So I am going to show my overall ignorance… and this is probably blasphemy
> for which Don will shoot me, but I don’t know what X3DPSAIL is.
>
>
>
> I don’t use it for anything… unless X3DPSAIL is just “x3d.py” by another
> name, in which case, I use a customized version of x3d.py to write out X3D
> 4.0 nodes and a variety of custom CGE, X_ITE, and X3DOM nodes to disk using
> RawKee’s custom output functions.
>
>
>
> RawKee’s RKSceneTraversal class is capable of writing an x3d.py scenegraph
> to disk using the following encodings: “*.x3d, *.x3dv, *.x3dj, and *.html”.
>
>
>
> If you are asking about a loader, RawKee does not have a real loader and
> probably won’t for the foreseeable future.
>
>
>
> I did write a crude HAnim-only loader, just for importing the default LOA
> skeletons into Maya, but it doesn’t use X3DPSAIL. The loader just assumes
> you’re loading an “*.x3dj” file, and it relies on “import json”.
>
>
>
> With that, I just basically load the JSON file, and then RawKee traverses
> the JSON python structure to extract the data it needs to build a Maya DAG
> using Maya’s internal “joint” nodes.
>
>
>
> After that, I delete the JSON python structure from memory.
>
>
>
> Aaron
>
>
>
> *From:* John Carlson <yottzumm at gmail.com>
> *Sent:* Tuesday, January 27, 2026 3:43 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)
>
>
>
> Frankly, the most reliable thing I can think of right now is converting
> XML to Python, then doing a dynamic import (is there such a thing?), eval
> of a string the python is read into, or ? My vote is for dynamic import,
> if anyone wants to look it up. Here it is from Bing:
>
>
>
> import importlib
>
>
>
> module = importlib.import_module(model_file_basename) # load the X3D
> Python model as a module.
>
>
>
> Then just test for an attribute/function of the model module with "if
> hasattr(module, 'newModel'):" and do the right thing, like
> "module.newModel.XML()" etc.
>
>
>
> Not tested at all. Use responsibly.
>
>
>
> So we don't have an XML loader, but we do have a python loader!
>
>
>
> I'm wondering if Aaron took this approach?
>
>
>
> Not a security hole if your python or XML comes from trusted sources.
> Validate and schematron the XML for as much security as X3D can provide.
> Ultimately, the user has to verify, I think.
>
>
>
> 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/fe6e04e2/attachment-0001.html>
More information about the X3D-Ecosystem
mailing list