[x3d-public] Blender importer plans (HAnim to Blender)

John Carlson yottzumm at gmail.com
Fri Dec 29 19:11:55 PST 2023


Here’s how to add weights to bones (joints) in blender:

https://blender.stackexchange.com/questions/24170/how-to-assign-vertex-groups-and-bone-weights-through-blenders-python-api

I can’t find anything obvious about adding sites and segments (transforms)
to joints (bones) on Blender import with the Blender Python API.

Hmm!


On Fri, Dec 29, 2023 at 8:13 PM John Carlson <yottzumm at gmail.com> wrote:

> Here’s some example code for HAnim joints to Blender bones which could be
> generalized for Blender import:
>
>
> https://github.com/coderextreme/X3DJSONLD/blob/master/blend/blenderskeleton.py
>
> One could add HAnim sites, segments and weights.  I can “export” these
> things, but I have no experience with Blender import. Sites and segments
> can translate to transforms(?), but weights are kind of mysterious, and
> will require some searching online.
>
> I do not currently know how to attach anything to bones, but bones
> themselves.
>
> John
>
> On Fri, Dec 29, 2023 at 7:53 PM John Carlson <yottzumm at gmail.com> wrote:
>
>> There’s a very good “mapping” from X3D to Blender here:
>>
>>
>> https://github.com/Web3DConsortium/BlenderX3DSupport/blob/main/io_scene_x3d/import_x3d.py
>>
>> Starting at line 1487.
>>
>> I suggest we use this code going forward for any Blender X3D importer.
>>
>> The JSON conversion to nodes call can be added around line 3526.
>>
>> There seem to be 2 tasks:
>>
>> 1. Converting JSON to nodes, like what is done for XML and WRL.
>>
>> 2.  Converting HAnim to appropriate Blender structures (bones and named
>> transforms)
>>
>> Probably I would be best qualified for JSON processing and Doug could
>> work on the second task?  Anyone else want to volunteer?
>>
>> Could we leverage the io_scene_x3dv addon for JSON?
>>
>> Thanks!
>>
>> John
>>
>>
>> On Fri, Dec 29, 2023 at 6:46 PM John Carlson <yottzumm at gmail.com> wrote:
>>
>>> Here are my current plans for HAnim import into Blender.
>>>
>>> 1. Upgrade current WRL and X3D importer to current HAnim standards.
>>> Convert joints to bones and sites and segments to transforms, include
>>> geometry attached to skeleton, sites and segments.  Convert
>>> OrientationInterpolators to keyframe animation.
>>>
>>> 2.  Possible JSON to DOM conversion in Python.
>>>
>>> 3.  I don’t have current plans to use x3d.py due to difficulty to read
>>> in various encodings.  Help would be appreciated.
>>>
>>> John
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20231229/ab37214f/attachment.html>


More information about the x3d-public mailing list