Real-time facial motion capture in Blender 2.8 using OpenCV and a webcam. This uses python scripting directly in Blender.
# Import sys and use sys.path to get Blender's default python path
import sys
sys.path
# Find the path from the output, something like that
/Applications/Blender.app/Contents/Resources/2.82/python/bin/python3.7m
# Go to the default python directory of Blender, something like that
cd /Applications/Blender.app/Contents/Resources/2.82/python/
# Use Blender's default python to install, something like that
./python3.7m -m ensurepip
./python3.7m -m pip install --upgrade pip --user
./python3.7m -m pip install opencv-python opencv-contrib-python imutils numpy dlib --user
https://cloud.blender.org/p/characters
http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2
https://ibug.doc.ic.ac.uk/resources/facial-point-annotations/
- dlib installation failed.
brew install dlib
brew install cmake
# Use Blender's default python to install, something like that
./python3.7m -m pip install boost
./python3.7m -m pip install cmake
- Python.h not found.
# Install same version of your Blender's default python version, something like that
brew install [email protected]
brew link [email protected]
# Find Python.h
sudo find / -iname "Python.h"
# "your_python_directory" is the directory of your Python.h location
export C_INCLUDE_PATH=${your_python_directory}
export CPLUS_INCLUDE_PATH=${your_python_directory}
- When "Capture" button is clicked, Blender turns off.
# Open Blender using the command line, something like that
/Applications/Blender.app/Contents/MacOS/Blender