Meshia Mesh Simplification (Synthos Edition)

A high-performance, Burst-accelerated mesh decimation library for Unity and VRChat.
This repository is a customized edition of Ram.Type-0’s Meshia (under the MIT License), tailored for both Avatars and Worlds. It runs standalone without requiring NDMF, integrates directly with tools like VRCFury, and powers batch environment processing in tools like Synthos Scene Optimizer.
What Was Changed?
-
Works on Avatars Without NDMF & Better VRCFury Support
- In Stock Meshia: You could only use it on avatars through NDMF (Non-Destructive Modular Framework), requiring multiple extra dependencies and forcing avatars through the NDMF build lifecycle.
- In Synthos Edition: NDMF is completely removed. It works directly on avatars and includes native VRCFury build hooks (
MeshiaVrcfuryBuildHook), allowing VRCFury-managed avatars to decimate meshes cleanly during upload without NDMF framework bloat or order-of-execution conflicts.
-
Independent UV Barycentric Interpolation (UseBarycentricCoordinateInterpolationForUV)
- In Stock Meshia: Barycentric interpolation was all-or-nothing—forcing surface normals, tangents, and UVs to all interpolate together, which frequently distorted vertex normals and lighting on flat or hard-edged surfaces.
- In Synthos Edition: Normals and tangents can use standard linear interpolation while texture coordinates (UV0–UV7) and vertex colors independently use barycentric interpolation. This preserves lightmaps, trim sheets, and texture mappings with zero shading distortion.
-
Watertight Edge Preservation (PreserveBorderEdges = true)
- In Stock Meshia:
PreserveBorderEdges defaulted to false, causing holes and seam splits on open meshes and modular building pieces.
- In Synthos Edition:
PreserveBorderEdges defaults to true to keep environmental, clothing, and avatar seam geometry watertight.
-
Batch Scene & World Processing Support
- Optimized for multi-mesh scene decimation jobs via
MeshSimplifier.SimplifyBatch(), allowing world optimization pipelines to decimate entire scenes in seconds.
-
Blendshape-Aware Simplification (PreserveBlendShapes, off by default)
- In Stock Meshia: The error metric only measures the base shape, so regions that are flat in the base mesh but deform under a blendshape (e.g. a stocking stretched over the thigh) get heavily decimated and shade blotchy when the blendshape is on. Merged vertices also get their blendshape delta normals/tangents normalized to unit length.
- In Synthos Edition: With Preserve Blendshape Shapes enabled, every removal is also scored with each considered blendshape fully applied (combined with the base error by Max or Weighted Sum), triangle flips are checked in each shape, and deltas are interpolated without normalization.
- Only blendshapes that matter are considered: on avatar builds, a blendshape is used when it is animated by any controller on the avatar or non-zero on the renderer (Meshia runs after VRCFury, so shapes baked by VRCFury’s Blendshape Optimizer are already gone). Max Blendshapes (default 8) caps the count, largest deformation first. Each cascading entry has Blendshape Settings to force Include/Exclude a shape or lower its weight.
- The triangle target is still always reached; with many deforming shapes the remaining error is spread across all of them.
What Is No Longer Needed?
- NDMF (Non-Destructive Modular Framework) is NO LONGER required: You do not need NDMF installed to optimize your avatars or worlds. If you use VRCFury, it hooks directly into the build pipeline seamlessly without NDMF overhead.
com.anatawa12.custom-localization-for-editor-extension is NO LONGER required: Stripped unnecessary third-party localization packages.
Installation via VPM (VRChat Creator Companion)
Add the Synthos package repository to VCC / ALCOM:
https://grimreaper35487.github.io/Synthos-VRC-Packages/index.json
Then add Meshia Mesh Simplification (Synthos Edition) to your project, or install Synthos Scene Optimizer (which will automatically pull this in as a dependency).
C# Usage
using Meshia.MeshSimplification;
using System.Collections.Generic;
using UnityEngine;
// 1. Configure options (PreserveBorderEdges is true by default)
var options = MeshSimplifierOptions.Default;
options.UseBarycentricCoordinateInterpolationForUV = true; // High-accuracy UV preservation
// 2. Set target reduction
var target = new MeshSimplificationTarget
{
Kind = MeshSimplificationTargetKind.RelativeVertexCount,
Value = 0.5f // Reduce by 50%
};
// 3. Batch Simplify (Burst accelerated)
var batch = new List<(Mesh Mesh, MeshSimplificationTarget Target, MeshSimplifierOptions Options)>
{
(myMesh, target, options)
};
MeshSimplifier.SimplifyBatch(batch);
Credits & License