ScriptSpot

Forum topic · General Scripting

Change Material per frame

By GH33DA · 2009-08-09

Description

My goal is to change the material per frame so that when I render the first 15 frames I get a different material each frame. Here's what I have so far:

animate on

(

 for i=1 to 14 by 1 do

 (

  at time i

  (

   meditMaterials[i].DirectX_Manager.enabled = off

   $.material = meditMaterials[i]

  )

 )

)

it appears to go through all of the materials, but, when I try to render I only get the last material every frame.

Comments (2)

Anubis · 2009-08-09

just make an MultiSubObj material, apply MaterialModifier and animate material ID's

GH33DA · 2009-08-09

Hey thanks, so much easier. :)