Skip to content
This repository has been archived by the owner on Dec 1, 2021. It is now read-only.

IntegratingFramework

jsprenger edited this page Feb 22, 2021 · 2 revisions

Integrating the MOSIM framework in Unity

In order to integrate MOSIM into a Unity environment, the core libraries have to be included and several annotations inside the scene have to be performed. In the following article, we describe, how to perform this integration in a clean Unity environment. To run the integration, you need to have access to an MMI-Environment, e.g. by downloading and executing the precompiled version as described in this article.

Integration of the Core Framework

In order to integrate the core framework, please either compile or download the compiled MMIUnity.TargetEngine libraries and copy them to a Plugins folder in Unity (e.g. Assets/Plugins/MMI/).

Hierarchy Requirements

The MOSIM framework simulates humanoid avatars in a virtual environment. Hence, on the one hand, the Avatar has to be configured (see below). On the other hand, the scene has to be annotated in order for MMUs to interact with it. For this purpose, please add the MMI Scene Object Mono Behavior to every object, which should be visible in the MOSIM framework.

image

In addition, all of the MMI Scene Objects should be attached to a central Scene component. Please create an empty object, name it Scene and move all objects, that should be visible for the MOSIM framework below this empty scene object. In the example below, the obstacle, table, avatar, and wrench are all tracked by the MOSIM framework.

image

Last but not least, the unity scene has to be connected to the MOSIM framework. Please add the Mono Behaviors Simulation Controller, Unity Scene Access, and MMI Settings to the empty scene object previously created. In the MMI Settings, please enter your local settings of the MMI Environment.

image

Setting up the Avatar

The avatar has to have at least two Mono Behaviors attached to it. One is the MMI Scene Object, to be tracked as an object, the other is the MMI Avatar. Please set up the following parameters according to your specification.

Paramter Description Example
Root Transform Unity Transform of the Avatar (not the root joint, but the object transform) Avatar (transform)
Pelvis First Joint of the Avatar (usually the pelvis) pelvis (transform)
Use Skeleton Visualization Display or hide the intermediate skeleton during the simulation On / Off
Game Joint Prefab Prefab used to display the intermediate skeleton. Not required if the intermediate skeleton is not displayed. singleBone
Configurations File Path Path to the retargeting configuration configurations/avatar.mos
Use Remote Co-Simulation Toggle to select whether to use an internal or remote co-simulator On / Off
Allow Remote Co-Simulation Access Toggle to select, whether external components (e.g. the behavior model) can access the internal co-simulator On / Off

image

In order for our retargeting solution to transfer the motions in real time to the target avatar, a configuration file is required. As the configuration process is not yet completely stable, we recommend to start with the example avatar and its example configuration.

MOSIM Documentation

Introduction

Documentation

Known Issues

Clone this wiki locally