kylemcdonald / ofxbvh Goto Github PK
View Code? Open in Web Editor NEWopenFrameworks addon for parsing, rendering, manipulating and saving BVH files.
License: MIT License
openFrameworks addon for parsing, rendering, manipulating and saving BVH files.
License: MIT License
In some cases it may be helpful to save new files with a "cropped" selection of the motion data. This can probably be done in external GUI editors for BVH as well, so it's not a high priority.
it should "just work" depending on how you rigged your FBX model, but there might be orientation problems and it would be good to have an example of how to fix that.
playback often drops frames because OF alternates between short and long frames. if we instead use an average of the last few frames to predict the "real" frame time, then playback may be more accurate.
this could simplify some of the code, writing ofxBvhJoint::channels
as ofxBvhJoint::raw.size()
vector<vector<glm::mat4>> ofxBvh::getLocalMats();
vector<vector<glm::mat4>> ofxBvh::getGlobalMats();
possibly also the transposed version:
vector<vector<glm::mat4>> ofxBvh::getLocalMatsByJoint();
vector<vector<glm::mat4>> ofxBvh::getGlobalMatsByJoint();
Cache the index and name mappings when building the hierarchy.
vector<double> ofxBvhJoint::raw;
void ofxBvhJoint::updateMotion(vector<double>::const_iterator& frame); // write to raw
void ofxBvhJoint::updateMatrices(glm::mat4 global); // write to localMat and globalMat
void ofxBvhJoint::readMotion(); // read from raw to vector<double>
void ofxBvhJoint::readMatrices(); // read from localMat to raw
If you watch a BVH file play back, the feet do not stay on the floor.
Things that I tried to change:
One possible explanation is that the way OF handles the transformations used for rendering has changed from the version of OF that ofxBvh was initially written for. In 2012 this would have been 007 or 0071.
I've found that I need to add this #include to get ofxBvh to compile (OF 0.11) -- otherwise there's an error No member named 'eulerAngleX' in namespace 'glm'
#include "ofxBvh.h"
#include "ofMain.h"
#include "euler.h"
#include <glm/gtx/euler_angles.hpp>
using namespace std;
For machine learning it might be helpful to downsample data: for example, from 120Hz to 40Hz. To downsample correctly requires running a low pass filter, which is not trivial for the rotation data.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.