/nanoem

nanoem is an MMD (MikuMikuDance) compatible implementation and its like cross-platform application mainly built for macOS.

Primary LanguageCOtherNOASSERTION

nanoem

Build Status Documentation Status License: MPL 2.0 License: MIT

nanoem is an MMD (MikuMikuDance) compatible implementation and its like application mainly built for macOS.

Screenshot

nanoem for macOS

Background and Design Concept

MikuMikuDance (a.k.a MMD) is created on Windows via DirectX9. As such, it's unavailable to run on non-Windows deployment unless you use a virtual machine or emulation layer such as Wine.

nanoem was originally created to address the issue of non-Windows compatibility as well as the possibility it may not work in the future due to Windows reason. It was originally designed for macOS but now it's now designed to run on non-macOS as well and supports ARM CPU such as Apple M1 and RaspberryPi, multiple graphics backends (DirectX11/Metal/OpenGL).

It also has model editing feature similar to PMXEditor's one which allows for some model editing. This was also implemented for the same reason mentioned above.

nanoem is designed to achieve both of the following goals.

  • Portability
  • Lightweight startup
  • Small size

How to build?

Prerequisites

  • cmake (>= 3.5)
  • C++14 compliant compiler
    • confirmed on Clang and Visual Studio 2017
  • git
  • ninja-build
    • Optional but recommend on macOS/Linux

Minimum build instruction

See also GitHub Action Workflow.

git submodule update --init --recursive

# needs setting NANOEM_TARGET_COMPILER explicitly when the compiler is clang (default is gcc on Linux)
export NANOEM_TARGET_COMPILER=clang
cmake -P scripts/build.cmake
mkdir out
cd out
cmake -G Ninja ..
cmake --build .

# OpenGL 3.3 Core Profile or higher is required to run on Linux
cd sapp && ./nanoem
Options Table of scripts/build.cmake
Name Description
NANOEM_TARGET_ARCHITECTURES Target architectures to build. The default value is x86_64 (non macOS) or ub (means Universal Binary, macOS).
NANOEM_TARGET_CONFIGURATIONS Target configurations for cmake. The default value is debug;release.
NANOEM_TARGET_MACOS_VERSION Target macOS version. Same as CMAKE_OSX_DEPLOYMENT_TARGET.
NANOEM_TARGET_GENERATOR Target generator for cmake. The option will pass as cmake -G ${NANOEM_TARGET_GENERATOR}
NANOEM_TARGET_COMPILER Target compiler for cmake.
NANOEM_TARGET_TOOLSET Target toolset for cmake. The option will pass as cmake -T {NANOEM_TARGET_TOOLSET}
NANOEM_MAKE_PROGRAM Make program to use for cmake. Same as CMAKE_MAKE_PROGRAM.
NANOEM_DISABLE_BUILD_NANOMSG Disable building nanomsg.
NANOEM_DISABLE_BUILD_TBB Disable building Threading Building Blocks.
NANOEM_ENABLE_BUILD_ICU4C Enable building ICU. You must run following command git clone https://github.com/unicode-org/icu/ dependencies/icu before enabling the option.
NANOEM_ENABLE_BUILD_MIMALLOC Enable building mimalloc.
NANOEM_ENABLE_BUILD_SPIRV_TOOLS Enable building SPIRV-Tools.
NANOEM_ENABLE_BUILD_SENTRY_NATIVE Enable building Sentry C/C++ SDK.
NANOEM_ENABLE_BUILD_LIBSOUNDIO Enable building libsoundio. You must run following command git clone https://github.com/andrewrk/libsoundio dependencies/libsoundio before enabling the option.
NANOEM_ENABLE_BUILD_GLFW Enable building GLTF. You must run following command git clone https://github.com/glfw/glfw dependencies/libsoundio before enabling the option.
NANOEM_ENABLE_BUILD_FFMPEG Enable building ffmpeg. You must run following command git clone https://github.com/ffmpeg/ffmpeg dependencies/ffmpeg before enabling the option.
NANOEM_ENABLE_BUILD_YAMLCPP Enable building yaml-cpp. You must run following command git clone https://github.com/jbeder/yaml-cpp dependencies/yaml-cpp before enabling the option.

Architecture

See Architecture Document (Japanese)

About License

Contributors