Setting Modify Transform Bones ONCE

Hi!

I am making a character customization system. I am using bones to modify the body parts. I got it to work exactly the way I wanted but I fear for performance.

Is there a way to use the Transform Modify Bone node ONCE instead of every frame?

I am planning to do this operation on a lot of characters…
How does it affect performance?

In the graph you can see how I setup the system.

Thank you! :slight_smile:

In CPP definitely.

Or maybe with a post process blueprint perhaps.

What you should do if you are concerned about performance is break apart the skeleton stuff in CPP, so that you can just override bones by configuration or something similar.
The idea is to just find a way to modify the skeletal mes’s skeleton.
Easier said than done probably.

The nodes you are currently using aren’t designed to modify the skeleton once and “keep” those changes.
As such, the next frame starts with the regular bone structure, and has to be modified for use, every tick.
Yes. That is performance heavy.

Look into UPosableMeshComponent too…

hi @MostHost_LA Thank you for your reply :slight_smile:

I am not familiar with post process blueprints, I will look into it.

Doing it in C++ is a great option, though I am primarily a blueprint lover and I was hoping to do it in there. Also, I don’t have enough experience with C++ to tackle this issue there at this moment. But I will keep that in mind.

Indeed that system above is heavy. I actually substituted it for additive animations that I made by posing the skeleton and exporting as a single frame animation asset. it doesn’t give me the same granularity and flexibility as accessing the individual bone values, but it seems a bit better performance wise.
What do you think? Is additive animation faster than modifying the individual bones? (it still happens on tick though…)

I looked into UPosableMeshComponent. Though it would be PERFECT for what I want, I don’t think I would be able to then add an animation blueprint to it. Which is necessary for my project. If I am wrong on that point, please let me know. :slight_smile:

thank you again for your answer :smiley:

The uposablemesh component doesn’t have animations, it just let’s you handle bone positions via code.

You really have to break apart into the c++ to make this performant.
There’s no other way but to allow for the skeleton base bones to be stretched once and preserved, instead of them being modified each frame with computation.

There are probably more than a few marketplace plugins that would let you implement this without having to dive into the c++ to do it yourself…

Theoretically - all a skeleton is, is a conglomerate of name and transforms.

If you can access it in c++ You can also offset its data and save it back onto the reference that’s being used by the system.

You may need to break into it manually if no native functions exist. But you can copy the way that transform/modify bone functions work, and just derive your own function to do the same at the data level of the skeleton.

USkeleton* Skeleton = CharacterMeshVariable->Skeleton;

And then see what properties you can find within Skeleton to work with…

Hi @MostHost_LA , thank you for your reply. I was also thinking I could import 6 or 7 different skeletons representing different body types using retargeted animation and swap them out depending on the player decision, using an enum to choose from them. It would be a workaround, but it would save me a few calculations every frame.

You are right though. Accessing them through c++ would be the best. Thank you!