openFrameworks, ofxCV, and ofxFaceTracker

ofxFaceTracker

Really bad ofxFaceTracker expressions example :D

I wish I could say I am a cool kid for figuring this out but this code has been around for some months now, but finally I got to see what all the fuss is about the past couple weekends. I feel like my first steps are pretty insignificant when you look at all the creative stuff that’s already been achieved with this, but still it’s so much fun to build these projects from source and play around with just my macbookpro and iSight.

It’s no excuse but I’ve been too busy with other side projects to get around to it ’till now.  At long last I cloned the openFrameworks github repo along with ofxFaceTracker.  After a couple years almost of knowing about these projects, the veil has finally been completely lifted!

After learning a bit about openFrameworks and cloning it I realized how clean and organized it is, making it easy to learn and extend.

I think this is my new playground for a while.  There are so many add-ons already to play with even ones for arduino and iphone.  Plopping in ofxFaceTracker was really much easier than it could have been, although I did do some clean-up of some libs and subsequently tweaking and reconfiguring the projects and solutions

Plowing through all the opencv and openFrameworks examples became a breeze and after soaking in all that information I decided to see if the face tracker software would work. It’s stunning to think that this is freely available out there and, above all, works! I have in my hands technology once only available through proprietary channels and I can dig in and see how it all works. I’m a kid in a candy store!

I hope to apply my expertise in facial animation to write an ofxFaceRetargeter to collect and remap data from the tracker onto a creature/character although it seems this has already been achieved through proprietary software like faceshift available in Autodesk App Exchange.  Things are changing so rapidly…  I need to dip my toes into Unity3d and C++ more in the coming weeks.

 

VStudio Plugin Build Environment for Maya_2012-x64 and Beyond

maya2011_thumbFree yourself from relying on other people to compile your beloved 3rd party plugins.  If you are interested in learning to write plugins it’s a great exercise to do it yourself.  Also take a look at the source code.  If it doesn’t make sense at first, sooner or later it will if you are dedicated to learning c++ or python or other OOP language for that matter.

Here are some concise steps to downloading, editing, and building the source of Micheal Comet’s poseDeformer yourself.  I’m not supplying the link to the source but you should do a quick search to find it.  If you weren’t aware of this awesome plugin dig in to figure out what it does by reading all about it and actually look into the code!  There are also download links out there that have the plugin completely compiled for you on Windows up till 2014.  To really learn, try building it from just the source and then undo from last to first the steps to setup the environment to see what happens when a project fails and actually read the debug output to try and make the connections yourself.

Windows 7 SDK:

  1. Download and install the Windows Software Development Kit version 7.1. Visual C++ 2010 Express does not include a 64 bit compiler, but the SDK does. A link to the SDK:http://msdn.microsoft.com/en-us/windowsserver/bb980924.aspx

To make a VC Studio 2010 project:

  1. Start a new empty project in a directory other than source, name it poseDeformer
  2. Add the source files and header files by right clicking > add > add existing > choose files from extracted source.
  3. Right-click on the project and choose “properties”
  4. It’s probably a good idea when you’re following along to click “apply” after each step when you’re editing in the “properties” dialog
  5. Pull up the “configuration manager”
  6. Find your project, hit the Platform drop-down, select New, then select x64. Now change the “Active solution platform” drop-down menu to “x64.”  ”copy from” drop down can read <empty>
  7. Change your toolset. In the Properties menu of your project, under Configuration Properties > General, change Platform Toolset from “v100″ to “Windows7.1SDK”
  8. Go to General under Configuration Properties
  9. Set the target extension to “.mll”
  10. Set the platform toolset to “Windows7.1 SDK”
  11. Set the configuration type to “dynamic link library (.dll)”
  12. Go to the VC++ Directories panel
  13. Append “;C:\Program Files\Autodesk\Maya2012\include” to the include directories
  14. Append “;C:\Program Files\Autodesk\Maya2012\lib” to the library directories
  15. Navigate to C/C++ and Preprocessor
  16. Append “;NT_PLUGIN;REQUIRE_IOSTREAM” to Preprocessor Definitions
  17. Navigate to Linker and Input
  18. Append to additional dependencies the following list: “;Foundation.lib;OpenMaya.lib;OpenMayaUI.lib;OpenMayaAnim.lib;OpenMayaFX.lib;OpenMayaRender.lib;Image.lib”
  19. This step is optional, some instructions out there say to append: /export:initializePlugin /export:uninitializePlugin to Linker > Command Line Additional Options.  Don’t do it and run debug compilation to see if it works first!
  20. Open up poseDeformer.cpp and poseDeformerEdit.cpp and append this line at the top of the includes: #include <maya/MIOStream.h>
  21. Build

Next up:  Speed up build for future Maya releases with precompiled Maya headers & compile for Linux.

Helpful source link:
 

Minecraft Pi Edition Python Maze Generator

Rasp_turn_aroundThanks @Dave Finch for this great example! This is my favorite of all the Minecraft scripts out there already.  I’ve update this great tool with a little more Python fancy schmanciness.  Made it object oriented and added some functionality with the idea of upgrading the algorithm to generate the maze, make it 3D, and add some funkiness.  Stay tuned!

Maze mas grande, por favor!

Maze mas grande, por favor!

un maze mas pequeno por favor!

un maze mas pequeno por favor!

Continue reading

 

Headless RPi Gets it on with Dashing Arduino

These are my first explorations with the RaspberryPi in conjunction with Arduino.  I try to keep things as simple as possible and only use Cygwin terminal to administer the Raspi remotely via ssh or sftp.  Sometimes its just easier to use WinSCP to graphically drag and drop a bunch of files though.  For forwarding X11 I use Cygwin’s installation of XWin on my Windows machine as the client.  It’s as simple as setting the DISPLAY env variable and opening a ssh connection in conjunction with using the display forwarding option.

The Setup

  • Windows 7 PC running Cygwin with XWin
  • RaspberryPi running Raspbian — Debian Wheezy for RPi
  • Arduino powered with an old Linksys modem DC adaptor
  • Additional software: ssh, sftp, winSCP, Processing, Arduino, VICE
  • All software is free and open-source
  • All hardware is open-source and very cheap or salvaged!
RaspberryPi with Arduino

RaspberryPi with Arduino, 2 Hearts beating in just one LED.

Continue reading

 

[Maya-Config] Maya Environment: Phase I.I

maya2011_thumbThis post includes some additional important support material for what was discussed in [Maya-Config] Phase I.  I felt it needed a bit more elaboration than what I had time for.  I will continue with Phase II next time.

Felix Baumgartner Red Bull Stratos Space Jump Oct 14 2012

Felix Baumgartner Red Bull Stratos Space Jump Oct 14 2012

Continue reading

 

[Maya-Config] Maya Environment: Phase I

maya2011_thumb

How do you tame the beast that is your ever growing collection of mel, cpp/python plug-ins, and python scripts?

Curate a library of cross-platform, multi-language extensions!

Teach yourself how to setup a proper library of Maya tools by following the steps outlined here. This is by no means the only way to do it. [edit: This is strictly for learning purposes and not intended for production use, but by all means apply what you learn to your specific production needs at your discretion!] It can get as sophisticated as time permits and as your production demands. To put it simply, this is a great starting place for people wanting to learn some of the basics of how to manipulate your Maya environment. The techniques described are simple, however this isn’t a Maya beginner task so I assume the reader knows a bit about scripting, how to use a shell or command line, and other Maya internals of course. I am willing to break it down in further posts of course. There is a lot of information to go over so this topic will be have to be continued in a series of posts.

Arctic Waves!

Surfers Dane Gudauskas, Alex Parker and Keith Malloy normally carve up the golden beaches of sunny California but made the trip to the Arctic, where temperatures as low as just 2-3C, after hearing about the smooth waves.

Continue reading

 

Custom Maya Startup: Adding User Python Site-Packages

 
 

Say you have an environment variable named PYROOT with a lis of a few paths where python libs are stored. Use python’s site module to add your lib directories as site directories like this:

import os
import site
PYTHONPATHS = []
if os.environ.has_key('PYROOT'):
	if os.pathsep in os.environ.get('PYROOT'):
		for p in str.split(os.environ.get('PYROOT'), os.pathsep):
			PYTHONPATHS.append(p)
	else:
		PYTHONPATHS.append(os.environ.get('PYROOT'))


if len(PYTHONPATHS):
	for j in PYTHONPATHS:
		site.addsitedir(j)

This quick script works cross-platform using os.pathsep to test for environment variable separators ‘;’ (win) and ‘:’ (linux) and using that to split the PYROOT string variable appending each of the paths to the PYTHONPATHS buffer list. By using the site.addsitedir module, python will treat these directories as normal site-package directories with all the built-in abilities to customize such as sitecustomize module and .pth files. If subdirectories are already organized into packages using __init__.py then they are already ready to be used and imported into Maya right away, or else if the directory has a .py file and no __init__.py just add an empty one.

To add your custom user site-packages directory just append the lines of code or create a new userSetup.py and make sure it is on your PYTHONPATH when you start up, previously explained here, or just put it in any one of the default maya scripts areas.

 

2012: The Year of the Dragon, DIY, Hacktivism (Oh, hai der Mr. Blarg!)

oh hai!

It’s been long enough. The intention to get back to blogging, probably the most enriching things that the internet can be used for, is not as easy as it the benefit would lead one to believe. It is often the hardest these sort of things in life that have the greatest benefit that go without being utilized, but that changes now with the mother of all instigators, New Years Day.

What’s the topic of the year that is a continuation and solidification of growing interest in the previous year? What else, the ubiquitous topic across the blog-o-sphere; filtering, utilizing and leveraging the mind-numbingly viral growth of open source hardware and software, DIY, Hacktivism, Public Domain, and Creative Commons information to engage in gratuitous amounts of geekery, life/career hacking.

Expect expositions in 2012 on topics in addition to the aforementioned and the regular posts on 3d animation and tech art ranging in this list of interests:

Linux
C-Shell Scripting
Python
Arduino
Use of hobby as a way of making money
Dynamic DNS
Game Dev
Futurism
Virtual Computing

Hopefully shedding some light on some of the fundamentals will blaze trails for others that are interested to get started in the most noble of activities of the modern era, one that is being affected by movements like SOPA; developing and sharing software and media and artist entrepreneurialism.

 

Coast to Coast! Blue Sky here I come!

Scrat Continental Crackup

How I've felt for so long about working in VFX/Anim industry.

Ice Age: Continental Drift

My first project

Done!  After a few weeks of back and forth and interviews I finally landed the job of my dreams, well, for the time being.  Blue Sky has always been on the radar as a potential and it’s finally a reality.  It’s everything I could ask for in an employer and more.

Don’t think that it’s going to stop me from being active on my blog though, quite the opposite!  Well, maybe the first month or two starting now there will be a pause, but after that it will increase.  I’m super excited to learn and share knowledge with people and stay really connected and dedicated to innovating personal and industry wide workflows, tech, and of course animation.  Technical animation and tech art to be specific is what I’ll be working on in the coming months, same as usual.

Thanks to everyone that’s been involved in the process of landing this, you know who you are!  I don’t think they know yet what a valuable asset they just acquired but soon they will find out just how serious I am about the work I do and how inspired I can be!