How do I make a single bone accessible at runtime as a reference point on a mesh?!?

I have been all over the internet, and through all docs for Blender and Unity - with no luck. Can anyone tell me how to simply add a Bone / Tag / Node to a mesh that can be exported into my .FBX and be accessible to my runtime???

I’m not talking about an animated character with a full rig. I just want to tag a location in a mesh so that I can attach an effect, joint, etc. to it later. I’ve never seen so much documentation about all aspects of rigging and animating and not found this most humble of tasks covered.

I did everything one can do with Armatures, vertex groups, bone weights, layers, and every other kind of thing to try and simply get a node (tag?, bone?) that I do not want rendered, but simply referenced as a transform.

Can someone please help? Thanks!

Well, you could create an empty object in Unity, position it wherever you like on or in your mesh, and then make it a child of your mesh, wherever the mesh moves so too will the empty object.

If it’s something like attaching a knife into the hand of a character then you could parent the empty to one of the bones in the hand and position it as you like, you can also move it within the parent in code by using local rotations and positions.

Hope that helps

I can see how it may be possible to do this in Unity itself - but I am used to putting tags in meshes in my modelling packages, where artists are able to do the work rather than designers or myself (programmer).

Even if it is possible to do in the Unity editor - is it NOT possible to do in Blender? I can’t imaging such a powerful engine as Unity and such a powerful modeling tool as Blender offer no simple mechanism to identify locations in meshes to be imported via Bones where things can be attached.

In other engines I’ve used (mostly Max based), I can just add a bone somewhere, rip, and then request a bone position / orientation at runtime from code - no more work needed.

Well I’m both an artist and programmer and I find adding the empty objects in Unity to be a better workflow as you can add these nodes as needed and prevent the assets from being unnecessarily cluttered in your modeling package. I would not consider this process to be an artists responsibility as the placeholder node is used for gameplay and not aesthetics.

I haven’t used Blender in many years, but I suppose you could use any primitive object as your placeholder node and then turn off it’s meshRenderer in Unity, thus making it invisible. If I wanted to do something like this with Maya I’d just create a locator as they are interpreted as empty objects in Unity anyway.

I appreciate your responses. It doesn’t make sense to me to make bones, essentially, in the Unity editor because I already had the modeling tool going where I had all the info. For instance, I have a car model with tires. I want to remove the tires, to be put on later. I can easily put a tag right where the tire was located, when I am in the modeling package. In Unity, because I get no direct access to vertex information and have no tools for grouping, etc. I’m just stuck driving things into position with the translate tool. This isn’t nearly as accurate.

I agree I could export actual “meshes” (Bones) from Blender for each one I wanted to use later. Then, I would add new GameObjects with Meshes but without a Mesh Renderer, that I would be positioned correctly if I saved them in their locations relative to what was intended to be their parent object, and then correctly parented them to the GameObject using their parent mesh in the Unity editor. Talk about messing up the Asset tree though!

There are “Empty” objects in Blender - but I’ve been messing around with them now for an hour or so, and there seems to be no way to use those either.

This seems like a huge oversight to me. It doesn’t seem like it would be too much to ask to just let my artists establish attachment positions for things they know need to be attached to complete their content. Then I, as the programmer, will instantiate and move things to those positions at runtime. How can no one else be wanting to do this?! Or maybe they are, and there is a way neither of us knows???

I’m giving up on trying to do this tagging work in Blender, for the time being anyway. I agree there are ways to do this in the Unity editor, but that workflow is way less intuitive than in several other engine’s I’ve worked with. Unity seems so good in so many ways, I’m surprised this functionality seems to be lacking.

Well I’d imagine few people are using Blender in a professional workflow, and you can do this fine with locators in Maya, I’m sure there’s something similar for 3d max too, so it may not be a problem for too many people. Saying that though Blender and Unity are very commonly used hand-in-hand as both are affordable for Indie devs, i.e free hehe

What I would do for your tire problem, is center the pivot of the tire in Blender to where you want the attach and detach node located, and then once I’ve imported the mesh, in Unity select the tire and hit F to focus the camera on the tire (Not sure if being in center or pivot mode makes a difference here), then select your empty object and hit cmd_alt_f to snap your empty to the focal point of the camera, which is now your tires pivot point.

If moving the tires pivot is an issue you could use a sphere or other primitive in place of the pivot point, then delete the primitive when you’re done. I agree it is quite convoluted though, but it seems this is a problem with Blender and not with Unity.

There are other new snapping tools in Unity 3 that are probably worth taking a look at too.