Performance evaluation of NumPy, SciPy, PyMEL and OpenMaya compared to the C++ API in Autodesk Maya

Autor: Svensson, Patrik, Galfi, Fredrik
Jazyk: angličtina
Rok vydání: 2021
Předmět:
Druh dokumentu: Text
Popis: Background. Autodesk Maya allows scripting through both MEL and Python, and it is also possible to use different Python modules and a C++ API to perform the desired tasks. In theory, the C++ API is the fastest option in Maya, but there are no studies that support this claim. Other studies show that PyMEL is the slowest module in Maya to work with, but it is still the one used most frequently. This thesis has therefore made a speed measurement to determine which of the four selected Python modules and the C++ API is the fastest to use, regarding animation transfer between skeletal hierarchies with different numbers of data. Objectives. The aim of this thesis is to measure the performance in terms of speed of the Python modules NumPy, SciPy, OpenMaya and PyMEL, as well as the C++ API, in order to determine which is the fastest. Our objectives are to determine the speed performance of each module by conducting experiments. Methods. To achieve the objectives, an experiment was conducted to compare the speed of each Python module and the C++ API. To perform the experiments, the implementations for each module and the API have been written in the same way, with their own data types and classes. After performing the experiments for each module, the mean time consumption of each program has been compared. Results. The results from the experiments show that there was a noticeable difference in the speed between the C++ API and the Python modules, as the C++ API delivered the highest speed for all the skeletons that took place in the experiments. The OpenMaya module was the fastest Python module that was tested, while PyMEL was the slowest. The C++ API’s measurements show that it took 0,388–1,909 seconds depending on which skeleton was used to perform the experiment, while OpenMaya’s measurements were 0,538–3,119 seconds which show that OpenMaya is 39–68% slower than the C++ API. NumPy, SciPy and PyMEL’s measurements ranged from 689% to 3165% slower than the C++ API. Conclusions. The conclusion of the experiments show that the C++ API is the fastest to use, while PyMEL is the slowest module, as it is 2632–3165 % slower, when used for these animation transfers. This shows that the C++ API can be a better choice for complex calculations, such as animation transfers.
Databáze: Networked Digital Library of Theses & Dissertations