realvirtual.io
  • Building Digital Twins with Unity and realvirtual.io
  • Basics
    • Installation
    • Demo Model
      • Old Demo Model
    • Editor User Interface
      • Hierarchy Window
      • 3D Views
      • Quick Edit
      • Move Pivot Points (Pro)
      • Selection Window (Pro)
      • Material Window (Pro)
      • Measurement (Pro)
      • Kinematic Tool (Pro)
      • Model Checker
    • Runtime UI
      • Group Manager
      • Debug Console
      • Responsiveness
      • Runtime Persistence
    • Importing and exporting
    • Folder structure
    • Tutorial
    • Physics
    • CAD import (Pro)
      • CADLink (Pro)
      • CAD Checker (Pro)
      • CAD Updater (Pro)
    • Reusable Components (Prefabs)
    • Cadenas parts4cad
    • Publishing the Digital Twin
    • Revision management
  • News
  • Login & Download Updates (Pro)
  • Components & Scripts
    • Realvirtual
      • Environment Controller
    • MU, Source and Sink
      • Source
      • Sink
    • Motion and Kinematic
      • Drive
      • Kinematic
      • Group
      • Joint
      • CAM
      • TransportSurface
      • Guided Transport
      • KinematicMU (Pro)
      • Drive behavior
      • Chain
      • Chain element
      • Motion for developers
    • Sensors
      • Sensor
      • Measure
      • MeasureRaycast
    • Picking and Placing MUs
      • Grip
      • Gripper
      • Fixer
      • Pattern
    • Changing MUs
      • MaterialChanger
      • PartChanger
      • Cutter
    • Scene Interaction
      • Tooltip (Pro)
      • 3D Buttons
      • Screen Overlay Buttons
      • Scene Selectables (Pro)
      • Lamp
      • Interact3D
      • UI components
      • HMI components (Pro)
        • Start your own HMI
        • HMI Tab
        • HMI DropDown
        • HMI Puschbutton
        • HMI Switch
        • HMI Value
        • HMI Text
        • HMI Slider
        • HMI Message
        • HMI Marker
      • ModelZoo (Pro)
    • Interfaces
      • Interface Tools
        • Signal Manager
        • Signal Importer Exporter
        • Signal Catcher
        • OnValueChangedReconnect
      • Signal Importer / Exporter
      • ABB RobotStudio (Pro)
      • Denso Robotics (Pro)
      • EthernetIP (Pro)
      • Fanuc (Pro)
      • FMI
      • Igus Rebel
      • MQTT (Pro)
      • Modbus (Pro)
      • OPCUA (Pro)
      • PLCSIM Advanced (Pro)
      • RoboDK (Pro)
      • RFSuite (Pro)
      • SEW SimInterface (Pro)
      • Siemens Simit Interface (Pro)
      • Simit Shared Memory (Pro)
      • Simulink (Pro)
      • S7 TCP
      • TwinCAT (Pro)
      • TwinCAT HMI (Pro)
      • UDP (Pro)
      • Universal Robots (Pro)
      • Wandelbots Nova (Pro)
      • Websocket (Pro)
      • Windmod Y200 (Pro)
      • Custom Interfaces
    • Performance Tools
      • Combine Meshes (Pro)
      • Create Prefab (Pro)
      • Hierarchy Cleanup (Pro)
      • Mesh Optimizer (Pro)
      • Performance Optimizer (Pro)
    • Defining Logic
      • Unity Scripting
      • Behavior Graph
      • Logicsteps
      • Unity Visual Scripting
      • Recorder
    • Robot Inverse Kinematics (Pro)
    • Volume Tracking (Pro)
  • Multiplayer (Pro)
  • Extensions
    • ModelZoo
      • Beckhoff TwinCAT
      • Siemens S7
      • Denso Cobotta 1300
      • Wandelbots Nova Fanuc CRX
      • Universal Robots UR10
      • Fanuc Roboguide
    • realvirtual.io AIBuilder
      • realvirtual.io AI Builder Overview
      • Generate AI Training Data
      • AI Training
      • Testing AI in a Digital Twin
      • Deploying the AI
    • realvirtual.io Simulation
      • Conveyor Library
      • Path System
        • Path finding
        • Line
        • Curve
        • Workstation
        • Catcher
        • Pathmover
    • realvirtual.io Industrial Metaverse
      • Setup Guide
      • VR Modules
      • AR Modules
      • Multiuser
    • AGX Physics
    • VR Builder
    • CMC ViewR
  • Advanced Topics
    • Render Pipelines
    • Mixed Reality with Meta Quest3
    • Upgrade Guide
      • Upgrade to 2022
    • Open Digital Twin Interface
    • Usefull Addons
    • Improving Performance
    • Supported Platforms
    • Compiler Defines
    • For Developers
      • Important Classes and Interfaces
      • Assembly Definitions
      • Starting your development
      • Class documentation
      • realvirtual Init Sequence
      • realvirtualBehavior Lifetime Methods
      • Testing
    • Newtonsoft JSON
    • Troubleshooting
  • Release Notes
  • AI Digital Twin Assistant (GPT4)
  • License Conditions
Powered by GitBook
On this page
  • Combine Meshes
  • Introduction
  • Overview
  • Kinematic and Drive Group Awareness
  • How to Use
  • Next Step: Create Prefab
Edit on GitHub
  1. Components & Scripts
  2. Performance Tools

Combine Meshes (Pro)

Further performance improvements. Only available with the professional version.

PreviousPerformance ToolsNextCreate Prefab (Pro)

Last updated 20 days ago

Combine Meshes

Introduction

After importing CAD data into a Unity scene, you often end up with a deeply nested and complex GameObject hierarchy. Meshes may be stored directly in the scene or as assets in your project, depending on the import method.

To prepare the scene for real-time applications and ensure optimal performance, it's often beneficial to reduce the number of GameObjects and minimize draw calls. This can be achieved using the Combine Meshes utility—especially when meshes share a limited and unified set of materials that already exist as assets.

Overview

The Combine Meshes utility enables you to combine multiple meshes into a single mesh, significantly reducing draw calls and improving rendering performance.

ℹ️ Note: This is particularly useful for:

  • Reusable prefabs, where a simplified internal structure is desired.

  • Final optimization at the end of a project, where rendering performance is critical.

⚠️ Warning: After combining, you will no longer have access to the individual mesh parts. Consider creating a backup or duplicating the original GameObjects before using this function.

Here is an example of an unoptimized scene:

Kinematic and Drive Group Awareness

The Combine Meshes utility automatically respects kinematic groupings and drive mechanisms defined in the scene. This means:

  • Only non-moving parts or parts that move together as a single unit are combined.

  • Meshes involved in kinematics or driven motions (e.g., robotic arms, sliding doors) are not combined across movement boundaries, preserving functionality.

This ensures that performance optimizations do not interfere with the behavior of simulated machinery or driven components.

How to Use

  1. Select GameObjects In the Unity Hierarchy, select the GameObjects whose meshes you want to combine.

  2. Run Combine Meshes Right-click on the selection and choose: realvirtual/Combine Meshes

  1. Result The selected GameObjects will have their meshes merged into a single optimized mesh, improving rendering performance.

💡 Tip: For best results, ensure that all selected meshes use shared materials that are already available as assets in your project.

Next Step: Create Prefab

If you intend to reuse the combined mesh as a component in other scenes or projects, continue with the section. This will guide you through turning the optimized GameObject into a reusable, self-contained prefab.

Create Prefab
Unoptimized structure after CAD Import
Combine meshes in the Gameobject context menu
Simplified structure after mesh combine