View Single Post
  #4  
Old 01-29-2013, 05:11 PM
tokola tokola is offline
Member
 
Join Date: Nov 2012
Posts: 67
animating textures - addendum

This is an update of what HAS worked for me so far, although it seems counter intuitive. I had to split the object vertically in two sub-objects with names belt1 and belt2, and use the following code to simulate the stripes going up on one side (node) and down on the other side (node):
Code:
def TurnBelt():
		global matrix1, matrix2, belt
		matrix1.postTrans(0,.04,0)
		matrix2.postTrans(0,-.04,0)
		belt.texmat(matrix1,'belt1',0)
		belt.texmat(matrix2,'belt2',0)
timer = vizact.ontimer(.01, TurnBelt)
Then, I am using timer.setEnabled(viz.TOGGLE) to enable/disable the belt motion, according to demands.
Although this works perfectly, I really don't know if it's the most efficient way, both CPU-wise, since I have lots of belts, but also as far as the work that is demanded in 3DSMax to format all belts appropriately (they are initially an extruded editable spline). If I could do everything with a single rotating UVMap/texture on a single object, I would be thrilled!

Thanks again for the assistance,
--tokola
Reply With Quote