Basically I have a character with a separate bone which controls breathing. I need to attach wires to specific points on the mesh, that need to follow the breathing.
The breathing bone is scaled to simulate breathing, and sockets on the bone don’t follow properly the mesh deformation (probably due to the skin weights)
Is there any way to do this ?
Maybe this can help you:
Thanks. I’ll check that out. cheers
Would i have to compile the plugin ? there isn’t much by way of documentation - I haven’t reached c++ competency yet
Let me compile for you.
UE 5, right? I tried it on 5 and had to change some variable types to make it work but it does
PM me some email address and I can send you the compiled plugin version.
Cheers!
Dany
I’d suggest just animating the cable to move along with the chest before being an actual cable.
So think of it as a cable with an animation blueprint skeletal mesh as the tip of it…
i need this to be dynamic, the breathing rate will change. I also need attachment points at other locations of the body for say an iv cannula etc
The breathing is still going to be governed by an animation, so it would be enough to match speeds on both animations.
The IV probably would not need to have any particular attention put into it. A cable component attached inside the arm will likely look rather natural since it won’t animate differently than the bone itself.
It’s just less cost to do it with an animation, over reading a vertex position at runtime which is actually not really possible even with the given code.
You would have to have the mesh exist and calculate on the CPU. Skinned meshes are optimized for GFX, and usually all their non bone calculations are pushed off to it.
If your chest has a special chest bone that regulates the breathing I suppose you could attach to that - however i’m picturing something slightly more evolved like the tip of an harpoon that needs to be solid before becoming a cable or similar.
If you are using a morph target for the chest breathing, then you would have to do the same for the harpoon to move along, for instance.
It all depends on what end result you want - and how much control of that you want for artistic purposes.
The exact scenario is that i need to place ECG electrodes on the chest, which may be put on or taken off.
Yes, the electrodes can be included in the breathing animation and given a material which can turn them transparent when not needed. The problem is that the cables are external and not in the animation- how do i get the proper attachment point for the cable ? They will run to the ecg machine which has different placements, depending on user.
The arms and leg cannula can probably work fine with sockets with a bit of overlap being permissable.
Really i’d just animate the model and the cables too. Unless the character person is moving - and even if they are - you wouldn’t really need physics applied here.
Paticularly during an ECG you aren’t supposed to move anyway.
The animation of the chest breathing is going to be the determining factor on how you do this. A bone is easier than a morph target.
You can also just add a bone for each electrode and animate it along so you can add a socket and socket the electrode to it.
seem like a good idea … will try, although i did come up with another solution, which involves a line trace to the mesh, which seems to be working, although i’m not sure how performant it would be.
Place socket in approximate location.
doing a line trace from a location beyond the skeletal mesh (red line), attaching white disk to location, and orienting it on the impact normal (yellow arrow)
The disk and cable are components in the character blueprint.
Should work if you are tracing on the visual channel - might bug out with materials though…
Working on the idea you gave, only with the electrodes and cables preanimated with character breathing, dropping to the side of the character, where the ends won’t be moving, then attaching normal cables to those ends.
I guess I should be able to layer other animations in the anim blueprint.
Thanks for the ideas.