Skip to content

Instantly share code, notes, and snippets.

@FelixWolf
Last active September 8, 2022 16:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FelixWolf/364e8f598717537eabdd790d2369181a to your computer and use it in GitHub Desktop.
Save FelixWolf/364e8f598717537eabdd790d2369181a to your computer and use it in GitHub Desktop.
How to install, setup, and use the puppetry viewer and plugins

How to use LEAP on windows

Note on instructions

There are a lot of steps involved here, but that's because this is in-development. Once this is finalized, people will be developing stuff that is stand alone, without the need to install all this stuff.

Important pre-install steps

If you have python installed from the windows store, UNINSTALL IT! Windows store installs python in a virtual environment, which makes it not work very well.

Installing Visual C++

In order for python to compile some packages, you will need to install VC++.

You can get that here: https://visualstudio.microsoft.com/downloads/

I don't have steps for setting this up, but it should be straight forward.

Installing CMake

In order for python to compile some packages, you will need to install CMake.

You can get that here: https://cmake.org/download/

I don't have steps for setting this up, but it should be straight forward.

Installing Python

  1. Go to https://www.python.org/downloads/windows/
  2. Click the Latest Python 3 Release - Python 3.#.# link Note that the # are numbers that may be different as python updates regularly.
  3. Scroll all the way down until you see "Files".
  4. Download the "Windows installer (64-bit)" file.
  5. Run the installer
  6. When it asks if you want standard or custom, choose "custom"
  7. When it asks for "Optional features", choose all the check boxes.
  8. When it asks for "Advanced options", ensure that "Install for all users", "Associate files with python", "Create shortcuts for installed applications", "Add python to environment variables", and "Precompile standard libraries" are all checked.
  9. Once complete, open command prompt and type python --version. If it worked, it should say "Python version 3.#.#" or similar.

Installing required modules

Open command prompt, we are going to type these in one by one, so that we know where it fails, if it fails. It shouldn't though, but knowing where helps for debugging.

  1. python -m pip install llbase
  2. python -m pip install pyglm
  3. python -m pip install opencv-python
  4. python -m pip install mediapipe

If you see a message saying that "WARNING: The scripts * are installed in * which is not on PATH.", you can ignore that. It simply means that those commands cannot be ran directly from command prompt. If you know what you are doing, you can fix this, but it is absolutely not required.

Installing LEAP plugins

  1. Go to https://bitbucket.org/lindenlab/leap/src/main/
  2. Click the "..." next to the "Clone" button and choose "Download Repository"
  3. Extract the folder to any place, desktop is a easy location to access it. BUT ensure that the contents are in their own folder.
  4. Open command prompt and type "cd "(with a space at the end, don't hit enter), and then DRAG the folder that contains the setup.py into the command prompt window. You should see something like this in the command prompt: cd "C:\users\exampleuser\desktop\leap" If so, press enter.
  5. Type pip install -e .

Installing the Puppetry viewer

  1. Go to https://releasenotes.secondlife.com/viewer.html
  2. Download the latest "Second Life Project Puppetry" from the Project Viewers.
  3. Select Windows 64
  4. Install it as per usual.

Getting in

See https://wiki.secondlife.com/wiki/Preview_Grid#How_do_I_log_in_to_Aditi.3F for more information on how to log into the Aditi preview grid

Using Puppetry

First you will want to go to a region that currently supports the puppetry packets and capabilities.

Here are a list of supported regions as of right now:

  1. secondlife://util.aditi.lindenlab.com/secondlife/Bunraku/128/128/27
  2. secondlife://util.aditi.lindenlab.com/secondlife/Marionette/128/128/27
  3. secondlife://util.aditi.lindenlab.com/secondlife/Castelet/128/128/27 (User group region)

Once there, you need to access the Advanced menu. You should see the advanced menu on the menu bar(The thing with the "Avatar", "Comms", "World", "Build", etc). If you do not, go to World > Show more > Advanced, and it should appear.

Open the advanced menu and look for the "Puppetry" submenu. Click the "======" lines so we can pop the menu into a window.

Now click "Launch plug-in...", a file selector dialog will appear.

Nagivate to where you extracted the "LEAP" files, choose the sub folder named "puppetry", and then choose "webcam", look for the file named "webcam_puppetry.py".

A window should appear, and you should be able to control your avatar with your webcam!

If you do not have a webcam, you can try the examples in the "examples" folder of the "puppetry" folder.

Trouble shooting

Feel free to shoot me a IM in second life and I might be able to tell you what went wrong. Be sure to include the step you failed at, and any error messages, and also upload your secondlife.log, as it includes errors from the puppetry plugins.

I am Félix (Chaser Zaks) on Second Life.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment