[x3d-public] JinLOA4.x3d, Blender, ChatGPT work
Joseph D Williams
joedwil at earthlink.net
Sat May 6 18:42:03 PDT 2023
Hi John,
To me, all that needs to be done for you to see what is happening is continuing the detail of rescaling the jin loa4 to ‘humanoid scale’ by computing the .02whatever x y z scaling done for the humanoid. This gives joint centers placed directly without need to scale the humanoid.
Now to vizualize the skeleton, put a sphere or diamond at 0 0 0 and at each joint center. I think you will find the 0 0 0 to be correctly placed.
Rescaling the geometry of this model is slightly more complicated because some of the segment geometry has a parent transform with a translation. In order to get the geometry in skeleton space, I think to first do the rescaling on the IFS points. If none, or default parent transform, then that is all, the points will be drawn directly in skeleton space.
To work out any parent transform translation first rescale the translation value and use that to finally position the IFS points.
Now the points will be drawn directly in place with the skeleton.
When complete, may have to move the viewpoint, the character should be standing at the correct 0 0 0 facing +z looking just like it did before, but having advantage that it operates in the default parent space, which is same as default humanoid space, same as default skeleton space, same as default segment space, and same as default skin space.
So, when this rescaling is done everything is drawn directly in respective default space(s), which happen to also be same as default animation space.
Starting with a setup like this (everything authored in default space) makes it much easier when creating transportable animations and interactions.
Some authoring systems offer this with a zero button, where you get everything dragged around to correct location then you can tell it where 0 0 0 is then automagically gets rid of all the various translation, rotation, scaling operations otherwise used in the user code or under the covers to position various segment and skin geometries.
Thanks and Best,
Joe
From: John Carlson
Sent: Thursday, May 4, 2023 9:54 PM
To: X3D Graphics public mailing list; Joe D Williams; hanim at web3d.org; Humanoid Animation (H-Anim) Working Group; David Kaplan
Subject: Re: JinLOA4.x3d, Blender, ChatGPT work
I did some exploring around X3D-Edit, looks like Pirouette.x3d (from .bvh importer in X3D-Edit) is loading into view3dscene, FreeWRL and X_ITE (on the website). I don't know what the original animation looks like, but I can't distinguish the humanoid in any of the browsers from opening scene, but from looking at the X_ITE version, the camera looks way off. Once the camera is positioned properly, the model looks okay. I'm not sure what can be done about this? Other MotionAnimation files converted from .bvh look okay camera-wise.
Would it be possible to convert an HAnim LOA4 file from a LOA4 .bvh file?
Pirouette is also here: https://threejs.org/examples/#webgl_loader_bvh
I looked into converting an HAnim .x3d into something like COLLADA (.dae), with X3D-Edit which it seems is used to transfer HAnim into Blender (and glTF?). My guess is most people use MakeHuman, export to COLLADA, then import into Blender. Or convert X3D to COLLADA.
What it the best path to modify the translation of a
X3D, VRML or JSON humanoid from one location to another using scripting or other? I have to find the average of the feet, and translate the humanoid (all centers of joints) by the amount of the average position from 0,0,0, which centers feet around the origin. I do not have a currently approach to do this in JavaScript apparently, and Blender/Python doesn't work because I can't load an Armature from HAnim X3D XML.
I'll start working on the JavaScript again tomorrow.
Thanks!
John
On Thu, May 4, 2023 at 10:40 PM John Carlson <yottzumm at gmail.com> wrote:
Okay! I got *an* armature/skeleton loaded into bpy.data.objects in blender, using the shift+a (add?) keystroke in Blender, I don't have the link now. There are some menus that pop up, select Armature on 1 or 2. I believe that adds an empty armature (one empty bone). Does anyone have a .blend file with an HAnim skeleton/armature in it?
All I'm trying to do is move a skeleton to the origin between its feet at this point, for any skeleton.
If no one has suggestions soon, I will move back to doing this in JavaScript/JSON HAnim, which may not be quite as useful. I will look at X3D-Edit next.
Long term, I want to use something like a humanoid tied to mocap/BVH/TeslaSuit.
Thanks!
John
On Thu, May 4, 2023 at 9:55 PM John Carlson <yottzumm at gmail.com> wrote:
I'm guessing there's something that the Koreans, Nicholas Polys, and Gina-Lauren using for editing skeletons (HAnim nodes). I got stymied in my attempts at loading an HAnim Armature/skeleton (JinLOA4.x3d) into Blender with the X3D import button. Does anyone have code to load an HAnim Armature/skeleton, or have another modeling environment and/or file format which loads HAnim Armatures/skeletons and makes it available for scripting (I want to bring the skeleton to origin)? X3D-Edit?
I'm pretty bamboozled why HAnim is not fully supported in Blender. Should I start putting in effort there, or use X3D-Edit?
What is the format that people use for rigging/skinning that one can bring into popular tools? FBX? glTF? USD? Are those all triangle based?
It would also be good information to plug into ChatGPT so that mere mortals don't go down some rabbit hole.
ChatGPT--Not usable with Blender HAnim Armatures right now (at least HAnim 2.0). Armatures are NOT loaded into bpy, AFAICT. I did see some referenced to adding an armature at index -1? But not really clear on how that works. I'd just like to load in an HAnim file (with import) and get the armature to show up with this script, or a modification of this script:
armature_obj = bpy.data.objects
print(armature_obj)
for arm in armature_obj:
print(arm.type, arm.name)
On Thu, May 4, 2023 at 8:00 PM John Carlson <yottzumm at gmail.com> wrote:
I'll be working on offsetting JinLOA4.x3d to the origin tonight. I'll try to get to scaling tomorrow.
Note that I'm only shifting the skeleton, not geometry, so that's an issue. We're trying to get centers for HAnimJoints in hands and feet.
I'll probably post blender/python code and offset JinLOA4.x3d tonight.
If anyone knows the Joints to average to find offset to move to origin, that would be terrific. I'll look through my code as well.
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20230506/e5410981/attachment.html>
More information about the x3d-public
mailing list