Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload more motion clips #119

Open
hjessmith opened this issue Apr 18, 2023 · 12 comments
Open

Upload more motion clips #119

hjessmith opened this issue Apr 18, 2023 · 12 comments
Labels
enhancement New feature or request

Comments

@hjessmith
Copy link
Contributor

No description provided.

@hjessmith
Copy link
Contributor Author

issue #108

@everythingability
Copy link

Er, yeah... I came here to ask this... are the walking motion files etc not in the examples folder?

@hjessmith
Copy link
Contributor Author

@everythingability many of the motion files in the browser demo came from mixamo. It's terms of service prevent me from redistributing the motion data here.

@everythingability
Copy link

Ah. Thanks for letting me know... I'd assumed the Github project was the same as the online web app - and would enable me to do 10ish animations per image.

Me and my cunning plans. I looked at the bvh files to see if I could make an editor of my own to generate those... doable maybe but a lot of work...

I think I may have to make a Captain Pugwash style editor where you draw each limb and pin the joints - and do that rather than using your magic...

Anyway, thanks again... saved me time going down a dead end.

@yihleego
Copy link
Contributor

yihleego commented May 4, 2023

Hi @hjessmith,
I'm sorry to bother you, could you please tell me where I can find this lovely motion (running_jump)?
I didn't find it on the CMU Graphics Motion Capture Lab or Mixamo.

running_jump

@hjessmith
Copy link
Contributor Author

hjessmith commented May 4, 2023 via email

@Manicipal
Copy link

Ah! I just posted this ask as a fresh issue! No worries.

@hjessmith hjessmith added the enhancement New feature or request label Jun 21, 2023
@TadewosBell
Copy link

how did you output the animations from Maximo as BVH files?

@yihleego
Copy link
Contributor

how did you output the animations from Maximo as BVH files?

You can try to use blender to convert FBX to BVH:
image


You can also try this: https://pypi.org/project/bpy/

import bpy

def fbx2bvh(input_fbx_path: str, output_bvh_path: str):
    bpy.ops.import_scene.fbx(filepath=input_fbx_path)
    action = bpy.data.actions[-1]
    frame_start = 9999
    frame_end = -9999
    if action.frame_range[0] < frame_start:
        frame_start = action.frame_range[0]
    if action.frame_range[1] > frame_end:
        frame_end = action.frame_range[1]
    bpy.ops.export_anim.bvh(
        filepath=output_bvh_path,
        frame_start=int(frame_start),
        frame_end=int(frame_end),
        root_transform_only=True)
    bpy.data.actions.remove(action)
    print(f"Done {input_fbx_path} -> {output_bvh_path}")

fbx2bvh("test.fbx", "test.bvh")

@TadewosBell
Copy link

I did find the second piece of code. Thank you. I will give these a try.

@KaiOuYang
Copy link

But when using Blender to convert bvh and apply it to drawing, its actions will always be disordered, such as upside down, why?

@yihleego
Copy link
Contributor

yihleego commented Nov 6, 2023

But when using Blender to convert bvh and apply it to drawing, its actions will always be disordered, such as upside down, why?

Please try using bpy instead of Blender client

You can also try this: https://pypi.org/project/bpy/

import bpy

def fbx2bvh(input_fbx_path: str, output_bvh_path: str):
    bpy.ops.import_scene.fbx(filepath=input_fbx_path)
    action = bpy.data.actions[-1]
    frame_start = 9999
    frame_end = -9999
    if action.frame_range[0] < frame_start:
        frame_start = action.frame_range[0]
    if action.frame_range[1] > frame_end:
        frame_end = action.frame_range[1]
    bpy.ops.export_anim.bvh(
        filepath=output_bvh_path,
        frame_start=int(frame_start),
        frame_end=int(frame_end),
        root_transform_only=True)
    bpy.data.actions.remove(action)
    print(f"Done {input_fbx_path} -> {output_bvh_path}")

fbx2bvh("test.fbx", "test.bvh")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants