• Home
  • User Manual
  • Tutorials
  • Updates
Search Results for

    Show / Hide Table of Contents
    • Welcome to twin
    • Getting Started
      • Install and uninstall twin
      • Install and uninstall a licence
      • Start twin
    • Simulation Component Library
      • Automation
        • ScriptComponent
        • Sequence
      • BitManipulator
        • BitsToBytesConverter
        • BytesToBitsConverter
        • EndiannessChanger
      • BooleanOperations
        • BooleanFunction
        • Invert
        • InputSwitch
      • ControlPanel
        • ControlPanel
      • Conveyor
        • Conveyor
        • VacuumConveyor
      • Debug
        • Counter
      • DataManipulator
        • DataReader
        • DataTypeConverter
        • DataWriter
      • FMU
        • FMU
      • Gripper
        • KinematicGripper
        • ObjectCoupler
        • VacuumGripper
      • HardwareConnector
        • PLCConnector
        • RobotControllerConnector
      • Math
        • Gain
        • LinearFunction
        • LowPassFilter
        • NumberComparer
        • Sum
      • Motor
        • FCControlledMotor
        • ServoMotor
      • Movers
        • BoolToSignedDirection
        • DynamicCylinder
        • DynamicRotationMover
        • DynamicTranslationMover
        • KinematicCylinder
        • KinematicPathMover
        • KinematicRotationMover
        • KinematicTranslationMover
      • ObjectManipulator
        • Colorizer
        • Object3DCutter
        • VisiblityChanger
      • Sensors
        • AngleLimitSwitch
        • CollisionObserver
        • DistanceSensor
        • DynamicObjectDetector
        • LightBarrier
        • PositionLimitSwitch
        • PositionTracker
      • Sinks
        • FileLogger
        • CollisionSink
        • RaySink
      • Sources
        • BoolConstant
        • BoxSource
        • DoubleConstant
        • Object3DFileSource
        • Object3DSource
        • RandomBoolean
        • RandomNumber
        • SinusGenerator
        • SphereSource
        • StringConstant
      • Timers
        • IntervalTrigger
        • TOF
        • TON
    • Collision Detection
      • What is essential for collision detection?
      • Where can I find the mesh simplifiers?
      • Which mesh simplification methods are available?
    • twin Mirror
      • Install the twin Mirror
      • Embed the twin Mirror into your HMI
      • React on user-events
      • Manipulate 3D objects
      • Add labels and buttons
    • Video Guides
      • How to install twin
      • How to organize projects
      • How to import CAD files
      • How to handle 3D objects
      • How to activate physics in your simulation
      • How to simulate conveyor systems
      • How to simulate cylinders
      • How to simulate axis systems and portals
      • How to simulate sensors
      • How to simulate grippers
      • How to create program sequences
      • How to connect to PLCs
      • How to simulate robots
      • How to model complex mechanical motion systems
      • How to debug and analyse signals in twin

    What is esssential for collision detection?

    How accurate do I need to simulate?

    Collision detection is essential for realistic physical interactions between material and machine(s), environment (e.g. floor) or other materials in twin.

    But the problem is: Simulating a 100% accurate collision is very computationally intensive and should be avoided.

    The geometry of some objects is quite complex and leads to a great effort in calculating the impact forces which is not possible in real time. Therefore, there is a mesh simplification or decomposition for this purpose to approximate the object to the real one to reduce the effort.

    Note

    Before starting simulating my machine, the most important question you need to ask yourself: "How accurate do I NEED to simulate my material?"

    Let's look at an example: Simulating pallets.

    If the pallets moving on conveyors and need only to get detected by light barriers on the front edge (as shown on the following picture), a box with the same outer dimension would be sufficient enough.

    Palette gets interrupted by light barrier

    In the next picture, the right palette is approximated (simplified) with a (bounding) box which has the same outer dimension than the original object on the left side, only without the recesses.

    Palette and simplified palett

    If you need to lift the pallets inside the recesses to separate them, the palette with the recesses need to be very accurately approximated.

    Palette gets separated Detail

    Concave Vs Convex polygons

    Basically, we decide between two different types of 3D model shapes:

    Concave and Convex shapes.

    The different between those two shapes is that a convex polygon does not have an inside dent in it's shape, whereas on a concave shape, one side of the shape is pointing towards the inside of the shape. To put this into real-life perspective, a concave shape curves inwards like an hourglass (or bowls or funnels), while a convex shape curves outwards like a football (think flatter surfaces and bumps).

    Another concave shape can be found in pizza! Next time you have pizza, remove a slice of pizza!

    Convex Pizza Concave Pizza

    Source: www.cuemath.com/geometry/convex-shapes-functions, called on December 20, 2022.

    Note

    Why do I need to know this? The problem: Calculating collisions of concave objects is computationally intensive. Therefore, we need to approximate concave polygons with convex ones.

    We need convex polygons!

    In order to ensure real-time interactivity during the collisions a first approach is to approximate the 3D models composing the scene by a set of simple convex shapes such as ellipsoids, capsules, boxes or convex-hulls.

    But like described in the first part on the top, it is up to the level of detail you would like to achieve.

    Note

    Also simple approximations can be sufficient!

    In the following two figures, a complex 3D model is compared with the simplified pendant. The result on the right-hand side looks similar but is different to the original object.

    Original mesh Convex hull

    A second approach consists in computing an convex decomposition of a surface, which consists in partitioning it into a minimal set of convex sub-surfaces (sub-meshes) using convex decomposition algorithms.

    The result depends on the algorithm and on the parameters like the resolution (voxels). The higher the number of voxels, then the more fine details can captured.

    This is shown in the following pictures. A high resolution leads to many sub-meshes and thus in most cases to the best result, but the computational effort for resolving collisions can be significantly higher.

    Original Palette 7 Sub-Meshes 41 Sub-Meshes 2048 Sub-Meshes

    To summarize: A process called convex decomposition is needed to convert a concave object into a convex one.

    This and the other approximations are needed to ensure real-time interactivity during the collisions of the material with other materials and the environment.

    Further Information

    For more details visit the Video Guides section, where you can find additional information and video guides on this topic under Simulate complex 3D-Objects in real time.

    In This Article
    Back to top Copyright © Eberle Automatische Systeme GmbH & Co KG