Forum Groups
  All forums
    Help & Feedback
      Questions
      Work in progress
      Finished Art
      Non-Max related
    Community
      Offtopic
      News
    Hardware
    Photography


Featured Threads
  inspiration alert!!!
(36 replies)
  Indespensible MaxScripts, Plugins and 3rd Party Tools
(37 replies)
  The allmighty FREE Resources Thread !
(17 replies)
  spam alert!!!
(4886 replies)
  Maxforums member photo gallery index
(114 replies)
  Maxforums Member Tutorials
(89 replies)
  three cheers to maxforums...
(240 replies)
  101 Things you didnt know in Max...
(198 replies)
  A Face tutorial from MDB101 :D
(95 replies)
  Maxforums.org Members Gallery
(516 replies)
  SON OF POST YOURSELF
(637 replies)
  Dub's Maxscript Tutorial Index
(119 replies)

Maxunderground news unavailable

Swap out materials at certain time in maxscript
show user profile  Tanthias
Is there a way to do this (especially during render time)? I've tried the following:

at time(0f)
$Sphere01.material = meditMaterials[1]
at time(5f)
$Sphere01.material = meditMaterials[2]

But it sets the second material at frame 0, and refuses to change. Is there something simple I'm missing?
read 1556 times
2/12/2011 2:49:44 AM (last edit: 2/12/2011 2:49:44 AM)
show user profile  Garp
The .material property is not animatable. You could do something like this:



read 1538 times
2/12/2011 4:51:33 AM (last edit: 2/12/2011 4:53:43 AM)
show user profile  Tanthias
Thanks a lot, Garp, that works :)
read 1528 times
2/12/2011 5:21:16 AM (last edit: 2/12/2011 5:21:16 AM)
show user profile  Dub.
If they aren't multisub materials, then a cleaner way is to make a mutisub material and use a material mod to change the ID. The id IS animatable.


read 1519 times
2/12/2011 8:16:01 AM (last edit: 2/12/2011 8:16:01 AM)
show user profile  Tanthias
Another quick question: Is there a way to save each render as a different file via maxscript using Garp's method? I tried something like this:

folder = "c:\\users\\user\\documents\\3dsmax\\renderoutput"
dir = dotNetClass "System.IO.Directory"
files = dir.GetFiles(folder)
file = folder + "\\render" + files.count as String + ".avi"
, but it just gives one file. Any way to fix this?

edit: Oh, and I'd try your suggestion, Dub, but this is a team project, and I'm not the one handling that part. My partner is, and he's already got the materials set up (and said he needs to spend the rest of the time getting the other models and animations up and running), so I can't really help there.
read 1485 times
2/21/2011 8:30:12 AM (last edit: 2/21/2011 8:35:51 AM)
show user profile  Pil
Maybe I dont fully understand teh question but you could just animate the mix material.

Add 2 materiales and then animate the mix from 0% to 100% over 1 frame....


read 1476 times
2/21/2011 8:52:36 AM (last edit: 2/21/2011 8:52:36 AM)
show user profile  Dub.
It seems like it would be better to concentrate on a script that converts the materials to pils suggestion. Scripting your render like this is asking for trouble because it complicates the render process where you should be trying to simplify it to reduce human error.


read 1454 times
2/21/2011 6:25:25 PM (last edit: 2/21/2011 6:26:39 PM)
show user profile  Tanthias
Few questions then (and thanks again for the help so far): 1. Would I have to know what frames to animate this from? Because I'll have no way of knowing what the frames are until my partner finishes, and he's going to want the script before then.

2. How would I save the render through Maxscript? From what I'd read the above should have worked, but upon reviewing the saved file, it can't seem to be opened. Checking the properties of said file, it takes 0 bytes.

3. I'm positive I'm just overlooking it, but I can't seem to find anything saying how to animate the mix... Can somebody point me in the right direction?

As you can tell, I'm completely new at this :P

edit: Actually, you can ignore this post. I got it working. Thanks again, all, it was a lot of help.
read 1443 times
2/22/2011 8:43:09 AM (last edit: 2/22/2011 9:00:11 AM)
#Maxforums IRC
Open chat window


Support Maxforums.org