specs-optimize-lens-mesh

Merges same-material RenderMeshVisuals and decimates geometry to reduce draw calls in Lens Studio prefabs.

16|2|Updated Apr 13, 2026
One-click install
npx skills add https://github.com/lens-studio-devs/ls-extensions --skill specs-optimize-lens-mesh-lens-studio-devs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: specs-optimize-lens-mesh
Source: https://github.com/lens-studio-devs/ls-extensions/tree/main/plugins/ls-clad/skills/specs-optimize-lens-mesh
Command: npx skills add https://github.com/lens-studio-devs/ls-extensions --skill specs-optimize-lens-mesh-lens-studio-devs

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Lens Studio prefabs imported as dozens or hundreds of RenderMeshVisuals create excessive CPU draw-call overhead on Specs hardware, making Lenses slow and heavy. This Skill consolidates same-material meshes and decimates geometry while preserving script-referenced SceneObjects. ## Core Features & Use Cases - Draw-Call Reduction via Mesh Merging: Groups non-protected RenderMeshVisuals by material and merges each group into a single GLB using MergeMeshesTool, with world transforms baked into vertex positions. - Geometry Simplification: Generates a preview grid of decimation levels via SimplifyMeshTool, then commits a visually-lossless vertex target based on mesh character (organic shells, hard seams, spinning parts). - Protected Object Safety: Detects SceneObjects referenced by ScriptInputs (toggle lists, highlight lists, transform targets) and excludes them from merging or deletion. - Use Case: An aircraft prefab with 34 RenderMeshVisuals is reduced to 14 RMVs (−59% draw calls) and ~33% fewer triangles while landing gear toggles, highlight swaps, and rotor spin behavior remain intact. ## Quick Start Ask the agent to reduce draw calls on a specific Lens Studio prefab by merging same-material meshes and simplifying the results.

Frequently Asked Questions about specs-optimize-lens-mesh

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce draw calls in a Lens Studio prefab?

Merge RenderMeshVisuals that share the same material into single GLB meshes using MergeMeshesTool, then decimate the results with SimplifyMeshTool. The Skill analyzes the prefab, groups mergeable meshes by material, and mutates the prefab to reference the consolidated meshes.

How to merge meshes in Lens Studio without breaking scripts?

Inspect each ScriptComponent for SceneObject or SceneObject[] inputs such as toggle lists, highlight lists, and transform targets, and mark those UUIDs as protected. Only non-protected RenderMeshVisuals are merged, and protected SceneObjects are never deleted or reparented.

What tools are required for Lens Studio mesh optimization?

The workflow requires the Lens Studio MCP tools scene-graphql, asset-graphql, ExecuteEditorCode, MergeMeshesTool, and SimplifyMeshTool. These handle prefab enumeration, mesh merging, decimation previews, and prefab mutation through the Editor API.

Which meshes should not be simplified during decimation?

Skip meshes under roughly 500 triangles, thin flat geometry like rotor blades or decals, highlight components users inspect directly, and meshes packed inside an FBX with no standalone file. Heavy FBX-packed meshes should be routed through the merge step first to produce a standalone GLB.

Why does merged geometry appear in the wrong position in Lens Studio?

MergeMeshesTool bakes world transforms into vertex positions, so the new merged SceneObject must be parented under a node with the same effective world transform as the sources. Placing it at the wrong hierarchy level offsets the merged geometry.