<div dir="ltr"><div dir="ltr">"<span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:16px">connect it up with an loa4 skeleton"  it has a drop-down list for what rig you want to add. In its install folder I found json files with rig info. Perhaps HAnim LOA rigs could be added to the drop down list by adding json files for them.</span></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 5, 2024 at 11:56 AM 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:1px solid rgb(204,204,204);padding-left:1ex"><div style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:12pt"><p style="margin:0.1rem 0px;line-height:1">The makehuman is a great thing to work on. We just need to connect it up with an loa4 skeleton if not already done). Seems like the number of points and order of points and texture points stay consistent with changes to the mesh taller/shorter and thinner/wider dimensions, so that is fine. However, best would be some consistent versions of skin and skeleton with reduced number of points and lower LOAs.</p>
<p style="margin:0.1rem 0px;line-height:1">  </p>
<p style="margin:0.1rem 0px;line-height:1">Good Going,</p>
<p style="margin:0.1rem 0px;line-height:1">Joe</p>
<p style="margin:0.1rem 0px;line-height:1"> </p>
<p style="margin:0.1rem 0px;line-height:1"> </p>
<p style="margin:0.1rem 0px;line-height:1">. </p>
</div>
<div style="border-left:1px solid rgb(170,170,170);box-sizing:border-box;padding:10px 0px 10px 15px;margin:0px">
<p>-----Original Message-----<br>From: GPU Group <<a href="mailto:gpugroup@gmail.com" target="_blank">gpugroup@gmail.com</a>><br>Sent: Mar 1, 2024 6:28 AM<br>To: John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>><br>Cc: Joe D Williams <<a href="mailto:joedwil@earthlink.net" target="_blank">joedwil@earthlink.net</a>><br>Subject: Re: Preparing for Blender importer/exporter work</p>
<p style="margin:0.1rem 0px;line-height:1"> </p>
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">> If you could make your PBR models accessible in a blender compatible format, that would be great.</div>
<div>Even better: re-install the MakeHuman MPFB2 in blender, and set its Library Settings > materials to PBR. Then you can generate something like 2^128 different permutations of humanoids thanks to several analog slidebars and discrete checkbox options in MPFB. Let's say 100M permutations. And you --as the last person to touch the slidebars -- will have the copyright on the character. </div>
<div>And MPFB / Makehuman already has a system for clothing. That would be a great starting point for garment industry efforts. </div>
<div>> The x3dv exporter currently exports motion as OrientationInterpolators and ROUTEs</div>
<div>In theory x3dv exporter could have another option on the export panel under export animations: [  ] interpolators  [x] HAnimMotion</div>
<div>-Doug</div>
<div>Attached: screenshot of gltf2 exported MPFB2 character with MPFB2 > library settings > materials set to PBR, exported to gltf + images + glb, images exported which include skin and clothing images, and 'apply modifiers' set on gltf2 export panel.</div>
<div> </div>
<div> </div>
</div>
</div>
<br>
<div class="gmail_quote">
<div class="gmail_attr" dir="ltr">On Thu, Feb 29, 2024 at 5:03 PM 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:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="auto">Notes,</div>
<div dir="auto"> </div>
<div dir="auto">I will look into the gltf2 stuff, and perhaps do a pull request, but remember we need to include this in x3dv.py, perhaps as an external file to the .x3d scene, and/or change x3dv.py to include glTF2.  Provide export options, etc.</div>
<div dir="auto"> </div>
<div dir="auto">I have found that the quality of glTF2 suffers, especially because the a the gramps glTF model I used doesn’t support normals like we do in io_scene_x3dv.  So perhaps that’s something that the glTF2 exporter could learn from X3DV exporter.  Try comparing a gramps blender x3dv export vs a blender gramps gltf export.  Try both view3dscene vs sunrize.  Probably you saw similar in FreeWRL.  I’m guessing things have improved.</div>
<div dir="auto"> </div>
<div dir="auto">I do call image.save for the ImageTexture, but perhaps you don’t have my copy/an exception is thrown which I silence.  See:</div>
<div dir="auto"> </div>
<div dir="auto">image.save(), img.save() or something like that in current code.  It could be improved, like you say, include a folder.</div>
<div dir="auto"> </div>
<div dir="auto">I daresay we could do some kind of shader translation to Vulkan, I’m not sure of Vulkan support in X3D.</div>
<div dir="auto"> </div>
<div dir="auto">I have checked in gramps*blend files into X3DJSONLD/blend/ but I’m not sure about distribution.  Use with care.  I just wanted to make sure in case my system died that we had an accessible backup.  There’s other perl code I’ll probably be checking in over the next few weeks.  I know FreeWRL used to be Perl.  This is external scripting to manipulate VRML, I am moving towards external scripting with GraalJS/X3DJSAIL, along with XML conversion to JS.</div>
<div dir="auto"> </div>
<div dir="auto">The x3dv exporter currently exports motion as OrientationInterpolators and ROUTEs in separate files under blender/exp.  I believe this is Vertex Groups in action.  This appears to work well, but there are also PositionInterpolators to deal with (I’m not sure when).  This will probably be required for an entire scene.</div>
<div dir="auto"> </div>
<div dir="auto">I don’t have any experience exporting PBR, that would be valuable to export with X3D4.  Perhaps that’s what’s next on the agenda.</div>
<div dir="auto"> </div>
<div dir="auto">If you could make your PBR models accessible in a blender compatible format, that would be great.</div>
<div><br>
<div class="gmail_quote">
<div class="gmail_attr" dir="ltr">On Thu, Feb 29, 2024 at 4:39 PM GPU Group <<a href="mailto:gpugroup@gmail.com" rel="noopener" target="_blank">gpugroup@gmail.com</a>> wrote:</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div dir="ltr">> Doug, where are you at for Blender and BVH? </div>
<div>John, Joe,</div>
<div>Working on my other lives and hobbies these days, but a few weeks ago I looked again at exporting the Makehuman / MPFB2 from blender and learned a few things needed for exporting gltf2</div>
<div>1. in the MPFB2 menu that slides out from right edge of the main blender viewport > Library Settings > Materials > Skin, Clothing, Eyes - pick one of the PBR types from the drop-down lists for each of those materials because gltf2 exporter can't handle the more complex shader nodes MPFB2 uses for raytracing (if things export as white/gray its because the shader nodes in blender were too complex)</div>
<div>2. on the gltf2 export panel, find 'apply modifiers' and check it. That's because in the scenegrpah under Human.rig > Human > Modifiers and Vertex Groups - various clothing articles are Vertex Groups in the humanoid, and which ones get applied during rendering in blender are set in the Modifiers list, with unused garments being set to ignore. If you don't apply modifiers on export, ALL the clothing vertex groups get exported and it's a mess. I suspect other modifiers that change the shape of the human slightly if not applied will result in the rig not matching the skin very well after export.</div>
<div>3. on the gltf2 export export panel, check export textures - this will export the MPFB skin and clothing textures (set a folder during export so you can find the image files in the file system after exporting)</div>
<div>When I do these 3 things I can display the .gltf2 character in freewrl and view3dscene and it looks good.</div>
<div> </div>
<div>But how to apply all this with x3dv exporter?</div>
<div>I read through the gltf2 code wondering if there was a way to paste your x3dv and b2x functions somewhere, to get the benefits of all the work khronos volunteers did on the gltf2 exporter. It has Apache 2 license, so we can copy and say 'derived from' and add to their copyright statement. </div>
<div>But I didn't finish that analysis. I did make a python program to copy io_scene_gltf2 and change file names and license statement to /io_scene_x3dv (attached). So ready to hack. And there are 3 modules of interest, one that's gltf2 export specific, and would map to your x3dv.py. And a few with names like gltf2_export.py that traverse the node list</div>
<div>So what's missing from your x3dv exporter from gltf2 is the image export, the material shader-node 'gathering' and the apply_modifiers. Whether to copy and paste / combine with gltf2 code or do from scratch I can't say and didn't get far enough with specifics to say what 'gotchas' there are to combining code.</div>
<div>I didn't study gltf2 motion data, but gltf has options to export that, but might not be the way we would do it.</div>
<div> </div>
<div>I looked at 2 versions of io_scene_gltf2 -- the one in Blender 4, and one on what seems to be the github project for it. The latter didn't export gltf2 properly - something wrong with the normal vectors for a simple cube. And most of the changes were for weird edge cases we wouldn't need. So I recommend the blender 4 version if code is going to be borrowed.</div>
<div> </div>
<div>Good luck.</div>
<div>-Doug</div>
<div> </div>
</div>
<br>
<div class="gmail_quote">
<div class="gmail_attr" dir="ltr">On Thu, Feb 29, 2024 at 12:09 PM 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:1px solid rgb(204,204,204);padding-left:1ex">Since AFAlK, we do not have a X3D JSON or VRML Blender importer for python, I am casting around for solutions.  I have a sample VRML language syntax written for ANTLR, which might target Python.  I guess converting from VRML and X3D JSON to XML might be the most expedient solution.
<div dir="auto"> </div>
<div dir="auto">Further work on the Blender io_scene_x3dv exporter for BVH imports may be warranted, but I have one example BVH file converted, including OrientationInterpolators.  More interpolators may be indicated.  Perhaps doing a batch conversion of CMU mocap files to X3D would be warranted.  I have not looked at the X3d-Edit importer recently, I’m guessing it’s ahead of the Blender exporter.</div>
<div dir="auto"> </div>
<div dir="auto">At this point, I’m worried about demand.  It seems like a batch BVH to X3D converter might have some demand.</div>
<div dir="auto"> </div>
<div dir="auto">Doug, where are you at for Blender and BVH?</div>
</blockquote>
</div>
</blockquote>
</div>
</div>
</blockquote>
</div>
</div>

<p style="margin:0.1rem 0px;line-height:1"> </p></blockquote></div>