Editing weights during/from a custom animation in Sequencer

Hi

So I’ve set up a custom pose using the default idle animation as a base, from the mannequin/metahuman, in Sequencer. Is it possible to edit the weights whilst using this pose in Sequencer? I know I can edit the weights of the skeleton and during the default idle animation, but my custom pose deforms the mesh more, so it shows a few problem areas that need fixing, compared to the default animation. Is this possible to do?

Or would I need to get the pose right with no more tweaking, save out a new animation sequence, and then edit the weights?

Thanks

Hello there @DustyShinigami!

Checking with my peers, we think that second path of yours would be the best. Skin weights belong to the Skeletal Mesh asset itself, so they can’t be painted directly in Sequencer. But you don’t need to finalize your pose just yet, you can bake it, paint the weights while previewing it, and re-bake anytime you tweak the pose. Here’s how it would go:

  • First, in Sequencer, right-click your character’s Skeletal Mesh track, select “Bake Animation Sequence”, and save it as something like “CustomPose”

  • Then, open your character’s Skeletal Mesh, and in the Preview Scene Settings panel, set “Preview Controller” to “Use Specific Animation”, then pick “CustomPose”. Now the mesh shows your custom pose, with the same deformation you see in Sequencer

  • From there, use the Skeletal Mesh editor’s weight painting tool to adjust any areas you need, checking the result against your custom pose as you go

If you adjust the pose in Sequencer afterwards, you can bake it again over the same animation, and the preview in the Skeletal Mesh editor should update as well. I would also suggest working on a copy, before editing the weights, so you can go back to the original if something goes wrong.

For further details on the process of painting weights, please check the related UE doc:

@brs-sebascova Awesome. Thanks for your suggestion and help. :smiley: Okay, that sounds like a good way of approaching it. There’s just one more thing. As my character is primarily an outfit for the metahuman, and only partial of the metahuman’s head is used/seen, the skeletal mesh only consists of the outfit. The head is separate. There’s some weight tweaks I need to apply to the mask as the head clips through it a bit, but I need to be able to see the head as I’m weight painting. Is there a way of attaching the head/a static mesh to the skeletal mesh?

I did try the socket approach, but the head becomes rotated the wrong way round and the pivot point is positioned far away from it. And I’m not seeing an option to set the pivot manually to rotate and position it manually.

Or would I need to set up the skeletal mesh again but with the head included?

Thanks

Hello again!

I don’t think you need to rebuild here, you should be able to keep outfit and head as separated parts, and just display the head next to the outfit while you paint. As for how to do it, depends on the head, if it’s a skeletal mesh like the regular MetaHuman head, or a static mesh:

  • For the Skeletal Mesh head, the skeletal mesh editor can show extra meshes together with your outfit. To set it up:

    • In the Content Browser, click on Add and search for “Preview Mesh Collection”. Create one, and when it asks for a skeleton, pick your outfit’s skeleton
    • Open it, and add your MetaHuman head mesh to its list
    • Open your outfit’s Skeletal Mesh. In the Preview Scene Settings panel, look for the Additional Meshes section, enable “Allow Different Skeletons”, and assign your Preview Mesh Collection
  • For the Static Mesh head, it’s a matter of properly lining up the head with the outfit:

    • In your outfit’s Skeleton Tree, add the socket to the root bone (instead of the head bone), and attach the head there. If both meshes were made in the same space, the head should land in the right spot
    • If it still appears rotated, select the socket, and adjust its relative rotation in the Details panel

@brs-sebascova Thank you for replying. Unfortunately, I don’t have any option to add additional meshes. :frowning: And searching in the box turns up nothing, too.

Okay, so the option to add additional meshes isn’t there, and it doesn’t appear to be there for the metahuman head and body either, but thank you for sharing the point about adding the socket to the root bone. That has placed the head mesh in the right place. :smiley:

@brs-sebascova I’m also a bit unsure, after adjusting the weight paints, how you add that back into Sequencer. Because currently, the weights appear to be the same from before I made the adjustments. The animation is the same and hasn’t been modified, but it’s the skeletal mesh weights that have been tweaked. So what do I add back into Sequencer and where? Thanks.

@brs-sebascova Also, does this method work with Morph Targets? In my case, adjusting the weights didn’t help with some of the mesh clipping, so I made use of a Morphy Target and pulled the meshes in place. How can I get these changes to update or show in Sequencer?

Hello again!

Glad to hear the socket to root bone method worked. Regarding your other inquiries, let’s go one by one:

  • From what I know, skin weights are saved in the Skeletal Mesh asset, so Sequencer should pick them up automatically, as long as your character is using that same mesh. So, either you are working on a copy, as suggested in the previous post, or the mesh is not accepting the changes. Make sure the asset is properly saved, with the painting applied. Then, in the Details panel, confirm it’s the same mesh you painted. If your outfit goes through the metahuman, that mesh could be a separated one, generated from your source mesh, which would need to be assembled.

  • For a morph target to appear in Sequencer, using a curve should do the trick. From your baked animation, add a curve, and pick your morph target by name. Set the curve’s value to 1 across the animation, then save it. The same effect should be possible with a blueprint, using the “Set Morph Target” node on the skeletal mesh component, with your morph’s name and the value set to 1, just like the curve.

@brs-sebascova Okay, thank you. I did manage to get the Morph Target to show, though I installed the Skeletal Mesh Morph Target Editing Tools plugin and then added the CRU_MorphTargetDriver to the Sequencer along with the name of it. So that’s sorted. :slight_smile:

Regarding the other matter with the skeletal mesh not updating. I figure it’s because I’ve been adding my character’s Blueprint rather than the skeletal mesh itself…? With my character’s Blueprint, I have the head mesh and weapon added in the hierarchy etc, and the cloth asset, so I get cloth simulation on play. But nothing else appears to update after adjusting weights in the skeletal mesh. Is it possible to update the skeletal mesh this way? I would have thought it would apply automatically, but it doesn’t appear to. I am using Revision Control/Perforce, so unless some file isn’t being checked out/updated…? Otherwise, I’ve no idea what’s happening. The update shows in the skeletal mesh, but even if my character’s Blueprint is using that same skeletal mesh, the update isn’t showing. Same if I add the animation I’ve saved out of Sequencer.

If I add the skeletal mesh to Sequencer, like I have at the moment, I’m not sure how you would add the cloth simulation. I’ve managed to get the head and weapon added via sockets, at least.

Thanks

@brs-sebascova Also, something else keeps happening that’s causing some confusion. I’ve noticed if I’m tweaking an animation in Sequencer, and then export the animation to tweak the weights of my skeletal mesh with it, the scale of my model changes. It suddenly becomes taller, which messes things up a bit when I re-add the tweaked version back into Sequencer. I’m guessing it’s one of the check-boxes I need to enable/disable on exporting the animation, but I’m not sure which. There is an Export Transforms that’s ticked by default, but surely this is needed if it’s to do with keyframed transforms…?

Thanks

EDIT: Okay, I’ve figured that one out. It’s because I need to check Set Retarget Source Asset. :slight_smile:

@brs-sebascova Hmm. Using the plugin approach for the morph target, it does look to me as though it’s not being applied very well, or fully. So I tried doing your approach with the curve. With the nodes though, I don’t appear to have one for Set Morph Target. Only Set Disable Morph Target. And no option to add mine by name or a value.

Anyone? I’m totally lost with this. I don’t understand why my skeletal mesh isn’t updating when adding the character Blueprint to the Sequencer. :frowning: Even if I add a new one, the weights are wrong around the collar.

In the skeletal mesh:

In Sequencer:

Surely that same skeletal mesh would reflect the changes when applied to the Blueprint? Or is there a step I’m missing?

Ok, that’s quite strange, the collar showing as fixed, then not. I think it’s a matter of organizing this, what has been done so far, and ensuring which version is being shown on your scene:

  • So, you have your outfit for your metahuman. The collar was clipping, and painting weights was the solution. And this shows correctly in the skeletal mesh editor
  • Now, in Sequencer, this mesh is not being used on it’s own, but as part of your character’s BP, bundling together all the parts. And here is where the “old” collar appears
  • It’s possible that something else in your BP is drawing the collar, and it’s not using the version from the skeletal mesh editor. It could be part of the cloth asset

Considering all this, test hiding the cloth component in your BP, and see if that affects the collar. If so, updating the cloth asset should refresh the weights. On the other hand, if nothing changes, then it could be affected by LODs. Check if the collar has LODs in place, or force into LOD1, so the mesh is not affected at all.

@brs-sebascova Thanks for the response. Okay, so I’ve temporarily removed my cloth asset from the Blueprint. Even more strange-ness is happening. So, if I just have the original Methuman skeletal mesh assigned to the body, it shows up in the Blueprint. I hit Compile and Save. But then in Sequencer/the viewport, the body is invisible.

Also, if I hit G, it usually hides things like the lights etc. For some reason now, it hides everything. Including the model. Not sure if I’ve checked some option somewhere for that to happen…?

If I add my custom outfit/skeletal mesh, everything shows except the mask, which is a first.

Again, not sure if this is a Perforce/Revision issue…? That something is being updated, but something else isn’t…?

I’ve also set up two Sequencers - one with the Blueprint that doesn’t appear to update and show the changes made, and one by adding a skeletal mesh instead of the Blueprint. I’ve managed to get everything added to that Sequencer, including the added curve Morph Target, but I don’t know how I’d add the cloth simulation.

@brs-sebascova Okay. So I closed the project down and didn’t save anything, so everything’s reverted. There was some weird bug going on there because now everything is displaying correctly. Very weird. Body, mask… everything is showing. The cloth asset has been removed, so simulation doesn’t work, and the mask and collar are displaying correctly! If I delete the animation I modified that includes the Morph Target, the mesh shows the areas where the head pokes through. I add the animation and the Morph Target gets applied with it.

So you’re right - it is the cloth asset that’s the issue. :smiley:

@brs-sebascova I’ve added the cloth asset back and the modifications are still all present, which is great. However, I always seem to have this issue if I assign my skeletal mesh to the character’s Blueprint… If I run the simulation, it looks and acts as though there are two meshes - one static and the one that’s simulating.

So I’ve read that using a cache manager is the way of getting cloth simulation to work in Sequence. Is this the only way? Or are there others? I didn’t have much luck when I tried it. The positions of everything break, even if I undo or delete it and start over.

Okay, I’ve followed this tutorial, which, for the most part works, but unsurprisingly, the cloth cache simulation isn’t recording. :frowning: I’m not sure if I’m adding the right component though. To begin with, I set it to Cloth (Chaos Cloth). That hasn’t worked. And then I set it to Body. That hasn’t worked, either. But it’s not helping that I still have this duplicate issue, which I can’t work out why.

UnrealEditor_TWFw8zkzZC

I’ve been through the nodes for the Cloth Asset, and even tried removing/replacing some of them, but it hasn’t helped. Or it breaks things.

Hello again!

Checked with my peers again, I think that duplicate is not coming from the cloth nodes, so no need to change those. Most likely, the coat is being drawn twice, one by your skeletal mesh, and one by your cloth component.

To fix it, tell the Skeletal Mesh to stop drawing it, by opening it, searching the Details panel for the LOD section, and disabling the coat section. Save then changes, and test again. If the coat shares materials with another piece of the outfit, that will dissapear too. In that case, the coat will need it’s own material (reimport the asset if necessary).

Now, regarding cache manager, unless you want to see the cloth move while manipulating the timeline manually, you don’t really need it. For a final render, it would be better to use MRQ directly.