EpicGames / MetaHuman-DNA-Calibration

https://epicgames.github.io/MetaHuman-DNA-Calibration/
Other
452 stars 118 forks source link

How can I change the blendshape targets? #46

Open zsofinyecz opened 8 months ago

zsofinyecz commented 8 months ago

I am making some strange creatures, and I would like to change the blendshape targets, so the animation works on them. How would i do that?

marijavik commented 8 months ago

Hi @zsofinyecz, we do not have anything to update targets but you could try with command SetBlendShapeTargetDeltasCommand to update bs deltas instead. Would that work? Marija

zsofinyecz commented 8 months ago

Hello Marija, Thank you for answering. I will give ut a try. Gabor On Wed, 28 Feb 2024, 17:27 marijavik, @.***> wrote:

Hi @zsofinyecz https://github.com/zsofinyecz, we do not have anything to update targets but you could try with command SetBlendShapeTargetDeltasCommand to update bs deltas instead. Would that work? Marija

— Reply to this email directly, view it on GitHub https://github.com/EpicGames/MetaHuman-DNA-Calibration/issues/46#issuecomment-1969365427, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2EJDQBEEDPBMW7VLTSIWMLYV5LHXAVCNFSM6AAAAABDXCU27SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRZGM3DKNBSG4 . You are receiving this because you were mentioned.Message ID: @.***>

zsofinyecz commented 8 months ago

Okay, I got somewhere, but now, I run into the problem of how do I save the changes I made in the blendshapes in the .DNA file?

jvyda commented 2 months ago

Okay, I got somewhere, but now, I run into the problem of how do I save the changes I made in the blendshapes in the .DNA file?

I have the same issue. did you manage to save the blendshapes to the .dna

zsofinyecz commented 2 months ago

No not really. I reckon the best bet is to buy some third party software like metapipe. It's a one time investment.

On Mon, 9 Sept 2024, 11:42 Jayant Vyda, @.***> wrote:

Okay, I got somewhere, but now, I run into the problem of how do I save the changes I made in the blendshapes in the .DNA file?

I have the same issue. did you manage to save the blendshapes to the .dna

— Reply to this email directly, view it on GitHub https://github.com/EpicGames/MetaHuman-DNA-Calibration/issues/46#issuecomment-2337633125, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2EJDQH3STFAJNC5FTOCUZDZVVUPZAVCNFSM6AAAAABDXCU27SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZXGYZTGMJSGU . You are receiving this because you were mentioned.Message ID: @.***>

booomji commented 2 weeks ago

"No not really. I reckon the best bet is to buy some third party software like metapipe. It's a one time investment."

I can swap the master face with a different head (same topology) via a morph target using dna tools but not each blend shape. Wonder what metapipe is doing to solve a problem that even dna calib tools cant !

zsofinyecz commented 2 weeks ago

You could essentially change the main face like this: https://dev.epicgames.com/community/learning/tutorials/EoPj/metahuman-dna-calibration-deep-dive and then this should work. What i do now is I essentially build up the facerig for my characters in Unreal if the topology is more dense or very different to metahumans.

xiancg commented 2 weeks ago

I can swap the master face with a different head (same topology) via a morph target using dna tools but not each blend shape. Wonder what metapipe is doing to solve a problem that even dna calib tools cant !

It's actually possible using the DNA API and writing to the geometry layer.

From the docs (you don't need the count parameter if doing this from Python). Also keep in mind you need to write the vertex indices first, and only then the deltas, otherwise you'll get errors: -setBlendShapeTargetDeltas(meshIndex, blendShapeTargetIndex, deltas, count) Sets deltas for each affected vertex. -setBlendShapeTargetVertexIndices(meshIndex, blendShapeTargetIndex, vertexIndices, count) Sets vertex position indices affected by the specified blend shape target. The vertex position indices must be stored in the same order as the deltas they are associated with.

To compute the delta values needed you could use extractDeltas.py by Brave Rabbit.

This way you'd be relying a lot more on blendshapes deformation only though, which is what metapipe does, but if you don't care about performace, then that might be ok.

booomji commented 2 weeks ago

It's actually possible using the DNA API and writing to the geometry layer.

To compute the delta values needed you could use extractDeltas.py by Brave Rabbit.

This way you'd be relying a lot more on blendshapes deformation only though, which is what metapipe does, but if you don't care about performace, then that might be ok.

Thank you. Let me try this out. (right now I cant even get started because it wont work in Maya 2024 embeddedRL4.mll was not found on MAYA_PLUG_IN_PATH

cheers