Don't pay the CPU cost for bones you don't animate. If your characters aren't using their fingers, fuse them to regain performance by safely shrinking the matrix palette sent to the GPU.BoneFuser: Skinned Mesh Weight OptimizerBoneFuser is a free, Editor-only utility that optimizes Skinned Mesh Renderers by mathematically merging vertex skin weights and shrinking the active bone array.The Skinning OverheadWhile deep transform hierarchies carry a CPU cost, the primary performance bottleneck for rigged characters is the Skinned Mesh Renderer (SMR) skinning evaluation. Every frame, an SMR must send an array of bone matrices (the matrix palette) to the GPU. The shader then looks up these matrices, applies the bone weights (up to 4 per vertex), and calculates the final vertex position.When a mesh is imported with dense extremity bones—such as individual finger joints, toes, or facial nodes—the SMR is forced to iterate through a massive bone array. If a character is an RTS unit, a distant NPC, or wearing heavy rigid gloves, evaluating these complex vertex deformations for barely visible bones creates a compounding, unnecessary drain on performance.A Note from the DeveloperI originally built BoneFuser because I was working with some truly excellent character models made by other Unity artists, but I was frustrated that they included dense extremity bones my specific game simply didn't need. While they weren't completely breaking my frame rate, I hated knowing these unused bones were causing a small, compounding, and totally unnecessary drain on CPU performance.Because this utility safely solved that annoyance for me, I wanted to share it with the community for free to help you cleanly optimize your own third-party assets.If this tool saves you time or gives you some peace of mind regarding your performance budget, the best way to say thanks is to leave a quick rating and review!Feedback Welcome: I am always open to reasonable feature requests or suggestions. Feel free to shoot me a message through my publisher page if you have ideas for improving the tool.More Clean Utilities: If you appreciate non-destructive, zero-bloat Editor workflows, please check out the premium extensions on my Publisher Page. They are built with the exact same philosophy: practical, lightweight, and designed to keep your project architecture clean.How the Optimization WorksSimply disabling child GameObjects in your scene hierarchy does not solve this skinning overhead; the SMR still retains the bone references in its array and allocates memory for them. To actually optimize the pass, the mesh data itself must be modified.BoneFuser automates this process without destroying your original source assets. When you assign a deletion root (e.g., the base of a finger), the tool:Steps through the mesh's vertex data.Identifies all vertices weighted to the targeted bone and its children.Merges and re-normalizes those weights backward up the hierarchy into the nearest surviving parent bone (e.g., the hand).Generates a new, optimized .asset mesh with a reduced SkinnedMeshRenderer.bones array.By shrinking the active bone array, the matrix palette sent to the GPU is reduced, resulting in a cheaper skinning pass. Once the mesh dependency is permanently severed, the targeted transforms become true dead weight and can be safely deleted or disabled from the hierarchy.The Dual-Mode WorkflowBecause rig optimization is highly contextual, BoneFuser operates in two distinct modes to protect your existing project data:Mode 1: Targeted Mesh Mode (Sibling Workflow): Designed for modular clothing or isolated asset extraction. Instead of modifying an entire character, you target specific Skinned Mesh Renderers (e.g., a pair of heavy boots). The tool clones the SMR as a sibling in the hierarchy, assigns the newly optimized mesh data, and deactivates the original. This provides a safe A/B testing environment and leaves the underlying character rig completely untouched, ensuring that un-targeted meshes (like the base body) remain intact.Mode 2: Global Character Mode: Designed for down-resing entire background NPCs or crowds. You assign a character root, and the tool processes every Skinned Mesh Renderer in that hierarchy simultaneously. Because all meshes are stripped of their reliance on the targeted bones, it becomes safe to manipulate the hierarchy. BoneFuser can then automatically disable or destroy those orphaned bone GameObjects (processing bottom-up to prevent standard Unity null reference errors).Limitations & ScopeTo ensure this tool fits your specific use case, please note its practical limitations:It does not reduce polycount: The vertex and triangle counts of your mesh remain exactly the same. Only the underlying transform dependency and matrix palette are optimized.It is not an auto-rigger or retargeter: It will not add bones, generate new weights from scratch, or resize clothing to fit different character proportions.Do not fuse what you need to animate: If your game requires fully articulated, animated fingers, do not fuse them. This tool is strictly for removing articulation from extremities where it is no longer visually necessary.Zero-Bloat FootprintBoneFuser is an Editor-only utility housed within its own Assembly Definition. It contains no demo scenes, textures, or unnecessary tutorial assets. It weighs only a few kilobytes and leaves absolutely zero footprint on your compiled runtime build. Furthermore, because it only manipulates mesh data and bindposes, it is inherently compatible with any render pipeline (Built-In, URP, or HDRP).Support & Additional ToolsThis asset is provided for free to assist other developers in optimizing their projects. If this tool saves you time or improves your performance overhead, please consider leaving a review. If you found this utility practical, you can find other free and premium Editor extensions on my Publisher Page.Technical DetailsAsset Specs & FootprintAsset Type: Editor-only Utility housed in a custom Assembly Definition (.asmdef). Zero runtime execution or build footprint.File Size: Extremely lightweight (KB range). Contains zero demo scenes, textures, or unnecessary project bloat.Dependencies & Pipelines: Zero third-party dependencies. Operates strictly on base Mesh data, making it inherently compatible out-of-the-box with BRP, URP, and HDRP.Under-the-Hood Optimization LogicAlgorithmic Weight Re-Mapping: Maps targeted deletion roots into a HashSet for fast O(1) lookups. A custom WeightAccumulator struct evaluates excluded vertex weights, traverses up the hierarchy to merge them to the nearest surviving parent, and strictly re-normalizes the top 4 influences to a sum of 1.0.Matrix Palette Reduction: Generates a truncated Transform[] bones array to permanently shrink the matrix palette sent to the GPU, directly reducing the vertex shader skinning cost.Bindpose Recalculation: New bindposes are mathematically recalculated for the surviving bones utilizing targetBone.worldToLocalMatrix * smr.transform.localToWorldMatrix to maintain perfect rest-pose integrity.Safe Hierarchy Destruction (Mode 2): When stripping the character rig, the tool calculates the hierarchical depth of orphaned bones and deletes them strictly bottom-up. This mathematically prevents Unity's native cascading DestroyImmediate Null Reference Exceptions.Deterministic Serialization: Optimized meshes are instantiated and saved directly to disk via AssetDatabase.CreateAsset. Iterations on existing outputs use EditorUtility.CopySerialized to safely overwrite data without generating conflicting meta GUIDs.Editor Integration & Safety FailsafesDual-Mode Execution: Mode 1 executes non-destructive sibling SMR cloning via Object.Instantiate for safe A/B testing of modular clothing. Mode 2 globally processes entire character root hierarchies.Smart Editor Hooks: Features contextual right-click initialization (GameObject > Veridian > BoneFuser) and recursive drag-and-drop parsing to automatically extract valid SMRs from parent folders.Data Validation Engine: Pre-execution sanitization automatically strips nulls and executes "nested root culling" (detects and removes redundant child bone targets using Transform.IsChildOf).Proactive Execution Gates: Built-in detection and UI warnings for missing sharedMesh references, automated isReadable (Read/Write Enabled) fixing, and failsafes for meshes utilizing Blendshapes (morph targets).


