Home / unity flash player / bmlSUP – A SMPL Unity Player

bmlSUP – A SMPL Unity Player - unity flash player

bmlSUP – A SMPL Unity Player-unity flash player

bmlSUP - A SMPL Unity Player
Adam O. Bebko* Anne Thaler Nikolaus F. Troje
Centre for Vision Research
York University, Toronto
Figure 1: bmlSUP playing an example paired animation in Unity.
ABSTRACT inter-individual variance in body shape through a series of parameter
Realistic virtual characters are important for many applications. weights, and also provides a set of pose-dependent blendshapes that
The SMPL body model is based on 3D body scans and uses body improve the realism of the mesh deformations when the joints move.
shape and pose-dependent blendshapes to achieve realistic human These pose-dependent blendshapes result in large improvements
animations [3]. Recently, a large database of SMPL animations over linear blend skinning, which causes unrealistic mesh defor-
called AMASS has been released [4]. Here, we present a tool mations at joints. These features allow the SMPL model to create
that allows these animations to be viewed and controlled in Unity realistic individualized and animated meshes.
called the BioMotionLab SMPL Unity Player (bmlSUP). This tool AMASS is a large database of such animated body models
provides an easy interface to load and display AMASS animations https://amass.is.tue.mpg.de/ [4]. This database currently unifies
in 3D immersive environments and mixed reality. We present the 18 different marker-based motion capture datasets using the MoSh++
method and the SMPL-H model that also contains hand poses [7].
functionality, uses, and possible applications of this new tool. The animations are stored as animated SMPL-H parameters and
Keywords: animation, virtual characters, avatar, toolkit, Unity include a wide variety of everyday actions and sports movements.
Index Terms: Human-centered computing--Visualization-- Currently, animations from AMASS are easily rendered only in
Visualization systems and tools--Visualization toolkits; Comput- python. With the growing popularity and power of real-time 3D
ing methodologies--Computer graphics--Animation--Motion cap- rendering tools, including popular game engines, more options are
ture; Applied computing--Law, social and behavioural sciences-- needed for displaying realistic virtual humans in 3D environments.
Psychology Here, we present a tool for rendering AMASS animations in the
Unity game engine. The tool contains an implementation of the
1 INTRODUCTION SMPL-H model using Unity's native blendshape and animation
system Mecanim. This tool allows access to the large amount of
Virtual characters are used in a wide range of on-screen applications animations provided in the AMASS dataset, and an interface to
and immersive and collaborative environments. Due to the high easily load them into Unity.
degree of control of the presentation and animation of the characters
they lend themselves well to research on biological motion and 2 THE SMPL UNITY PLAYER
person perception. However, historically, virtual characters suffered bmlSUP1 can be accessed here free and open source:
from unrealistic deformations at joints. Recent advances in computer https://biomotionlab.github.io/SUP/.
graphics and statistical body models of human bodies have led to
increasingly realistic virtual characters [3, 5, 7]. 2.1 AMASS Animations
One such advancement is the MoSh method [2]. MoSh recon- Animations from the AMASS database can be downloaded at
structs motion and shape from optical motion capture markers and https://amass.is.tue.mpg.de. The animations are stored in
produces an animated 3D mesh using the statistical body model .npz format, which can only be accessed in python. To play the
SMPL [3, 4]. SMPL is a data-driven model. It parametrizes the animations in Unity, the files must be converted into a C# readable
file format. We provide a python tool to convert into .h5 (preferred)
or .json files with some example scripts.
1The bmlSUP player can only be used for non-commercial purposes, and
falls under the same license agreement as SMPL. Use of this tool also requires
citing the SMPL publication [3], https://smpl.is.tue.mpg.de/.
2.2 Body Model the body shape parameters of the SMPL and SMPL-H model differ,
Each frame in an AMASS animation includes the SMPL-H parame- the resulting SMPL parameters must be converted to SMPL-H us-
ters for that frame: body pose (including hand articulations), global ing scripts that can be found at https://github.com/vchoutas/
body translation, and DMPL dynamic soft-tissue coefficients [7]. smplx/blob/master/transfer_model/README.md [3]. The
The animation file also contains the individualized body shape pa- skeleton pose components of the SMPL-H model can be manip-
rameters of the female or male SMPL-H model. Our player currently ulated directly, while still taking advantage of its pose-dependent
does not support DMPL. AMASS animations containing such data blendshapes. This means that the SMPL-H bodies can be animated
will still play, but the current version of our player will exclude these via Unity's Mecanim animation system while retaining realistic
components. The player is structured in a modular fashion. Body joint deformations (e.g., using Mixamo animations, I.K. solvers,
shape parameters, skeleton pose, and pose-dependent blendshapes etc.). The SMPL-H bodies can also be animated in real-time in
can be individually toggled and substituted. conjunction with motion capture systems.
Mixed Reality Applications bmlSUP can also be used to lever-
2.3 Functionality age Unity's mixed reality support, greatly simplifying presenting
Animation files can be loaded individually or in batch. If a batch of AMASS animations in mixed reality applications. Potential avenues
animations should be played in a specific order, a .txt file must be of research could include ergonomics and design testing, the grow-
included specifying the order. Multiple or paired animations can be ing field of fitness and health body-shape tracking, and improving
played simultaneously by explicitly including them as a sequence in body realism in gaming.
the .txt file. After loading the animations into the Unity player, there
are several settings for playing the animations (Figure 1): 3 CONCLUSION AND FUTURE WORK
Playback Controls Controls for playback include a play and We present a useful new tool to render and control SMPL-H body
pause button, changing playback speed, a "scrubber" for jumping models in Unity. This allows the large amount of animations avail-
to a particular part of the animation, and buttons to play next or able from the AMASS database to be implemented easily in projects
previous animation or restart list if multiple animations are loaded. requiring immersive 3D environments, including virtual and mixed
Appearance It is currently possible to toggle between three
reality. Future development could integrate extensions of the SMPL-
mesh rendering modes: opaque with checkerboard texture, semi-
H model to increase realism and fidelity of the virtual characters
transparent, or show no mesh. Rendering of lines for bones and
even further, including DMPL (dynamics of soft tissue) [3], or the
spheres for all joints can be toggled on and off. The left and right
SMPL-X model including facial expressions [5].
sides of the body can be colored separately. ACKNOWLEDGMENTS
Camera The camera can be explicitly positioned in the Unity The authors wish to thank Nima Ghorbani and Naureen Mahmood
editor before runtime and compiling. There are also controls avail- for their useful comments and providing an early prototype of the
able at runtime to move the camera's view (e.g., rotate, zoom in and Unity Player and the basis for the skinned meshes. This work was
out etc.). The controls have been designed to roughly match the supported by CFREF VISTA funding.
controls of the Unity Editor scene view.
Reviewing It is possible to save notes about animations while
viewing them using the review panel. A .txt file can be generated [1] A. O. Bebko and N. F. Troje. bmlTUX: Design and con-
trol of experiments in virtual reality and beyond. i-Perception,
with any added notes associated with each animation. It is also 11(4):2041669520938400, 2020.
possible to load and amend an existing file. This functionality can be [2] M. Loper, N. Mahmood, and M. J. Black. MoSh: Motion and shape
used to annotate large sets of animations, and for simple applications capture from sparse markers. ACM Transactions on Graphics (TOG),
requiring basic user responses. 33(6):1-13, 2014.
Customization By editing the Unity project and recompiling, [3] M. Loper, N. Mahmood, J. Romero, G. Pons-Moll, and M. J. Black.
advanced customization options are available, including changing SMPL: A skinned multi-person linear model. ACM transactions on
the background scene, the rendering and textures of the body models, graphics (TOG), 34(6):1-16, 2015.
and many other features. [4] N. Mahmood, N. Ghorbani, N. F. Troje, G. Pons-Moll, and M. J. Black.
AMASS: Archive of motion capture as surface shapes. In Proceedings
2.4 Potential Applications of the IEEE ICCV, pp. 5442-5451, 2019.
Psychology Experiments Our Unity player can serve as a [5] G. Pavlakos, V. Choutas, N. Ghorbani, T. Bolkart, A. A. Osman,
template for users who want to design behavioural experiments in- D. Tzionas, and M. J. Black. Expressive body capture: 3D hands,
volving realistic body models [8]. The player is compatible with face, and body from a single image. In Proceedings of the IEEE CVPR,
pp. 10975-10985, 2019.
the bmlTUX toolkit also created by our group [1].2 bmlTUX pro- [6] S. Pujades, B. Mohler, A. Thaler, J. Tesch, N. Mahmood, N. Hesse,
vides an interface in Unity that allows users to quickly build experi- H. H. Bu?lthoff, and M. J. Black. The Virtual Caliper: Rapid Creation of
ments. It is designed to minimize the amount of code required to get Metrically Accurate Avatars from 3D Measurements. IEEE transactions
an experiment running. The toolkit is available open source from on visualization and computer graphics, 25(5):1887-1897, 2019.
https://biomotionlab.github.io/TUX/. [7] J. Romero, D. Tzionas, and M. J. Black. Embodied hands: Modeling and
Self-Avatar Animation Our Unity implementation of the capturing hands and bodies together. ACM Transactions on Graphics
SMPL-H model can leverage the body shape and skeleton pose of the (ToG), 36(6):245, 2017.
model independently. To determine a user's individual body shape [8] A. Thaler, A. Bieg, N. Mahmood, M. J. Black, B. J. Mohler, and N. F.
parameters, The Virtual Caliper project provides tools to rapidly gen- Troje. Attractiveness and Confidence in Walking Style of Male and
erate metrically accurate SMPL bodies based on body measurements Female Virtual Characters. In 2020 IEEE Conference on Virtual Reality
[6] (https://virtualcaliper.is.tue.mpg.de/. The bodies
and 3D User Interfaces Abstracts and Workshops (VRW), pp. 679-680.
can be either generated within Unity using virtual reality controllers,
IEEE, 2020.
or by setting the body dimensions in a desktop application. Because
2A tutorial for building experiments with bmlTUX will be presented at
the IEEE VR 2021 conference.