Notifications
Clear all

[Closed] Script: Change 1 material and render again?

Hi.

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.
[ http://i23.photobucket.com/albums/b371/ahvest/sccc_fxr_skin2.jpg]( http://i23.photobucket.com/albums/b371/ahvest/sccc_fxr_skin2.jpg](  g"/> )

All ideas are welcome :)
8 Replies

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

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

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.

Ok, I try this

Thanks for helping

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.

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.
http://morrow.pri.ee/sopp/Scene%20and%20textures%20(1,63MB).rar

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

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:

aaa.jpg
bbb.jpg
ccc.jpg

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.

Yes, very good.
It rendering now without my help at least 10h

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