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
      • 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
      • 3D Buttons
      • Screen Overlay Buttons
      • Scene Selectables
      • 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
  • Installation
  • realvirtual.io AGX support
  • Source and MU
  • Drive
  • Transportsurface
  • Sink
  • Sensors
Edit on GitHub
  1. Extensions

AGX Physics

Hight quality physics simulation

PreviousMultiuserNextVR Builder

Last updated 5 months ago

AGX Dynamics for Unity is not part of the realvirtual.io delivery installation itself. AGX Dynamics for Unity is sold and distributed by .

As of realvirtual.io 2021.02, realvirtual.io also supports . AGX is a commercial and optional high quality physics simulation that can simulate complex dynamics.

AGX Dynamics for Unity completely replaces the built-in game physics in Unity and allows you to use real physics, measure real forces and expect realistic results. For more information, please visit the .

With AGX it is possible to simulate processes in engineering quality. The main advantage is that it is possible to measure real forces and detect multiple contact points between bodies. This allows, for example, very detailed conveyor simulations, where it is also possible to simulate the behavior when a part is on several different conveyors at the same time.

Installation

After installation of the AGX Unity plugin you need to activate it by selecting File > Build Settings > Player > Script Compilation. Here you need to add the Scripting Define Symbol REALVIRTUAL_AGX

realvirtual.io AGX support

Realvirtual.io does not automatically add AGX physics components to Gameobjects, as is sometimes the case with standard realvirtual.io components. You must add all the required AGX components manually, as described below.

AGX and Unity Physics run in parallel in a scene. It is possible to simulate some parts of the scene with Unity PhysX and other parts with the AGX engine but you are not allowed to put an AGX and a Unity RigidBody in parallel on one Gameobject.

Source and MU

To enable the AGX within the source Use AGX Physics needs to be turned on in the source.

If the AGX specific properties like Use AGX Physics are not visible within the Source please check if the GAME4AUTOMAION_AGXcompiler define is added to the Player settings like described above.

Drive

Transportsurface

Sink

Sinks must detect the parts to be destroyed. Use AGX Physics must be enabled and an AGX Box Collider must be added to the sink.

Sensors

You can also use Raycast-based sensors with AGX physics. It is necessary to add a standard Unity Collider to your MUs on the layer g4a SensorMU.

To use AGX Dynamics for Unity together with realvirtual.io you also need to install the AGX Dynamics for Unity plugin. Please check the AGX documenation for more informationon about the installation:

A license key is needed for using AGX Dynamics for Unity. Please check the for more information regarding trial and licensing of AGX.

Additionally all MUs need to have a AGX Shape Collider (e.g. a Box Collider) and a AGX RigidBody added to it. Please check the AGX Unity Plugin documentation () for more information about these components.

realvirtual.io can move mechanical axes. Axes are defined within AGX by Contraint for example with the Type Hinge. It is necessary to turn on the Lock Controller within the constraint. The Drive itself needs to be turned to Virtual (because the direction is defined by the AGX Constraint itself).

Conveyors are modeled within realvirtual.io with connected to . This remains the same. On the Use AGX Physics needs to be turned on:

The main advantage of the AGX Transportsurface is, that one can touch multiple Transportsurfaces and the resulting movement of the MU is calculated exactly. With the Unity PhysX engine only one contact point is calculated, what means that an never touches multiple Transportsurface, which is a disadvantage for very detailed simulations.

Do not add a RigidBody to your MUs as this would violate the AGX Physics Engine. Please make sure that raycasts are used in all sensors that need to detect AGX based MUs. realvirtual.io collider based sensors are not possible in combination with AGX Physics Engine. The sensor raycast setting (see also ).

© 2022 in2Sight GmbH - All rights reserved. No part of this publication may be reproduced, distributed, or transmitted in any form or by any means, including printing, saving, photocopying, recording, or other electronic or mechanical methods, without the prior written permission of the publisher.

https://us.download.algoryx.se/AGXUnity/documentation/current/getting_started.html#installing-the-plugin
AGX Dynamics Website
https://us.download.algoryx.se/AGXUnity/documentation/current
MU
MU
Sensor
https://realvirtual.io
Drives
Drives
Transportsurfaces
TransportSurface
Algoryx
AGX Dynamics for Unity
AGX Dynamics Website
Flexible cables and parts based on AGX physics engine
Multi contact points on conveyor example based on AGX
Scripting Define symbol for AGX Physics engine
Use AGX in Source
AGX Collider and Rigidbody on Sourc
Drive with AGX physics
Transportsurface with AGX physics
Sink with AGX physics
Use raycast based sensors with AGX Physics engine