The problem with this solution is that the controller looks nothing like a Waldo controller and it would have to be dismantled to then be reconfigured in a manner that would suit my objective. While this could potentially work I would rather have a controller that was built for purpose and so I decided to use an Arduino micro-controller as the heart of this project instead of the game pad.
The process to get the analogue inputs speaking with Maya was far more straight forward than I could ever have imagined and was implemented in three stages.
- Get my Arduino Uno to listen to analogue inputs and then send the data to my computer via the serial port.
- Send the data from the serial port to the command line because Maya 2015 is unable to read the serial port.
- Get Maya to read the data from the command line and apply it to the relevant attributes of the demonstration model.
With help from the book "Getting Started With Arduino" and with some tips from various forums, my favourite tip being to read each analogue input twice in order to reduce the likelihood of noisy data, I was able to cobble together the sketch that would read my inputs and send them to the serial port on my computer.
I was able to use a short script written by Eric Pavey which writes serial data to the command line, this took part of the second stage of the process.
The last pat of the puzzle was probably the hardest for me to solve because I needed to find a way to separate the incoming data from the command line and then turn the values into numbers to be used as individual attribute values in Maya. I was eventually able to do this with a little luck and by reading the Python help documentation in Maya.
I was able to use a short script written by Eric Pavey which writes serial data to the command line, this took part of the second stage of the process.
The last pat of the puzzle was probably the hardest for me to solve because I needed to find a way to separate the incoming data from the command line and then turn the values into numbers to be used as individual attribute values in Maya. I was eventually able to do this with a little luck and by reading the Python help documentation in Maya.
I'm really pleased with this initial development as it demonstrates the viability of my project. The one drawback is that the Arduino only has 6 analogue inputs and so only has the potential to drive all 3 axis of only 2 joints in Maya which is not really enough for what I have in mind in this project.
There is hope though, a small amount of investigation has brought to light a project from Fluid Forms in which they used digital multiplexing to increase the number of analogue inputs to a potential of 96 which is plenty more than I would ever require for this project.
So I'm pretty excited that this is working and that I have a way to utilise as many inputs as I need. Next step is to grab some multiplex goodness and get that working!!
No comments:
Post a Comment