Maya and a MAKE Controller: Form Creation Using Programmable Sensors

21 Oct 2014

#code #maya #sciarc

Flow of Information: [Input Sensors] to [Breadboard] to [MAKE Controller] to [USB Interface] to [mchelper] to [Flash Connector] to [MEL Script in Maya]

Maya-and-a-MAKE-Controller-001.png
Input Sensors, Breadboard, and Make Controller

Maya-and-a-MAKE-Controller-001.png

mchelper, Flash Connector, and MEL Script in Maya

The following MEL Script captures three input devices for form creation and a fourth input device for curation:

wave1Handle.translateY = sensorInput.sensor1 *400;
twist1Handle.translateZ = sensorInput.sensor2 *400;
flare1Handle.translateZ = sensorInput.sensor3 *400;

if(sensorInput.sensor4<0.3)
{
string $newSurf[] = `duplicate -rr polySurface89`;
move -r 50 0 0 $newSurf[0];
}

wave1Handle.translateY = sensorInput.sensor1 *400;
twist1Handle.translateZ = sensorInput.sensor2 *400;
flare1Handle.translateZ = sensorInput.sensor3 *400;

float $count1;

if((sensorInput.sensor4 > 0.65) && (sensorInput.sensor4 < 0.7))
{

float $dist = 20 + ($count1*10);
string $newSurf[] = `duplicate -rr polySurface89`;
move -r $dist 0 0 $newSurf[0];

$count1++;
}

Screen Capture of Curation in Maya

/AK at 01:31 UTC