-
Notifications
You must be signed in to change notification settings - Fork 47
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
Blend Shapes rebuild on export #57
Comments
That is actually by design, Maya2glTF resamples everything, even the morph targets. We do this so you can apply modifiers like smooth after the morphing is done. This avoids redundant blending at runtime Now we only do this for the weight attributes connected to the blend shape modifier. So not only the target shape should be deleted (Maya keeps the deltas in the blend shape modifier anyway even if you delete the target shape), but also the weight attributes must go. One feature that is not yet in Maya2glTF, is to specify what blend weights should be considered static/setup and dynamic/animated. This can be useful when creating and exporting different characters from the same base setup. The exporter should consider all setup weights to create a new base mesh, and recompute the blend target deltas based on that. |
Ya that would be a great feature. What I ended up doing was using the auto rigger blend shapes to create new targets. I then used those targets to create a new blend shape. Then I deleted the old blend shape. Does the flag -ignoreMeshDeformer flag ignore an entire blend shape node? Maybe I can do that to the auto rigger's blend shape and only publish my custom one. |
@mikebourbeauart Oh I think I misunderstood your issue. Do you mean that new |
Ahh ya sorry about that. Yes when I delete a blend shape target from the shape editor it's gone. When I run the exporter it then creates a new target inside the same blend shape during export. This new target gets a name like "w[65]" from my screen shot and contains no weight information (Nothing moves when i turn the weight on or off). This also doesn't happen for every target. I'll send a file when I get home! |
Oh that is really interesting... This blend shape reconstructor is the only place where Maya2glTF modifies your scene: it disconnects the plugs to the weight attributes, setting each weight plug to 1 and others to zero, reading the output mesh, restoring the plug connections. I also do this for deleted shapes, since some artists deliberately delete these, but the blend modifier stores the deltas internally, so it keeps working. However in your case you also deleted the weight plug itself, so it is very strange that it is resurrected. I am not happy with the fact that the exporter modifies the scene, but I don't know a better way to do this. |
Yes, it should do that, but is not very well tested. That's how we do it at WonderMedia, we create a second blend shape "setup" modifier that is excluded when exporting. |
I'm not sure if this is Maya or the exporter but I've deleted a bunch of blend shape targets that are automatically created with an auto rigger. When I go to export the glTF new targets are created for each one that I previously deleted. Will send a file over if need be.
This target is created during export:

The text was updated successfully, but these errors were encountered: