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

How can I change the blendshape targets? #46

Open
zsofinyecz opened this issue Feb 23, 2024 · 9 comments
Open

How can I change the blendshape targets? #46

zsofinyecz opened this issue Feb 23, 2024 · 9 comments

Comments

@zsofinyecz
Copy link

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
Copy link
Contributor

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
Copy link
Author

zsofinyecz commented Feb 28, 2024 via email

@zsofinyecz
Copy link
Author

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
Copy link

jvyda commented Sep 9, 2024

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
Copy link
Author

zsofinyecz commented Sep 9, 2024 via email

@EpicGames EpicGames deleted a comment from kalebzaki4 Oct 10, 2024
@booomji
Copy link

booomji commented Oct 29, 2024

"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
Copy link
Author

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
Copy link

xiancg commented Oct 29, 2024

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
Copy link

booomji commented Oct 29, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants