Skip to content

Installation

This page explains how to install the costumy prototype project.

Requirements

To use costumy you will need :

Note

You must use python 3.10.0 exactly.
Blender is released as a python package (bpy) that requires a specific python version to work.

Installation steps

Installing the basics

To install costumy you may do the following :

  1. Install Python 3.10.0
  2. Install Node.js
  3. Clone Costumy's repository in the location of your choice

Next, you will need to create a virtual environment.

Creating the virtual environment

  1. Navigate to costumy's repository root in a terminal.
    You want to be in the repository root, not within the costumy package.

    cd path/to/my/dir
    
  2. Create the virtual environment

    py -3.10 -m venv venv
    

    Note

    Windows has a python manager installed (py). On other OS, you might need to do something like path/to/python3.10 -m venv path/to/project. See venv docs

  3. Activate the virtual environment

    ./venv/Scripts/activate
    
  4. Upgrade the virtual environment's pip

    python -m pip install --upgrade pip
    

Now that the virtual environment is activated, time to install the dependencies

Installing the dependencies

Python dependencies

Within the activated virtual environment's terminal do the following:

  1. Install costumy's dependencies

    python -m pip install -r requirements.txt
    
  2. Install costumy itself in editable mode

    python -m pip install -e .
    
  3. Optional but recommended
    Install the documentation dependencies

    python -m pip install -r requirements_docs.txt
    

Node.js modules

To install the Node.js dependencies, you may do the following :

  1. Open a new terminal (or deactivate the venv)
  2. Navigate to costumy/node/

    cd costumy/node/
    
  3. Install the node.js modules :

    npm install
    

Next Steps

Virtual Envrionment

Once you are done installing Costumy, you must use the created virtual environment for costumy to work.

To use costumy at its best you should do the following :

  • build the docs as they are intended to be seen as a static site
  • If you want to use costumy.bodies.SMPL or costumy.bodies.Cmorph, install them

Installing Bodies (Blender Addons)

This sections explains how to install bodies for costumy.

Warning

Bodies are not included with costumy.
They are optionnal and fall under different licences. See Limitations and Licences.

Mb-Lab (Cmorph)

Quote from MB-Lab models licence:

The AGPL can be an obstacle in case someone wants to create a closed source game or closed source 3D models using 3D characters made with the lab because the AGPL will propagate from the base models and from the database to the output models.

To use MB-Lab models, you can follow the steps below:

  1. Download the CharMorph v0.3.5 Add-on.
  2. Unzip the Add-on and open it
  3. Copy the CharMorph folder and paste it in costumy/data/addons

There should now be a file located at costumy/data/addons/CharMorph/__init__.py

SMPL

Quote from SMPL model licence:

Licensor grants you (Licensee) personally a single-user, non-exclusive, non-transferable, free of charge right:

  • To install the Software on computers owned, leased or otherwise controlled by you and/or your organization;
  • To use the Software for the sole purpose of performing non-commercial scientific research, non-commercial education, or non-commercial artistic projects;
  • To modify, adapt, translate or create derivative works based upon the Software.

Any other use, in particular any use for commercial purposes, is prohibited.

To use the SMPL bodies:

  1. Create an account on the SMPL website (free)
  2. Download the blender Add-on
  3. Unzip the Add-on and open it
  4. Copy the smpl_blender_addon folder and paste it in costumy/data/addons
  5. Open the file costumy/data/addons/smpl_blender_addon\__init__.py with a text editor
  6. Change the line 371 from

    vertices_np = np.zeros((len(mesh_from_eval.vertices)*3), dtype=np.float)
    

    to

    vertices_np = np.zeros((len(mesh_from_eval.vertices)*3), dtype=float)
    
  7. Save your changes

If you did it right, there should be a file located at costumy/data/addons/smpl_blender_addon/__init__.py