Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® Maya® / Animation / Demo: Animating the LED light cube in Maya
  RSS 2.0 ATOM  

Demo: Animating the LED light cube in Maya
Rate this thread
 
51713
 
Permlink of this thread  
avatar
  • tkaap
  • Posted: 26 January 2011 04:09 AM
  • Total Posts: 110
  • Joined: 22 August 2006 12:00 PM

This LED light cube is pretty cool, but I didn’t feel like spending a few weeks soldering.  I just wanted to play around with animating the resulting cube.
http://www.instructables.com/id/Led-Cube-8x8x8/

So I threw together this set of python utilities to build it and animate it in Maya.  If someone else is interested in having fun with this idea, hopefully this helps get you started.  If I get time to clean this up some more, I may turn this into a tutorial.

This cube has two geometry objects at each grid point.  One is for when the light is “on”, and the other is for when the light is “off”.  I’ve animated it by just keying the visibility curves for these objects.

There are utilities to
1) Set up the light cube, using your own geometry or my default cubes.
2) Key the visibility of the “on” and “off” geometry at each grid point
3) Reset the cube back to its starting point with no animation.
4) Show how to setup some simple animations on the cube.

To get started, drop the attached lightcube.py file into your maya/scripts directory and run the example code:

import maya.cmds as c
import lightcube 
as L

reload
(L)
c.file(f=1,new=1)
L
.setBoxSize(8)
L.createLightCube()

L.createGrid()     # you can substitute custom geometry
L.loadOnObjects()  # you can substitute custom geometry
L.loadOffObjects() # you can substitute custom geometry

L.reset()
currTime L.testWalls(delay=3)
L.keyAllAt(currTime)
L.cycleAnimation()


Replies: 0
avatar
  • tkaap
  • Posted: 27 January 2011 08:21 AM

...and the forum silently discarded my attachment again.  Here it is again.



Attachment Attachment
Replies: 0