[x3d-public] Possible extensions to x3d.py (subclassing, etc)

John Carlson yottzumm at gmail.com
Wed Nov 1 00:19:15 PDT 2023


The x3d input is is in the archives in HumanoidAnimation/Skin/JoeSkin.x3d.
I am fairly sure it was provided as an attachment, but feel free to get
your own version.  The problem is not with X3dToPython.xslt though.
Modifying the stylesheet enables XML and VRML output from x3d.py on a
consistent basis would be good, but that  stylesheet is not the problem.

As for the other stylesheet you mentioned, I would have to provide XML
Schema and X3DOUM.  Would you like my copies?  The changes to them address
other issues I’ve brought up, like field having the wrong type.  There’s a
lot to swallow at once.  I’m trying to do bite sized chunks as you
requested, but things pile up if not acted on.  Using Joe doesn’t work
because he’s more like a roadblock.  I’m looking for a detour or I’m
building a whole new destination.

You ask for input, then you said don’t send it. I am confused.

I am looking for a full example with skin, skinCoord, joints, skeleton and
motions fields, maybe more.  Maybe Joe can whip one up real quick.  My
guess is he would refer us to JoeKick.  Use the one in the archives.  I’m
fine with that one to start.

I’m moving my development from requiring sourceforge to GitHub.  So I can
share changes with others better, you are welcome to join us.

I’d rather you pick the goal we are working on, I am lost at this point.  I
suggest we start small, like on Metadata node.

I will look at LOA0 after processing my emails.

John

On Tue, Oct 31, 2023 at 11:09 PM Brutzman, Donald (Don) (CIV) <
brutzman at nps.edu> wrote:

> [snip: 4 attachment in large mailing-list message]
>
>
>
>    1. John, as explained many times, the way to change one of the
>    converters (such as X3dToPython.xslt or X3duomToX3dPythonPackage.xslt or
>    x3d.py) is to provide an example input file with a repeatable error.  It is
>    usually not practical for more than one person to make changes at a time.
>
>
>
> What you have provided here requires elaborate reconstruction with no
> clearly stated goal.
>
>
>
>    1. For your file JoeKick.x3d, the authoritative version is online at
>
>
>
>    -
>    https://www.web3d.org/x3d/content/examples/HumanoidAnimation/Skin/JoeKick.x3d
>    -
>    https://www.web3d.org/x3d/content/examples/HumanoidAnimation/Skin/JoeKickIndex.html
>
>
>
> If you have a change to that, please get Joe to agree as author first.  If
> you don’t have a change to that, there is no need to send it.
>
>
>
> I suggested a very clear start with an LOA 0 and then LOA 1 model.  Not
> understanding why you don’t try that instead of continued circling and (for
> me at least) confusion.
>
>
>
> One step at a time please.  Hope this helps.
>
>
>
> 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:* John Carlson <yottzumm at gmail.com>
> *Sent:* Tuesday, October 31, 2023 7:08 PM
> *To:* Brutzman, Donald (Don) (CIV) <brutzman at nps.edu>
> *Cc:* GPU Group <gpugroup at gmail.com>; Joe D Williams <
> joedwil at earthlink.net>; X3D Graphics public mailing list <
> x3d-public at web3d.org>
> *Subject:* Re: [x3d-public] Possible extensions to x3d.py (subclassing,
> etc)
>
>
>
> Don,
>
>
>
> Attached are JoeKick.x3d, JoeKick.py, the python program produced by my
> version of X3dToPython.xslt, my X3dToPython.xslt, and the result .x3d and
> wrl (it really is VRML, despite the JSON in the name) files.  Please view
> the two .x3d files to see the differences. To me, Joe in
> JoeKickPythonToX3d.x3d (the output from JoeKick.py+x3d.py) is totally
> missing.  There are 198 warnings in view3dscene for the file.  If you can
> produce a better python program than my JoeKick.py using your
> X3dToPython.xslt, that produces a better .x3d result than mine, by all
> means, let's see it.  I expect for you to be forthcoming with equivalent
> files for me to confirm for myself.
>
>
>
> If you want to see my X3duomToX3dPythonPackage.xslt please say so (anyone
> can ask).  I also have a JoeKick.py prior to my modifications, but it
> doesn't output anything.
>
>
>
> Joe, don't say anything stupid.  We know what's happening.  If you want
> something to do, fix JoeKick.x3d so view3dscene doesn't spew tons of
> errors, then we'll reconvert to python, and revisit.
>
>
>
> I've checked out another version of sourceforge, so I should have a golden
> copy of X3duomToX3dPythonPackage.xslt, x3d.py, etc.  We can revisit that if
> needed.
>
>
>
> Thanks!
>
>
>
> John
>
>
>
> On Tue, Oct 31, 2023 at 4:27 PM Brutzman, Donald (Don) (CIV) <
> brutzman at nps.edu> wrote:
>
> John, you are free to experimentally subclass or inject as you wish but
> there is no guarantee that such work will be maintainable.
>
>
>
> The way to upgrade x3d.py is to
>
>
>
>    - Show an erroneous output, or
>    - Provide example code showing a broadly useful utility method of some
>    sort.
>
>
>
> Such corrections and improvements can then get autogenerated from X3DUOM
> into x3d.py and then regression tested against X3D Examples.  If
> successfully working they can become part of a future x3d.py release, which
> is entirely open source.
>
>
>
>    - Python package x3d
>    - https://pypi.org/project/x3d
>    <https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpypi.org%2Fproject%2Fx3d&data=05%7C01%7Cbrutzman%40nps.edu%7C51d6689e94354aef643a08dbda7f6cc5%7C6d936231a51740ea9199f7578963378e%7C0%7C0%7C638344013102359618%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=20GjwzRlIAwt0wQitTNZZgyMLeFdlSIg6sQ28d0EnPA%3D&reserved=0>
>
>
> Thanks in advance for all improvements to X3D and x3d.py python library.
>
>
>
> 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 *John
> Carlson
> *Sent:* Tuesday, October 31, 2023 1:53 PM
> *To:* GPU Group <gpugroup at gmail.com>; Joe D Williams <
> joedwil at earthlink.net>
> *Cc:* X3D Graphics public mailing list <x3d-public at web3d.org>
> *Subject:* [x3d-public] Possible extensions to x3d.py (subclassing, etc)
>
>
>
> I’m going to take the approach that x3d.py cannot be modified, and instead
> use subclasses of x3d.py classes to provide order of fields as necessary
> for the Blender X3DV exporter. In particular, HAnimHumanoid XML, VRML and
> JSON methods will be overridden to provide containerField, field ordering,
> etc.
>
>
>
> x3d.py might take a dependency injection approach in the future, such that
> one or more delegates can be replaced.  I believe dependency injection is
> preferred to inheritance or monkey-patching, but X3D is pretty heavy into
> inheritance, or at least interfaces.  Any dependency injection should make
> any changes to output as desired.  I do not agree with totally replacing
> methods, as that is a maintenance nightmare.
>
>
>
> I apologize for all the emails over the last many days.  My mind is not as
> nimble as it could be.   I do not know if I could have arrived at a
> agreeable solution without all the emails.
>
>
>
> Now you know why technical interviews terrify me.
>
>
>
> Thanks everyone for being teddy bears.
>
>
>
> John
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20231101/e627921f/attachment-0001.html>


More information about the x3d-public mailing list