Thursday, June 22, 2017

Collision Deformer

Recently I learned a bit about writing nodes in maya and decided to start working an a collision deformer.

It allows for ground and mesh-to-mesh collisions. There are also parameters for thickness (which will push the mesh vertices along the targets normals) and I experimented a little bit with stickiness.

Before this video sits to long on my HD collecting dust before I touch this project again  I thought I'd share the current state of it in a quick video.


Wednesday, June 21, 2017

Video tracker improvements

Just a quick post as this a significant quality improvement on tracking!

It seems like in some footage its actually better to slightly blur the video, I guess that makes sense as is sort of averages the colour values, less noise and more coherent error rates.

After this I also apply a gaussian filter to the keyframes, which eradicates the high frequency oscillations but still largely keeps the original positions. Getting really happy with these results now!

 

Monday, June 19, 2017

How to train your face tracking

Last week I was talking to a colleague at work about different facial tracking software and thought that it can't be that massively complicated to write a basic software that tracks pixels.
"All it needs to do is compare a bunch of colour values right?"

Sure it can probably be much more complicated than that but I thought I'd give it a shot and after a week of endless nights I have a first result that I am pretty happy with.

The solution I went for was essentially just looking for sub-images (a region defined by tracker points) in larger images (a larger area around the tracker points) over and over again. Each possibility gets an error rating and after trying every possible combination the software will pick the solution with the smallest error rate. Once a solution is picked it will do this again but now with the pixel values of the new region.

I first tried an external tool called ImageMagick for the tracking itself but found it to be very slow. Luckily this forced me into having to learn absolutely everything from scratch and its actually much faster and accurate now. I used the PIL library to do the pixel walking and image manipulation required, everything else is just using python standard libraries.

As you can see in the video its still quite jittery, and the area around the mouth is especially hard to track as it can accelerate really quickly, stop very abrupt and change shape significantly.

Mostly I am just tapping in the dark, as I don't have any expertise on this topic but I am hoping to improve the tracking by prediction the future position over several frames, doing a constant error check on that and widen the search area based on that error rate. Another thing I had in mind was maybe constantly comparing the current sub-image to the original one and once the difference between them is quite large then maybe use a combination of the prediction error rate and stabilisation through the neighbours.

If anyone reading this has any ideas on what I should do different, I would love to hear about them, please give me a shout!

Tuesday, March 14, 2017

Maya C++ Plugin Environment on Mac OSX

This is just a quick guide for all the Mac users out there that are trying to build Maya plugins in C++.

I learned a lot about CMake and compiling for maya from Chad Vernon's series, if you have a bit of time on your hands, I definitely recommend going through this as it will be very detailed.

For this example I also used Chad Vernon's BlendNode that he was so nice to share.


Tuesday, March 7, 2017

Pose Space Reader

I'am alive and well, thanks for asking!

I know it has been quiet here, I haven't been showing any progress for a while. I am slowly getting back into a habit of learning new things and sharing them here. After a huge learning experience digging into the Maya API I am calling this project done, at least for now while I move on to other things😊

I present to you my first maya plugin. Pose space nodes are most commonly used to hook up corrective blendshapes to a mesh, but can be used for anything you want really. To hook it up you can select a joint and add the pose space reader node to it. It will also create a locator along with it, which will be used as the target node.

The pose space reader node will then output a float between 0-1 depending on how close the locator is to the center of the cone. There is a length attribute for visualisation purposes on it but the cone used for the calculations is in deed infinitely long.

I can only recommend writing this, especially if you want to get better at trigonometry! All in all, a really fun project that made me pick up my pen and get to the bottom of some things I always wanted to know.

Now enough talk, enjoy the video

Thank you hippydrome.com for providing the model