I have a skeletal mesh I got off of the marketplace. Is it possible to swap the mesh on a bone out with a different mesh? How would I do this?
No, skeletal meshes is one single mesh that drapes over the whole skeleton. That’s kind-of the whole point.
You can do some tricks. If the mesh you want to replace is bigger than what’s in the skeletal mesh, you can add a static mesh bound to the bone in question, and it will render on top of the skeletal mesh.
If that doesn’t work, you can do quite the hack with animation blueprints and sockets:
- Create a socket that’s parented to the same bone that your bone-to-replace is parented to, and in the same location.
- Update the animation blueprint to have the ability to set the scale of the bone you want to replace to 0.
- When “replacing” the mesh for “this bone,” you add a static mesh to the socket you added in 1., and change the appropriate parameter in your animation blueprint to set the scale of the bone in question to 0. (Note: the “position” (offset) still needs to be what it is, only the “scale” part should be changed.)
This will essentially make all the vertices bound to that bone, collapse into the point of that bone, when rendered, which will allow you to render some other static mesh on the socket instead. The socket needs to be parented to the parent of the collapsed bone, else the replacement mesh might also be affected by the collapsing scale!
And, it’s very likely that other parts of the mesh will shrink or stretch when you do this, because many vertices may be weighted to multiple bones, and only the part that’s contributed by your “collapsed” bone will be changed.
Thank you for the detailed explanation. To give a bit more insight into what I’m trying to accomplish, let me give you a more detailed description of what I’m working with. I’m making a cubic voxel game somewhat similar to Teardown. The voxel plugin I’m using to make this game has a component that can be attached to actors to generate a discrete set of voxels. Because I’m working with voxels, I do not want any mesh deformation to occur when animating a character. Rather, I want each of the bones to have it’s own voxel component that will move along with the bone.
Essentially, what I’m looking for is this:
- Can mesh deformation be completely avoided?
- Can components be added to bones/ sockets?
- Is it possible to have a skeletal mesh without a mesh entirely?
- Is there a better way to do this?
I don’t know that it’s easy to animate a skeleton without a skeletal mesh, because the skeletal mesh contains both the “mesh” and the “skeleton” reference.
Components can be added to bones/sockets. This is how you “put a sword in the hand of a player” or whatever. However, the component itself needs to support this.
You could presumably make a skeletal mesh with a single degenerate triangle that doesn’t get rendered, and then attach your voxel components to each of the bones in the skeleton.
Could you expand a bit more on what a ‘degenerate triangle’ is and how I could create a mesh with it?
You create a “skinned mesh” with a skeletal rig in your favorite DCC tool (3ds Max, Blender, Maya, …) and then you delete all triangles except one. Then you move the three remaining vertices to the same exact position, except you give them different texture coordinates so they don’t get merged on export.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.