Pose2Sim_Blender
is a Blender add-on for visualizing Pose2Sim results -- and more.
N.B.:
- Faster .mot import
- Fixed various issues
Pose2Sim is an open-source pipeline for obtaining research-grade 3D motion analysis from consumer-grade cameras (such as phones, webcams, GoPros, etc).
This add-on can be used to visualize:
.toml
file).trc
or .c3d
file).osim
models, .mot
motions, and .mot
forces)N.B.:\ OpenSim is an open-source software for research in biomechanics, widely used in motion capture (MoCap).\ Blender is an open-source software used for 3D modeling, animation, and rendering.
https://github.com/davidpagnon/Pose2Sim_Blender/assets/54667644/a2cfb75d-a2d4-471a-b6f8-8f1ee999a619
N.B.: Full install is required for importing
.mot
motion files.
Pose2Sim Blender
to enable itn
or Click on the tiny arrow on the upper-right corner of the 3D viewport to open the toolOnly needed for importing
.mot
motion files.
Full installation requires admin rights on your computer. It is a little tricky, but the following steps should do it smoothly. If you encounter any issues, please submit an issue. Only Windows has been tested, but feel free to tell me how it goes on other platforms!
Open Blender, press Shift+F4, type the following lines:
import sys
sys.version
conda create -n Pose2Sim_Blender python=3.10.13 -y
conda activate Pose2Sim_Blender
conda install -c opensim-org opensim -y
pip uninstall numpy
pip install numpy bpy toml vtk
C:\Users\<USERNAME>\miniconda3\envs\Pose2Sim_Blender
):
conda env list
# from .moco import *
os.add_dll_directory(r"C:/OpenSim 4.5/bin")
.\
Replace 4.5 with the version you installedOpen CMD as an administrator.\ Replace with your Blender version and with the location of your Pose2Sim_Blender environment:
cd "C:\Program Files\Blender Foundation\Blender 4.0\4.0"
mv python python_old
mklink /j python <LOCATION_OF_POSE2SIM_BLENDER_ENV>
mv /j python\DLLs python\DLLs_old
mklink /j python\DLLs python_old\DLLs
mklink /j python\bin python_old\bin
Now, any package you install in your conda environment will immediately be available in Blender.
Pose2Sim_Blender
to enable itn
or Click on the tiny arrow on the upper-right corner of the 3D viewport to open the toolFind example files in the Examples
folder of your Pose2Sim_Blender.zip archive.
.toml
calibration file from Pose2Sim..toml
calibration file..trc
or a .c3d
marker file, e.g., generated by Pose2Sim triangulation.\
N.B.: Make sure you entered the right Target framerate
(upper right corner)..osim
model. \
If you did the full install and some Geometry files exist only as .vtp, they will automatically be converted to .stl..mot
or a .csv
motion file. N.B.: Make sure you entered the right Target framerate
(upper right corner).
.mot
file. Calculating all body segment positions may take a while if the model is complex or if there are many time frames. Creates a .csv file for faster loading next time..mot
GRF force file.\
N.B.: Make sure you entered the right Target framerate
(upper right corner)..abc
Alembic "baked" file, for fast import into other softwares.If you use Pose2Sim_Blender, please cite Pagnon et al., 2022b.
@Article{Pagnon_2022_JOSS,
AUTHOR = {Pagnon, David and Domalain, Mathieu and Reveret, Lionel},
TITLE = {Pose2Sim: An open-source Python package for multiview markerless kinematics},
JOURNAL = {Journal of Open Source Software},
YEAR = {2022},
DOI = {10.21105/joss.04362},
URL = {https://joss.theoj.org/papers/10.21105/joss.04362}
}
I would happily welcome any proposal for new features, code improvement, and more!\ If you want to contribute to Sports2D, please follow this guide on how to fork, modify and push code, and submit a pull request. I would appreciate it if you provided as much useful information as possible about how you modified the code, and a rationale for why you're making this pull request. Please also specify on which operating system, as well as which Python, Blender, OpenSim versions you have tested the code.
Here is a to-do list. Feel free to complete it: