I am very new to animation and rendering softwares, so please let me know if I need to provide more information about this. I have a sequence of 3D positions of human joints (basically mocap data), representing different kinds of walking. I have managed to visualize the sequence using python, as I have shown in this video. Each data I have is a numpy array of size TxJx3, where T is the number of frames, J is the number of joints (21 in my case), and 3 represents the 3 co-ordinate values. So my question is, how can I convert these 3D positions into a BVH file, that I can load into blender? Or convert them to any other format so that I can load these data in blender?
How to convert 3D pose sequences to the bvh file format?
5.3k Views Asked by mauve127 At
1
There are 1 best solutions below
Related Questions in NUMPY
- Why numpy.vectorize calls vectorized function more times than elements in the vector?
- Producing filtered random samples which can be replicated using the same seed
- Numpy array methods are faster than numpy functions?
- When I create a series of spectrograms from a long audio file, the colour intesities vary noticably
- How do I fix a NumPy ValueError for an inhomogeneous array shape?
- How should I troubleshoot "RuntimeWarning: invalid value encountered in arccos" in NumPy?
- Unravel by multi-index/group
- Calculating IRR Using Numpy
- Integrating with an array of upper limits without sacrificing time efficiency
- Why doesn't this code work? - Backpropagation algorithm
- How to remove integers from a mixed numpy array containing sub-arrays and integers?
- How to transfer object dataframe in sklearn.ensemble methods
- Rust cannot borrow as mutable
- Why does the following code detect this matrix as a non-singular matrix?
- How to detect the exact boundary of a Sudoku using OpenCV when there are multiple external boundaries?
Related Questions in BLENDER
- Blender mesh-cleanup reduces number of vertices but in Three.js it doesn't
- how to use knife_project with python script in blender 4.0? it promat me knife project.poll() expected a view3d region & edit mesh
- How do I bake a normal Map in Blender?
- Error: 'Mesh' object has no attribute 'use_auto_smooth' when importing .zmbx (Metabricks) file into Blender
- LibGDX Normal Textures Not Showing Up in 3D (Blender) Model Java
- Spacing out overlapping rectangles: how to translate pseudocode?
- when rendering their project the video size became distorted, resulting in stretched visuals despite the frames being perfectly rendered
- Blender Python Reported texture size limit error
- unable to load .fbx file using bpy on AWS lambda: " IMB_loadifffile: couldn't get mapping /tmp/. "
- Blender animation doesn't import in UNREAL ENGINE
- Cant get this bianchi-Pinkall script to work in blender
- Bake sound to f curve on Geometry Node via Python API
- AttributeError: 'module' object has no attribute 'inputs'
- Blender image sequence (png) to Unity
- Problems with eye shading
Related Questions in MO-CAP
- Calculate angles from 3d skeleton points for BVH file
- Processing raw Mocap data into a Skeletal Joints (BVH)
- Mocap animation is tilted only upon import into Unity?
- Is it a good idea to use Drake for motion capture problems
- Avatar Pupettering with ThreeJS, ReadyPlayerMe, Kalidokit and MediaPipe
- Rotation conversion between OpenGL and Unity, does rotation order matter?
- ARKit – Body Tracking inaccuracy
- How to get rotation(Euler angle) between two 3D vectors? (to make bvh format)
- Visualize Moiton Capture data with Python
- Blender Import BVH file and render this skeleton to make video
- How to convert 3D pose sequences to the bvh file format?
- "Avatar creation failed: Transform 'Hips' for human bone 'Hips' not found" when trying to choose Humanoid Rig for mocap animation FBX
- How to make these Mocap Animation FBX's work with Unity?
- Unity3D: Are motion captured animations alot less compatible on mobile?
- How to get Nao robot's joint coordinates?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
OK, found the solution myself. Posting here in case anyone else finds this useful. Please excuse the absence of LaTeX rendering, apparently, stack overflow does not support it (yet), and I'm too new here to be able to attach images.
So, in the BVH format, the following relationship holds between the joints:
$$pos_j = R_{P(j)}offset_j + pos_{P(j)}$$
where $pos_j$ indicates the 3D position of joint $j$, $P(j)$ returns the parent of joint $j$ in whatever DAG the positions are modeled in (generally the DAG starts at the root and points towards the end-effectors) $offset_j$ indicates the offset of joint $j$ relative to its parent $P(j)$ (aka the connecting limb), and $R_{P(j)}$ is the 3D rotation that determines how much should $offset_j$ be rotated from an initial pose (generally a T-pose). In the BVH format, for each parent $P(j)$, we need to store $R_{P(j)}^{-1}R_j$.
The main trouble I had then was working with joints that had multiple children, for example, the root joint, which has connections to both legs as well as the spine. I eventually came across this repo and digging through their function
forward_kinematicsinsideskeleton.py, realized what to do. Basically, for joints with multiple children, I had to make copies with $offset=0$, and assign those as parents of the corresponding chains. Thus I made 3 copies of the root: one became the parent for the left leg chain, one for the right leg chain, and one for the spine. And similarly for the other parents with multiple children. And yes, the visualization works great!