I have a character using the 3rd Person Character Blueprint for which animation is driven by both bone transformation and morphs. I would like to attach some props to that character (props would be separate skeletal meshes).
What I’ve done so far was to create a socket on the nearest bone where I wanted my prop attached, which worked fine. However, the area where my prop attached is constantly being deformed by an automated morph which leads to the prop clipping throuh the mesh.
I was wondering if there is a way to parent my prop to the nearest polygon of the skeletal mesh surface, rather than simply attaching it to the socket that follows only the nearest bone but not the surface of the mesh. I used to do this in Cinema 4d using the cloth system and belt constraints, but can this be done in UE as well? If so, could someone point me in the right direction of how I could achieve this?
The “position” of a triangle is determined by three separate vertices.
But, more importantly, the position of vertices comes from the shader, and isn’t even available to the CPU – it’s entirely computed in the shader on the GPU.
The CPU needs to know where bones are, for a variety of reasons – you can ask for the position of a bone, attached components/actors have positions, they may interact with collision detection, CPU-based culling, and so on.
Thus, there’s no good way to make a socket/bone be derived from shader-only data. By the time the graphics card renders/computers it, it’s too late – trying to read it back would cause horrible expensive stalls in the rendering pipeline, and very low GPU utilization.
If you have objects/meshes that need to morph with the character (such as a headset/microphone model morphing with the cheek/head shape of a character,) then you need to build those objects/meshes with the same morph channels and movements as the underlying shape, and drive the same morph channels to the same values. That’s a method that works, and gives artistic control, and, unfortunately, it’s a lot of work.