Workflow for creating a nanite static mesh based character? Like AncientOne in Valley of Ancients demo

As only static meshes are supported nanite, that limits to non organic characters, with static mesh’s attached to the skeleton. Cool, I want to try and do that.

Now my question is how on earth did they construct the ancient one for the demo, it is comprised of over 100 static meshes. I’ve tried importing a FBX, and choosing to make nanite static meshes instead of a skeletal mesh. But it just creates a static mesh per object, did they painstakingly construct the mesh hierarchy in the BP_AncientOne blueprint by hand?

When investigating the BP_AncientOne, I see the hierarchy of static meshes. What I don’t see is the mechanism to attach them to a specific bone? I don’t see sockets being used, any special logic in the initialization… what am I not seeing?

1 Like

interested in this workflow as well. I’m currently studying a lot about character creation and about best practices with Nanite but unfortunately there doesn’t seem to be much information for anything as of yet. I suppose it’s best to wait until it is fully released and hope for deep dives on the best practices for that sort of thing.

Bump, any ideas?

Create a blueprint with a skeletal mesh. Then just place your Nanite static meshes under that skeleton in the blueprint hierarchy. Use the Parent Socket attribute to choose which limb its attached to. Regarding the pains-taking nature of the proces, you can probably automate it with some scripting, depending on how many characters you need to set up this way. Or just bite the bullet and do it by hand.

Here’s a jank-tastic version I quickly roughed up:



Thanks for the reply.

I’ve played around with this a good deal. I just have one big stumbling block:

When I have the mesh imported, it’s vertices are already placing it where it needs to be, assuming a zero transform. (See z fighting in first image to confirm this).

Then when I apply it to a socket, it applies the bone’s transform , effectively double transforming the placement of the mesh, sending it way out where it shouldn’t be. To counter act this, I need to do one of two things:

  1. give the mesh a start transform that is the inverse transform of the bone it’s being socketed to. I’m not sure a good way of getting this with in the editor, without painfully going through the skeleton hierarchy applying each transform to the next until i get to my socket.

  2. Some how export the mesh so it’s at the origin of the bone placement (effectively doing step one as part of the export). In playing around with Blender, I can find no good way of doing this.

Any better ideas in how to resolve this?

Youre going to need to export each piece with its intended point of attachment to the bone at the world origin in Blender for this to work how you want I would think. Thats fairly simple to do; then you would attach to the bone in Unreal. If that still creates weird results, create a socket on each bone and preview the mesh on it, move/rotate socket until piece is attached correctly, and then attach to the socket in BP rather than the bone directly.

Or at least thats what I would do, theoretically and without having tried it in your particular context.

Hmm, I’ve tried for way too long to figure out how get a mesh to be positioned/rotated so the origin is the matches the bone in Blender, for exporting. If you have any tips how to do so, please let me know.

I was able to get the inverse transforms for each bone to then plug in for each mesh, and that works well. Obviously it’s a bit painful to do that for each object, but I’m just happy to have something working!

If anyone else needs it: this is how I output each bone component inverse transform:

You don’t really need it to match the bone per se, you want it to leave Blender with no transforms off world 0,0 of its own. That makes it much easier to attach it to things in the engine without it flying off into random space.

That way it just inherits the transform of its new parent, and doesnt add anything extra of its own (visually) that is a result of being exported offset from its own origin.

Beyond that you have the question of which axis the bone is oriented along, which depends on how your rig is built and I have no knowledge on the specifics there. But thats why I suggested creating sockets on the bones you want to attach to - since you can position and rotate these independently in the editor and they will stay attached relative to their parent bone, once you have a cleanly exported mesh piece with its origin at world 0,0 in Blender, you can preview it attached to the socket, move/rotate the socket until your mesh is exactly where its supposed to be relative to the bone, and then when you attach for real in the Blueprint you know it will be correct.

As long as the mesh itself has no unwanted transforms away from the origin at export, the socketing/previewing process in the editor should provide the link you need between bone and mesh that lets you visually line everything up, with a bit of work.

You just need to make sure that the area of the mesh that should visually be its pivot when animating is sitting at the world origin when you export, which you can do by setting the object’s origin to that visual pivot point in Blender, and then snapping the whole object to grid 0,0.

Its essentially the same principle as attaching a sword static mesh to a characters hip, or a gun to their hand. You don’t try to export the weapon mesh in perfect relation to its target skeleton bone, you export it with the area to be attached at 0,0 and then use a socket on the hand or hip bone to place it relative to that bone in the editor.

Setting up the sockets would be kind of a pain in the ■■■ if you have a really complex skeleton and many mesh parts, but it seems the most hassle-free way of accomplishing what youre trying to do that I can think of since lining everything up can be done visually with every socket having its intended mesh previewed and positioned directly in the skeleton editor.

There might be other ways to do this, but thats how I would go about it for the sake of sanity. If you are able to make it work with inverse transforms though, power to you!

Apologies if I repeated myself here, I don’t want to try and teach grandma to suck eggs as the saying goes - I just feel like you may be making this harder on yourself than it should be.

Ahh, I see. Yeah, I was able to get the origin at the bone tip, requiring just a correct rotation. I was having a hard time precisely rotating the mesh so both ends of the bone precisely line up. This was then multiplied when i was trying to pair one end of a mesh to another end i wasn’t entirely sure was in the right spot. This lead to the animations not quite looking right.

Thanks for taking the time to explain!

And hopefully with the release of UE5, we will see a better workflow that doesn’t require so much manual work!