NickHardeman / ofxFBX

FBX SDK addon for OpenFrameworks
MIT License
111 stars 34 forks source link

Is multi layers animation feature supported? #23

Open ggslayer opened 1 year ago

ggslayer commented 1 year ago

Hi, In my scene, I have a human fbx model, which have multi animations: "idle" and "mouse open", and "idle" run looped, "mouse open" duration controlled by my program logic, so , I want run animations concurrently, is this multi layers animation feature supported? please give me some advises, thank you!

NickHardeman commented 1 year ago

Hello, Thank you for checking out the add-on. Transitioning between animations is supported, see https://github.com/NickHardeman/ofxFBX/tree/master/example-AnimTransitions Do different animations affect different parts of the model with different weights? If two animations are playing at the same time, ie. "Idle" and "Run looped" and both affect the entire skeleton, what would the skeleton look like? Do you have an image to help illustration what you are trying to achieve.

ggslayer commented 1 year ago

Than you for relay so quick, I saw the transaction, It's useful for me, but my question is not the transaction.
The two animations is not "idle" and "Run looped", is "idle" and "mouse open", In my situation, the human do idle animation looply, concurrently when the human need to speak, I play another animation called "mouse open". this is common usage in digital human scene. In this situation, I think when mouse open, corresponding mouse skeleton is affect by only "mouse open" animation? I'm not sure. In before I done this in 2d digital human app which used a library called spine2d, In which, have a freature called animation track, the deatil is here: https://esotericsoftware.com/spine-applying-animations. I think this can help me to illustration what I want. thank you again

NickHardeman commented 1 year ago

Ah, I think I understand. Having certain animations apply to specific skeletons? Currently the animations apply to the entire scene. You could export the two separate meshes with animations from your 3D program of choice and then import separately via ofxFBX to have control over each.

This would be a helpful feature!

ggslayer commented 1 year ago

" export the two separate meshes with animations from your 3D program and then import them separately", I think there will have problem, because the "mouse" position is moving in the idle animation loaded by ofxFBX instance A, if I play the "mouse open" in another ofxFBX instance B concurrently, I guess the B's "mouse" position is not the same as A's mouse postion ? and will show two mouse on sceen?

ggslayer commented 1 year ago

I submit the question in of issues again, I want to know if ofAssimpModelLoader can support this?

ggslayer commented 1 year ago

I submit the question in of issues again, I want to know if ofAssimpModelLoader can support this?

ggslayer commented 1 year ago

I think , for fbx file type, ofxfbx is better than osassimpmodleloader on stable. because ofxfbx is based on fbxsdk, I like ofxfbx more, So. I want to request the feature to you, can you add support for this feature? thanks very much

---- Replied Message ---- | From | Nick @.> | | Date | 10/24/2023 23:06 | | To | @.> | | Cc | @.>@.> | | Subject | Re: [NickHardeman/ofxFBX] Is multi layers animation feature supported? (Issue #23) |

Ah, I think I understand. Having certain animations apply to specific skeletons? Currently the animations apply to the entire scene. You could export the two separate meshes with animations from your 3D program of choice and then import separately via ofxFBX to have control over each.

This would be a helpful feature!

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

NickHardeman commented 1 year ago

Hello, currently ofxAssimpModelLoader does not support this feature. I added the feature request to a discussion about ofxAssimpModelLoader https://github.com/openframeworks/openFrameworks/discussions/7722

NickHardeman commented 1 year ago

I have been putting my free time towards improving ofxAssimp and can add this feature in the future, but I don't have a timeline of when this might happen. Each node has an update function that can take an animation index. ofxFBX could be modified to store an animation per skeleton and then passed to each node. https://github.com/NickHardeman/ofxFBX/blob/f032fd43a78a740e7ab4b4f497a61a1654ef9a59/src/ofxFBX.cpp#L321-L332

ggslayer commented 1 year ago

ok, I will waiting for the feature, thank you.

---- Replied Message ---- | From | Nick @.> | | Date | 10/24/2023 23:44 | | To | @.> | | Cc | @.>@.> | | Subject | Re: [NickHardeman/ofxFBX] Is multi layers animation feature supported? (Issue #23) |

I have been putting my free time towards improving ofxAssimp and can add this feature in the future, but I don't have a timeline of when this might happen. Each node has an update function that can take an animation index. ofxFBX could be modified to store an animation per skeleton and then passed to each node. https://github.com/NickHardeman/ofxFBX/blob/f032fd43a78a740e7ab4b4f497a61a1654ef9a59/src/ofxFBX.cpp#L321-L332

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>