[x3d-public] Fw: Re: [x3d] Minutes from Nov 12 X3D Blender suppport call
Michalis Kamburelis
michalis.kambi at gmail.com
Wed Nov 13 22:05:48 PST 2024
1. I see there's some talk in this thread about Blender coordinate
system. Let me try to clear things up :)
I would recommend everyone to just fire up Blender and check what it
actually does :) These things are trivial to see in 3D space in
Blender, there's even a helpful gizmo showing axis, you can play
around and verify what coordinate system it uses.
To be clear, Blender doesn't use exactly Direct3D coordinate system
(which I think Joe refers to when he writes "Dx").
The way things are, up to my knowledge:
- Blender, just like glTF, just like X3D, just like (by default)
OpenGL, just like Castle Game Engine, uses right-handed coordinate system.
- This is different than Direct3D that uses left-handed coordinate system.
The "left/right-handedness" is an independent decision from "what is
up by convention":
- Blender, just like 3ds Max, chose Z as "up" vector by convention.
- This is different than glTF, X3D, Unity, Godot, Castle Game Engine
where we chosen "Y up". And that's why various exporters (from glTF,
from X3D...) need an option to "change to +Y up convention".
Disclaimer: talking about "coordinate system" for rendering libraries
like OpenGL or Direct3D is only talking about conventions. They can be
adjusted.
See also graphic on
https://www.reddit.com/r/gamedev/comments/b6ujvb/y_axis_up_or_z_axis_up/
. Yeah, the world is complicated, unfortunately there are a few
decisions and lots of things made different choices :)
2. Converting "up Z" to "up Y" (when both systems are right-handed) is
a matter of rotating the model (around X axis by 90 degrees).
You can explore how it is done by glTF exporter when "+Y Up" is
selected in the GUI by checking out
https://github.com/KhronosGroup/glTF-Blender-IO sources and grepping
for "gltf_yup". You can also experiment by exporting models from
Blender and looking at output (convert it e.g. using Castle Model
Viewer to see X3D).
>From what I can see, it is *not* just adding a top-level rotation,
it's actually rotating all the data inside.
Regards,
Michalis
czw., 14 lis 2024 o 05:18 Joe D Williams via x3d-public
<x3d-public at web3d.org> napisał(a):
>
>
> -----Forwarded Message-----
> From: Joe D Williams <joedwil at earthlink.net>
> Sent: Nov 13, 2024 7:38 PM
> To: Vincent Marchetti <vmarchetti at kshell.com>
> Cc: X3D Ecosystem public discussion <x3d-ecosystem at web3d.org>
> Subject: Re: [x3d-public] [x3d] Minutes from Nov 12 X3D Blender suppport call
>
> Hi Vince,
> The basic idea is that x3d is cast in the GL coordinate system where +y is up, model faces +z is toward the viewer, and +x is to the model left, viewer right. Axis rotations follow right hand rule. + is ccw. .
> So for the ideal HAnim source pose before animation all joints and points are 0 0 1 0.
> The host world coord sys is same as hanim model coord sys.
>
> From what I seem to see I think the Blender world coordinate system is +z up and left hand rule for rotations. That is why the gltf needs the +Yup flag, because gltf is cast in GL coord sys.
> I am not sure what that gltf export +Yup flag does to the data from blender. Does it just do that x-axis rotation, or more?
>
> So, this may be called the problem of using a Dx model in a GL system. Converting seems not so easy to export by just rotation of x-axis as shown in the example because joint and point coordinates may not be as expected GL and x3d 0 0 1 0 and animations may be a further problem.
>
> This is opportunity that needs some work.to understand. Right,we need a simple example that shows default x3d model coordinate system and a simple animation in that system,, import to Blender and see what happens, make some simple mods and animations then see what it exports and how it plays in x3d. Turns out that Vulcan is the only khronos that uses what think is the Dx as a basis
>
> John actually has some experience in this in his work with the kicker.
>
> Good Luck, it is Important, since may authoring and run times have chosen the Dx and others something different from either.
>
> All Best,
> Joe
>
>
> -----Original Message-----
> From: Vincent Marchetti
> Sent: Nov 13, 2024 1:24 PM
> To: Joe D Williams
> Cc: X3D Ecosystem public discussion
> Subject: Re: [x3d-public] [x3d] Minutes from Nov 12 X3D Blender suppport call
>
> I have seen this issue brought up before. Is the problem particular to exporting HAnim type models, or is it generic to all Blender to X3D exports
>
> What would help understand and potentially create a solution would be if someone created a .blend file that had
> -- a single shape, with low poly mesh but with a visually obvious front and up direction
> -- that shape oriented in Blender space with the up direction along Blender +Z and the forward direction along Blender -Y, and this achieved without any rotation of the mesh defined in Blender.
>
> Then we can examine X3D exports with various options to see if there's a problem to fix in the code.
>
> Vince Marchetti
>
>
> > On Nov 13, 2024, at 4:03 PM, Joe D Williams wrote:
> >
> > https://github.com/andreasplesch/x3dom/wiki/RiggedSimple-glTF-conversion
> >
> > X3D
> > experimental xml
> > ...
> >
> > Transform DEF='node_0' rotation='1 0 0 1.57
> >
> > This is not good. It shows the thing was drawn +zup.
> > This should be fixed in blender either by fixing blender to do the GL default, not depending on the Transform of the model to put the thing into GL space.
> > Thanks,
> > Joe
> > -----Original Message-----
> > From: Extensible 3D (X3D) Graphics public discussion
> > Sent: Nov 13, 2024 8:00 AM
> > To: Vincent Marchetti , X3D Ecosystem public discussion , ,
> > Cc: Joe D Williams
> > Subject: Re: [x3d-public] [x3d] Minutes from Nov 12 X3D Blender suppport call
> >
> > So, to me for hanim it seems like we must fix Blender at the source.
> > Just about the idea that Blender considers all Joints can affect all points, seems like that is a non-starter. Doesn't this liimit the skeleton-driven skin animation to less than 16 Joint nodes?
> > If so, then Blender needs to be fixed to operate more like x3d hanim, and every other tool, to allow for more skeleton joints(?) Gltf has a suggested? limit of, four joints to affect any point.
> > What am I missing?
> > Thanks for all the great work on this import/export with Blender.
> > Joe
> >
> >
> > -----Original Message-----
> > From: Vincent Marchetti
> > Sent: Nov 13, 2024 6:36 AM
> > To: X3D Ecosystem public discussion ,
> > Subject: [x3d] Minutes from Nov 12 X3D Blender suppport call
> >
> > Minutes from the Nov 12 2024 meeting on Blender 4.2 support for X3D are available for view and comment
> >
> > https://docs.google.com/document/d/1wvjvDpJTMFDMpS53ImuoRHNOCt9zrCiq/edit
> >
> > Vince Marchetti
> >
> >
> > _______________________________________________
> > x3d mailing list
> > x3d at web3d.org
> > http://web3d.org/mailman/listinfo/x3d_web3d.org
> >
> >
> >
> > _______________________________________________
> > x3d-public mailing list
> > x3d-public at web3d.org
> > http://web3d.org/mailman/listinfo/x3d-public_web3d.org
> >
> >
>
>
>
>
>
>
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org
More information about the x3d-public
mailing list