Skip to content

Latest commit

 

History

History
239 lines (176 loc) · 9.24 KB

BUILD.md

File metadata and controls

239 lines (176 loc) · 9.24 KB

Building and Install

Building mmSolver is quite easy. The project uses CMake, and provides pre-made build scripts for Windows (Batch Script) and Linux (Bash - Shell Script).

You may edit these scripts for your system, or use them as-is if you have a standard default installation of Maya.

Dependencies

These tools and libraries are required for building the mmSolver project. For details, please see the section below for each dependency.

Autodesk Maya

Autodesk Maya 2018+ is supported and must be installed on the host to build mmSolver. mayapy is required to run tests and the main Maya executable is required to test and use mmSolver.

Maya Development Kit ("devkit")

The Maya Development Kit is required for building mmSolver.

Various utilities and libraries and files that are installed with the Maya devkit are used during the build process.

CMake

CMake 3.15+ is required to build all parts of mmSolver. Older versions if CMake may work, however the Blender Add-On may fail to generate.

Ninja

As of mmSolver v0.4.0, the Ninja build system is used in the default Windows Batch scripts - Linux build scripts are not affected. Alternate build systems will likely work (such as NMake or Visual Studio projects) but are not tested.

C++ Compiler

Depending on the version of Maya you are targeting, you will need the C++ compiler recommended by Autodesk for your platform. Below is a list of the versions currently used and recommended. Please refer to the Autodesk Maya Developer documentation for details on setting up your build environment.

Each Maya version also specifies a different C++ standard. As of mmSolver v0.4.0 a C++ compiler with at least C++11 is required.

Rust

Rust 1.67+ is required for various features inside mmSolver.

Rust is a modern programming language comparable to C or C++ in terms of speed, is highly performant and provides safety and stability guarantees for software written in Rust.

Both the Rust compiler (rustc) and the Rust package manager (cargo) are required to be installed to build mmSolver. No part of Rust is required to be installed at run-time.

See the 'Cargo.toml' files for a full list of (automatically) installed dependencies via the package managers.

cxx-bridge

cxx-bridge is an executable required for generating C++ bindings for Rust code. This utility allows C++ code to interact with Rust code in simple and a safe way.

Eigen

Eigen is a requirement of mmSolver and is used to store 3D vectors, matrices, perform linear algebra, and is also required for OpenMVG (see below).

CMinpack

CMinpack 1.3.8 is required for non-linear least-squares minimization.

This solver is not as sophisticated as Ceres and may be deprecated in a future release (in favor of Ceres Solver)

Ceres Solver

Ceres Solver is a state-of-the-art non-linear least-squares minimization library.

Ceres Solver allows solving large minimization problems efficiently using sparse matrices. Ceres Solver itself has many dependencies, and the speed of the library depends on the underlying sparse matrix libraries and functions. Feel free to compile and use whatever underlying dependencies provides the best performance for you - however make sure that sparse matrix solving is available.

Ceres Solver is not optional, and is required for OpenMVG features.

In a future version of mmSolver Ceres may replace CMinpack as the default and recommended solving engine.

OpenMVG

OpenMVG 2.0 is used for traditional Multiple-View Geometry calculations inside mmSolver, such as Structure from Motion, triangulation and other features. Only a sub-set of OpenMVG is included with mmSolver.

OpenMVG is not a third-party dependency, because it's included inside mmSolver. OpenMVG requires Eigen and Ceres Solver internally.

Lens Distortion Plug-in Kit

Lens Distortion Plug-in Kit (LDPK) is an open source project provided freely by Science-D-Visions, the creators of 3DEqualizer.

The LDPK provides a standard set of lens distortion features and the ability to provide custom lens distortion plug-ins.

Python

Python 3.x is used for development, testing and formatting Python code.

The mmSolver build will use the provided Maya Python executable (mayapy) for some processes, such as generating Python files from Qt .ui files. Use of mayapy will use Python 2.x or 3.x depending on the Maya version.

See 'requirements-dev.txt' for more details of all dependencies.

Sphinx

Sphinx is used to build documentation for mmSolver including the mmSolver documentation page, and the documentation bundled with mmSolver.

Developer Python Tools - Black and PyLint

Black is used for for Python code formatting, and is only used by developers.

PyLint for Python code 'linting'. It is not critical for building mmSolver.

Both Black and PyLint are used for during development and is not required for building mmSolver.

Building Overview

An overview of compiling is:

  1. Download mayaMatchMoveSolver project from GitHub.
  2. Unzip the source code into a directory.
  3. Open a command line or terminal and navigate to the unzipped files.
  4. Run the provided build script to compile mmSolver.

Below lists all the commands run in an example session, following the above sections.

On Linux:

# Go to root of project directory.
$ cd <project root>

# Build mmSolver, compile UI files, compile Maya plug-in, build
# documentation, create module and install to home directory.
$ bash scripts/build_mmSolver_linux_mayaXXXX.bash

On Windows:

:: Go to root of project directory.
> CD <project root>

:: Build mmSolver, compile UI files, compile Maya plug-in, build
:: documentation, create module and install to home directory.
> scripts/build_mmSolver_windows64_mayaXXXX.bat

Building mmSolver

To build the project you can use the build scripts provided.

Build Script Name Operating System
build_mmSolver_linux_mayaXXXX.bash Linux
build_mmSolver_windows64_mayaXXXX.bat Windows

For details of building the project, please see BUILD_LINUX.md or BUILD_WINDOWS.md.