<div dir="auto">Please try to import Transforms with the existing importer, which, AFAIK, has PREF_FLAT = True. Then you will see what I am talking about.</div><div dir="auto"><br></div><div dir="auto">I believe when you get call getFinalMatrix for a Blender object, it goes up the x3d tree, looking for Transforms. We need to decide whether HAnim nodes are used in the computation (I think they should be, maybe not HAnimSegment or HAnimDisplacer). I can add the necessary checks back. But doing a HAnim hierarchy in Blender is kind of questionable if PREF_FLAT is True. If a child is assigned a matrix_world and a parent is assigned a matrix_world, will everything just work?</div><div dir="auto"><br></div><div dir="auto">I did set the skeleton’s matrix_world to the result of getFinalMatrix, this might be considered to.</div><div dir="auto"><br></div><div dir="auto"><br></div><div dir="auto">The problem with flattening the hierarchy is, what do we get when exporting? Does the exporter reconstruct the Transform or HAnim</div><div dir="auto">hierarchy? I don’t know the answer to this. My exporter pretty much relies on a hierarchy being present.</div><div dir="auto"><br></div><div dir="auto">John</div><div dir="auto"><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Fri, Nov 8, 2024 at 6:49 PM Joe D Williams <<a href="mailto:joedwil@earthlink.net">joedwil@earthlink.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)"><div style="font-family:arial,sans-serif;font-size:12pt;color:rgb(0,0,0)"><p style="margin:0.1rem 0px;line-height:1;font-family:arial,sans-serif">> <span style="font-family:"Times New Roman";font-size:medium;white-space:normal;float:none;display:inline;color:rgb(0,0,0)"> PREF_FLAT = True (no Transforms).</span> </p>
<p style="margin:0.1rem 0px;line-height:1;font-family:arial,sans-serif"> </p>
<p style="margin:0.1rem 0px;line-height:1;font-family:arial,sans-serif">are you sure that means no transforms in the sense of no transforms, or just flat so that all is drawn in place without unnecessary transforms. The skeleton and related stuff must be in the equivalent of transforms in order to operate as expected. </p>
<p style="margin:0.1rem 0px;line-height:1;font-family:arial,sans-serif">"flatten" is about the first thing a player must do, to get rid of scaling and translations to get the hierarchy 'flat' with everything drawn in place. Then nothing is there but the hierarchy with the stuff in correct space and the thing can run. Also see where the authortime offers to 'zero' everything and rescale all to some size you set. </p>
<p style="margin:0.1rem 0px;line-height:1;font-family:arial,sans-serif"> </p>
<p style="margin:0.1rem 0px;line-height:1;font-family:arial,sans-serif">All Best Regards,</p>
<p style="margin:0.1rem 0px;line-height:1;font-family:arial,sans-serif">Joe</p>
<p style="margin:0.1rem 0px;line-height:1;font-family:arial,sans-serif"> </p>
</div>
<div style="border-left-width:1px;border-left-style:solid;box-sizing:border-box;padding:10px 0px 10px 15px;margin:0px;border-left-color:rgb(170,170,170)">
<p></p></div><div style="border-left-width:1px;border-left-style:solid;box-sizing:border-box;padding:10px 0px 10px 15px;margin:0px;border-left-color:rgb(170,170,170)"><p>-----Original Message-----<br>From: John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>><br>Sent: Nov 8, 2024 3:25 PM<br>To: Katy Schildmeyer KS APPAREL DESIGN <<a href="mailto:katy@ksappareldesign.com" target="_blank">katy@ksappareldesign.com</a>>, X3D Ecosystem public discussion <<a href="mailto:x3d-ecosystem@web3d.org" target="_blank">x3d-ecosystem@web3d.org</a>>, Joe D Williams <<a href="mailto:joedwil@earthlink.net" target="_blank">joedwil@earthlink.net</a>>, Carol McDonald <<a href="mailto:cemd2@comcast.net" target="_blank">cemd2@comcast.net</a>>, Michalis Kamburelis <<a href="mailto:michalis.kambi@gmail.com" target="_blank">michalis.kambi@gmail.com</a>>, <<a href="mailto:hanim@web3d.org" target="_blank">hanim@web3d.org</a>>, Vincent Marchetti <<a href="mailto:vmarchetti@kshell.com" target="_blank">vmarchetti@kshell.com</a>><br>Subject: Re: PREF_FLAT True or False?</p>
<p style="margin:0.1rem 0px;line-height:1"> </p>
<div>
<div dir="auto">What I’ve noted is that that maleWaving.dae loads as a hierarchy of meshes. This is why it exports as a hierarchy of Transforms, and why maleWaving.x3d loads best with PREF_FLAT = True (no Transforms). I believe PREF_FLAT should be a configurable option, if it’s not already. If we want PREF_FLAT to always be True, I will have to revisit HAnim imports, which I am doing anyway (see WIP pull request).</div>
<div dir="auto"> </div>
<div dir="auto">FYI,</div>
<div dir="auto"> </div>
<div dir="auto">John</div>
</div>
<div>
<div><br>
<div class="gmail_quote">
<div class="gmail_attr" dir="ltr">On Wed, Nov 6, 2024 at 6:04 AM John Carlson <<a href="mailto:yottzumm@gmail.com" rel="noopener" target="_blank">yottzumm@gmail.com</a>> wrote:</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">Would you like to choose between a hierarchy of Transforms vs. no Transforms when importing X3D files in Blender? I’ve got some X3D that works one way and others that work the other way. It’s know it’s confusing. It’s kind of dependent on whether there’s HAnim nodes or not. I know I should treat some HAnim like Transforms, but now, I’m not sure. I’m working on a pull request.
<div dir="auto"> </div>
<div dir="auto">Sometimes maleWaving.x3d breaks into many pieces. It has no HAnim, so I make PREF_FLAT True, and all is ok.</div>
</blockquote>
</div>
</div>
</div>
</div>
<p style="margin:0.1rem 0px;line-height:1"> </p></blockquote></div></div>