[X3D-Ecosystem] Don McCurdy gave me the secret to combining animations when exporting glTF
John Carlson
yottzumm at gmail.com
Tue Oct 15 17:12:58 PDT 2024
Not really wanting to get in a huge discussion about +Yup and +Zforward. I
can make the following suggestion to change the blender X3D importer,
realizing this will affect *everyone" who uses the Blender plugin,
hopefully in a positive way (- means remove these lines, + means add the
lines). In the initialization:
@@ -70,8 +70,8 @@ class ImportX3D(bpy.types.Operator, ImportHelper):
"axis_up",
"filter_glob",
))
- global_matrix = axis_conversion(from_forward=self.axis_forward,
- from_up=self.axis_up,
+ global_matrix = axis_conversion(from_forward=self.axis_up,
+ from_up=self.axis_forward,
).to_4x4()
keywords["global_matrix"] = global_matrix
The axis_conversion method is not part of the importer or exporter. We can
also change the global_matrix to something else as well. This affects
*everyone* who uses the blender import/export.
With external scripts, I have only been able to change the Main view such
that JinLOA4 is not lying flat on his back. I can erase the floor, but the
floor looks useful I have been able to look at floor constraints on
objects, but I think we need an object to set the floor constraint for. I
think that's more about where the floor is for an object, not changing the
"stage." Maybe that's another thing I can look up.
We still need to test humanoids with other objects.
John
On Tue, Oct 15, 2024 at 5:02 PM Joe D Williams <joedwil at earthlink.net>
wrote:
> > export_yup=False,
>
> I still think the only reason yup=False is in there because whatever was
> drawn that way in the blender. That is not going to be fun to correct in
> x3d, as we see.
>
> So, this is useless for Humanoid, but probably pass for common geometry
> that needs to be transformed anyway.
>
> So, me still say this is useless operation for HAnim. Get it drawn fight
> in Blender and then export it as we want it, yup=true, +x=model left, model
> faces +z, reference for all measurements are 0 0 0 between feet, and to
> 'human' scale we expect in a standard environment.
>
> Otherwise, the export is useless for hanim because hard to fix, plus
> animations are in danger of getting messed up.
> We would not import joekick with yup=False, right?
>
> Overall, we really don't want the runtime to do a bunch of gyrations and
> transformations to get the thing in "standard' form for operation with
> others in 'standard' form in a 'standard' environment. This is not limiting
> because any authoring tool worth it will give you standard GL coordinate
> system to work in as well as zero functions to present the thing as
> expected.
>
> Thanks for trying but please start where it needs to be started in
> standard GL as the host root coordinate system that is importing skeleton
> drawn in GL coordsys, working in GL coordsys and exporting in GL coordsys.
> Best of Faith in the GL,
> Joe
>
>
>
> -----Original Message-----
> From: John Carlson <yottzumm at gmail.com></yottzumm at gmail.com>
> Sent: Oct 15, 2024 11:54 AM
> To: Joe D Williams <joedwil at earthlink.net>, Katy Schildmeyer KS APPAREL
> DESIGN <katy at ksappareldesign.com>, Michalis Kamburelis <
> michalis.kambi at gmail.com>, X3D Ecosystem public discussion <
> x3d-ecosystem at web3d.org>, Holger Seelig <holger.seelig at yahoo.de></
> holger.seelig at yahoo.de></x3d-ecosystem at web3d.org></
> michalis.kambi at gmail.com></katy at ksappareldesign.com></
> joedwil at earthlink.net>
> Subject: Don McCurdy gave me the secret to combining animations when
> exporting glTF
>
> Blender Python script for exporting glb as a single, combined animation:
> bpy.ops.export_scene.gltf(
> filepath=os.path.join(".",
> f"JoeSkinTexcoordDisplacerKickUpdate2Export.glb"),
> export_yup=False,
> # export_format="GLTF_SEPARATE",
> export_format="GLB",
> export_nla_strips_merged_animation_name='Animation',
> export_animation_mode="ACTIVE_ACTIONS", #"SCENE",
> export_influence_nb=40,
> export_all_influences=True,
> use_active_collection=True
> )
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-ecosystem_web3d.org/attachments/20241015/d5736b2c/attachment-0001.html>
More information about the X3D-Ecosystem
mailing list