GithubHelp home page GithubHelp logo

agxunity's Introduction

Algoryx Simulation AB

AGXUnity - AGX Dynamics Unity 3D plugin

Unity 3D bindings for AGX Dynamics from Algoryx Simulation AB

AGX Dynamics is a professional multi-purpose physics engine for simulators, Virtual Reality (VR), engineering, large scale granular simulations and more. AGX is being utilized in hundreds of training simulators and helps engineers design and evaluate new mechanical systems in Algoryx Momentum.

Installation

Unity has to be started with AGX environment variables. For example (command prompt):


C:\>"Program Files\Algoryx\agx-2.21.0.0\setup_env.bat"

Visual Studio version range:
    [15.0, 16.0)
Visual Studio installation path:
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional
vcvarsall.bat used:
    "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvarsall.bat"

**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.5.1
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'

Using Python interpreter C:\Program Files\Python35\python.exe

C:\>"Program Files\Unity\Editor\Unity.exe"

Without the AGX environment, Unity could crash or output error: DllNotFoundException: agxDotNetRuntime.dll

From package

You can find packages in Releases.

  1. Drag and drop AGXUnity-x.y.unitypackage into the Assets folder in Unity.
  2. Copy agxDotNet.dll (<agx_dynamics_install_dir>/bin/x64/agxDotNet.dll) into AGXUnity plugins folder (Assets/AGXUnity/Plugins/x86_64).
  3. Change Script Runtime Version to .NET 4.x: Edit -> Project Settings -> Player. Under Other Settings set Scripting Runtime Version to .NET 4.x Equivalent (Unity 2017.x: Experimental (.NET 4.6 Equivalent)). More information.

From source

  1. git clone https://github.com/Algoryx/AGXUnity.git in the Assets folder of your Unity project.
  2. Copy agxDotNet.dll (<agx_dynamics_install_dir>/bin/x64/agxDotNet.dll) into AGXUnity plugins folder (Assets/AGXUnity/Plugins/x86_64).
  3. Change Script Runtime Version to .NET 4.x: Edit -> Project Settings -> Player. Under Other Settings set Scripting Runtime Version to .NET 4.x Equivalent (Unity 2017.x: Experimental (.NET 4.6 Equivalent)). More information.

Requirements

  • AGX Dynamics 2.24.1.0 (64-bit) or later.
  • Unity 3D 2017.4.10 (64-bit) or later. Could work in earlier version but hasn't been tested.
  • Unity Script Runtime Version .NET 4.x Equivalent (Experimental in 2017.x).
  • Valid AGX Dynamics license. Contact us for more information.

Migrating from AGXUnity-deprecated to AGXUnity

See "Migration" in the AGXUnity-deprecated repository.

Developer

For more information about how to develop new functionality in AGXUnity - read the developer guide.

Tutorials

Getting started :

Modelling a crane :

Older tutorials

Modelling with primitives:

Modelling with materials:

Modelling with constraints:

Modelling with triangle meshes:

Modelling with wires:

Modelling a terrain vehicle:

Sample scenes

The project AGXUnityScenes contains a growing list of various demonstration scenes.

Binary distribution

To distribute an Unity3D application together with AGX Dynamics, you need to collect the required runtime files from your AGX installation. These files must match the version of AGX used when building the Unity3D application.

Below is a list of required files/directories which come from the /bin/x64/ directory. These files should be placed in the top directory together with your Unity exe-file. In version 2.22.1.0 and later, AGX Dynamics comes with a python script that will copy the required runtime files to a named (non-existing) directory: \data\python\utilities\copy_runtimes.py

agx.lic
agxCable.dll
agxCore.dll
agxDotNet.dll
agxDotNetRuntime.dll
agxHydraulics.dll
agxLua.dll
agxMex.dll
agxModel.dll
agxOSG.dll
agxPhysics.dll
agxPython.dll
agxSabre.dll
agxSensor.dll
agxVehicle.dll
colamd.dll
glew.dll
libpng.dll
lua.dll
mscorlib.dll
msvcp140.dll
ois.dll
osg141-osg.dll
osg141-osgDB.dll
osg141-osgGA.dll
osg141-osgShadow.dll
osg141-osgSim.dll
osg141-osgText.dll
osg141-osgUtil.dll
osg141-osgViewer.dll
ot20-OpenThreads.dll
python35.dll
vcruntime140.dll
websockets.dll
zlib.dll

And also, the directory: Components (from bin\x64\plugins)

Directory: plugins

Depending on Visual Studio version, the following files might differ:

mscorlib.dll
msvcp140.dll
vcruntime140.dll

Issues and contributions

Do not hesitate to send us a Pull Request.

If something is missing or not working as expected - fix it and send a pull request.

If you have no idea how to implement a feature or fix a bug - create an issue.

License

Apache License 2.0

agxunity's People

Contributors

nmalg avatar vrguru avatar algoryxmartint avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.