How do i hide different parts of a skeletal mesh?

I have a fbx with a body mesh with 4 different heads (also rigged and skinned) in it. I want to use it in UE 4 but hide 3 of them and show only one, how do i do this? One idea i had was to add each head mesh to a child bone of the Head bone (Head_1, Head_2, and so on) and use the Hide/Unhide Bone by Name node in blueprints to do this. I think it might work, but i have no way right now to test it myself. Do you know of a better way to do this? Thank you.

…anyone?

Export the body and each head separately (if it’s blender, select the mesh and the skeleton and export just the selected objects).

Import the body mesh first with the skeleton, then the 3 heads, which you should choose the same skeleton as the body.

In the pawn or character bp add the body skeletal mesh, then add the 3 head components and drag them inside the mesh to attach them to the body.

On the construction script of the bp, use -set master pose component, drag the heads and mesh to the graph and connect them to “target”, then connect the mesh body to “New Master Bone Component”.

Set Hidden in Game for the heads you want to hide.

On the event graph you can then make them visible or invisible at will. The main mesh will drive the animation bp and the heads will always be synchronized and in place because they share the same skeleton.

Just noticed this question was from 2015! LOL but this might help others as well…

3 Likes

Hello,

I’m looking to hide part of my mesh in the skeleton. I have 10 objects connected to an empty. For each object, I have a different animation. It is a Logo. When I import in UE, no problem, I can create a skeleton mesh. I export from blender with the plugins “Better fbx export”. My problem is that few objects have to be hide at the beginning. UE don’t accept that I put the scale of the mesh at 0. If I change the location of my mesh outside of the camera view, the animation is destroy, totally stupid. Do you have an idea to animate the visibility of one mesh without to used materials ?

1 Like

Hi,

Made an example blueprint with 2 meshes that start invisible and flip between visible and invisible on keyboard press for each one.

You may create custom events with the actions, then execute them whenever you want, or just leave them invisible on event begin play with the “Set Visibility” node to unchecked on “New Visibility”.

Zilaan,

Thanks for your answer but maybe I didn’t explain very well ! In my Skeleton Mesh, there are 10 object, ok , there are combine when you import but I would like to know if it’s possible to hide one object in this skeleton because I cannot import with scale of 0 !

Hi JDARRAS, you could export the meshes individually from Blender with the skeleton (on export, tick the checkbox “limit to Selected Objects”).

On UE, import the first mesh with the skeleton, then the others selecting the skeleton from the first mesh. You should have in content browser, all 10 skeletal meshes sharing the same skeleton.

Create an actor blueprint and add all the skeletal meshes as components

On the event graph, you can use the “Set Visibility” to hide or show the specific meshes at will.

If you can only export/import just one mesh, I don’t know any other way other than using materials with an opacity scalar parameter value or an opacity mask, or even a material change from a full transparent/masked one to the original.

1 Like

You can use this material to hide skeletal mesh parts:

1 Like

Thanks for your help

@Zilaan I test and it’s working fine ! Thanks a lot
@unit23 I have to admit that I don’t understand what you are doing in this material. I don’t know where to put this material. I have only one id material for my mesh. How can I make reference to one part or one other ?

JD

If you only have 1 material slot than you can not make different parts invisible - you need a skeletal mesh with more than 1 part.

2 Likes