View Full Version : Script: Change 1 material and render again?
10-05-2005, 09:03 PM
I have scene where I need to chance car skin and make new render.
Changing material is easy, but very annoying and I must stay behind PC.
So is there some kind script what can change that material independently
and render that scene again? So I can give 10 skin for script and when I
woke up in morning I have 10 nice renders ready :)
I add picture link about final render so it helps to explain my scene.
All ideas are welcome :)
10-05-2005, 11:03 PM
Yes, this is very easy to do.
The material of an object can be accessed simply by $Sphere01.material, this can be used to get or set the material.
You can also tell it to render with the render() command
10-05-2005, 11:47 PM
Could you please explain me that specify? Or give link for some Scripting tutorial or something.
I haven't use any scripts at all. I start 3D stuff about month ago. So I really learning
right now and don't know much about that :)
10-06-2005, 12:49 AM
Well, the specifics would really vary depending on exactly what you want. Are you aware of the MAXScript Reference, available under the Help menu? These topics are all covered there in great depth, with many examples.
10-06-2005, 07:16 AM
Ok, I try this :)
Thanks for helping :)
10-06-2005, 05:41 PM
I tryed to look at your image link but it errors out so I dind't understand exactly what you need to do. But if you change only the diffuse map in the material instead of the whole material you don't need a script. You can use an .ifl file in the diffuse slot to do this for you. In the MAxHelp is explaned pretty well how to do it. If you need more info on how to set it up let me know.
10-06-2005, 07:27 PM
Sorry about calling that texture as material. This what need do be changed is one sub_material diffuse map...simple texture.
Maybe there is some problem with Photobucket servise, so I upload this in Imageshak.
I need to change that car skin...thats all :)
I also made rar what includes one scene (not this one you see in picture, but the material structure is same), textures and little txt readme fail about my vision about that script.
I start learning about .ifl right now :)
If I can do my thing with that I maybe don't need that script at all.
Thanks for answering :)
10-06-2005, 08:07 PM
Ok, I see it. The .ifl will work for you.
The ifl is actually is a text file which has all your images listed in it and it will change the image frame by frame. For example you have 3 textures, aaa.jpg, bbb.jpg and ccc.jpg. Your ifl file will look like this:
Now you load this ifl in the diffuse slot of your material insted of the actual jpg.
This will render the first frame with aaa.jpg, second with bbb... etc, for as many images you have in the ifl
One thing to remember is that you need to have this file in the same folder with your images. If not you'll have to put the path also before your image!
Hope this helps.
10-06-2005, 08:54 PM
Yes, very good.
It rendering now without my help at least 10h :D
This aint perfect tool for me but this help really save me 6h to sleep and few hours to study MAXScript for now ;)
Really big thanks again :)
10-06-2005, 08:54 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.