Guide
FPCutter
Hide the head, and any other body part you choose, from the first-person camera without losing the character's shadow. The FPCutter Wizard splits your character's meshes by bone weight and generates a playable copy that uses the split meshes.
On this page
What FPCutter does#
FPCutter reads the bone weights of each SkinnedMeshRenderer and sorts the triangles into body parts: Body, Head, LeftArm, RightArm, LeftLeg and RightLeg. In first person, the parts in Hide In First Person switch to an invisible material. That material writes nothing to the screen but still casts a shadow.
- Non-destructive. Your original character is not changed. The wizard creates a second, complete copy with its own skeleton and Animator, placed beside the original.
- Saved meshes. The generated meshes go to
FPCutter/Generated/<character>/in the asset folder. - Several meshes. A character built from several meshes (for example a suit, a mask and a helmet on one skeleton) works. One controller handles all of them.
Process a character#
Open . The wizard has three steps: Select, Map Bones and Generate.
-
Select. Drag the character root into Character Root. The wizard finds its meshes and Animator automatically. Under Manual Overrides you can set a Target Mesh (drives bone detection and the preview) or an Animator.
The Meshes to Process list shows every
SkinnedMeshRendererunder the root. All are selected by default. Untick the meshes you do not want to cut. -
Map Bones. Click Auto-Detect Bones, then check the fields:
- Root Bone: always required, usually the hips.
- Head Bone: required while Head is on in the settings.
- Left Arm and Right Arm: required while Arms is on.
- Left Leg and Right Leg: required while Legs is on.
-
Generate. Check the settings below, then click Generate First-Person Mesh. The wizard reports how many meshes it processed and where they were saved.
Settings#
The settings are under Advanced Settings in the Generate step:
WeightThresholdWeight Threshold default 0.5- The minimum bone weight (0 to 1) a vertex needs to belong to a body part. Raise it if the head cut bleeds into the neck. Lower it if the head is missing parts.
VertexThresholdVertex Threshold default 2, range 1 to 3- How many vertices of a triangle must match a part before the whole triangle goes to it. 1 makes a greedy cut with jagged edges. 2 or 3 gives a cleaner, weight-based cut.
- Head, Arms, Legs default on, on, off
- Which parts are separated. Parts that are not separated stay in the body mesh.
- Preview Mesh SkinnedMeshRenderer
- The mesh shown in the preview. It can be any selected mesh.
FPCutterController#
The generated copy carries an FPCutterController. It switches the parts between first and third person.
Hide In First PersonList<BodyPart> default Head- The parts that become invisible in first person. Add
Body,LeftArmand so on if needed. Invisible MaterialMaterial- The material for hidden parts. The wizard assigns the shipped
FPCutter_invisiblematerial, which uses theFPCutter/InvisibleShadowCastershader.
Switch the mode in the Inspector with Set First Person and Set Third Person. In Edit Mode, save the scene or prefab afterwards so the state is kept. The same actions are in the component's context menu under and .
At runtime, call the methods of the FPCutter namespace:
using FPCutter;
var cutter = GetComponent<FPCutterController>();
cutter.SetFirstPerson(); // hide the parts in Hide In First Person
cutter.SetThirdPerson(); // show every part
cutter.HidePart(BodyPart.Head); // hide one part
cutter.ShowPart(BodyPart.Head); // show it again
Shadows and the URP shader#
The hidden parts use FPCutter/InvisibleShadowCaster. The shader has two passes:
- A forward pass that draws nothing on screen, so the part is invisible to the camera. It also keeps the shader active when shadows are disabled.
- A shadow caster pass, so the hidden body still casts a shadow. Spot and point lights are handled as well as directional lights.
The shader is tagged for the Universal Render Pipeline, so use it in URP projects only.