Giter Club home page Giter Club logo

ofxbvh's People

Contributors

2bbb avatar kylemcdonald avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

ofxbvh's Issues

Cropping/splitting motion data

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.

make example of rigging ofxFBX from ofxBvh

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.

average the frame duration for playback

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.

Bulk data lookup

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();

Separate reading/writing motion from reading/writing matrices

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

Rendering is not correct

If you watch a BVH file play back, the feet do not stay on the floor.

Things that I tried to change:

  • x/y/z positions are signed correctly
  • axes for rotation are signed correctly
  • rotation order seems correct
  • changing preMult seems correct

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.

https://github.com/perfume-dev/example-openFrameworks

https://github.com/openframeworks/openFrameworks/tree/0071

Euler angle compile issue

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;

Downsampling of motion data

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.