Skip to content

Using GLTF2 loaded files with <primitive object=...> in ThreeJS Fiber #17

Open
@alankent

Description

@alankent

I am trying to use the current version of the OSSOS library with ThreeJS to take advantage of the retargeting and IK support. I am doing so inside a React app using threeJS Fiber. So I have a <primitive object=...> that I used to use the threejs GLTF loader to load a file and then grab the .scene member to use as the root character.

But the data structure returned by the OSSOS library GLTF2 file loader appears to be a bit different. For example, there is .json instead, and .json.scene exists but has the value of 0, which is not a model.

Can I use OSSOS to get an object compatible with the <primitive object=...> markup used with threejs and fiber?

Note: I am not a deep expert. I was trying to use the threejs retargeting sample code, but it did not work for me. I want to take an animation clip from one model and retarget it to a different bone structure. My fallback is to try and reimplement the whole bone rotation logic you described on the video (which conceptually made sense... but I would rather not have to code it, lol!)

I was trying to apply Mixamo animation clips to a VRM model created by VRoid Studio in case that makes a difference.

Thx for any advice! I could not find much in the way of docs to work it out sorry.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions