The Didimo CLI is a developer tool that assists in using the Didimo API from your terminal. It works on macOS, Windows and Linux and only requires Python 3 to be installed.

Quickstart

The CLI is written in Python 3 and is distributed as a package on PyPI, so it can be installed with pip. You may also find the code on our public Github repo.

pip3 install didimo-cli --upgrade # if you don't have a previous version already installed, you can omit the --upgrade

Create a new configuration and input your API Key. If you do not have an API Key, please refer to Generate an API Key.

didimo init <configuration name>

After setting up the CLI, you can check your account information.

didimo account

Now that the CLI is configured, let's generate a didimo based on a photo.

didimo new photo <path to the photo>

The CLI will wait for the didimo generation process to be completed and downloads the result as a zip file.
You can list your didimos with:

didimo list

Didimo generation

Generating a didimo may include several options, as described on Generate a New Didimo.

The tool allows the selection of the avatar structure (--avatar-structure), for which it currently accepts full-body or head-only (default) options.

Didimo CLI currently accepts the following features (-f):

  • oculus_lipsync
  • simple_poses
  • arkit
  • aws_polly

The CLI accepts the following output formats (-p):

  • glTF
  • FBX

In addition to those, it also accepts:

  • the definition of the maximum texture dimension (-m)
  • the definition of the garments (--garment). This option is only available for full-body didimo requests;
  • the definition of a gender (--gender). This option is only available for full-body didimo requests.
didimo new photo <path to the photo> --avatar-structure full-body --garment sporty --gender female -f simple_poses -f aws_polly -m 2048 -p fbx -p gltf

It's also possible to specify a PNG depth file (only available for Apple generated depth files) using

didimo new rgbd <path to the photo> -d <path to the depth file>.png --avatar-structure full-body --garment sporty --gender female -f simple_poses -f aws_polly -m 2048 -p fbx -p gltf

Fit a custom hair on your didimo

In order to fit a hair on your didimo, you'll need the didimo DMX file, which you may find inside the didimo package, with the name deformation_matrix.dmx.

# Assuming you have a package with the name Ax817882ylatxKfa1h_gltf.zip
unzip -p Ax817882ylatxKfa1h_gltf.zip deformation_matrix.dmx > Ax817882ylatxKfa1h_deformation_matrix.dmx

Now that we have the DMX file, we can execute the deformation on hair_0XX.obj (more information on hairstyles can be found here).

didimo execute vertexdeform Ax817882ylatxKfa1h_deformation_matrix.dmx hair_0XX.obj

Generate a set of default hairs for a didimo

In order to generate a set of default hairs for your didimo, you'll need the didimo DMX file, which you may find inside the didimo package, with the name deformation_matrix.dmx.

# Assuming you have a package with the name Ax817882ylatxKfa1h_gltf.zip
unzip -p Ax817882ylatxKfa1h_gltf.zip deformation_matrix.dmx > Ax817882ylatxKfa1h_deformation_matrix.dmx

Now that we have the DMX file, we can request the hair bundle (more information on hairstyles can be found here).


didimo execute hairsdeform Ax817882ylatxKfa1h_deformation_matrix.dmx

For further information on the available options and parameters, please use --help.

didimo --help

Did this page help you?