I´m a bit stuck with Maxscript and RenderElements. The basic idea is to render 5 frames, each with a different camera
objects and lights.
The script looks like this.
-----
sMTLRsl = "\\"
sMTLRsq1 = "cam1"
sMTLRsq2 = "cam2"
sMTLRsq3 = "cam3"
sMTLRsq4 = "cam4"
sMTLRsq5 = "cam5"
sMTLRfo = ".tga"
render outputfile: ("c:\\temp" + sMTLRsl + "test" + sMTLRsq1 + sMTLRfo) renderElements:true frame:0
render outputfile: ("c:\\temp" + sMTLRsl + "test" + sMTLRsq2 + sMTLRfo) renderElements:true frame:1
render outputfile: ("c:\\temp" + sMTLRsl + "test" + sMTLRsq3 + sMTLRfo) renderElements:true frame:2
render outputfile: ("c:\\temp" + sMTLRsl + "test" + sMTLRsq4 + sMTLRfo) renderElements:true frame:3
render outputfile: ("c:\\temp" + sMTLRsl + "test" + sMTLRsq5 + sMTLRfo) renderElements:true frame:4
-----
This will render out 5 frames to c:/temp/
The problem is, it writes out the render elements only for the last frame rendered.
If you want to test it. Create a new scene. Turn VFB off. For some reason no render element is written out when the VFB is on.
Add a render element and execute the script. The problem as far as I can see. When I add a render element I don´t add an explicit output path
for the element nor a path for the complete rendering in the render dialogue. Because this is what the script should do.
When I execute the script the output path of the first frame rendered is set as path for the renderelement in the render setup window.
This file is than overwritten by each new rendering. Is there some way to clear the output path of a render element with maxscript.
Or maybe any other idea how to get around this is much appreciated.
objects and lights.
The script looks like this.
-----
sMTLRsl = "\\"
sMTLRsq1 = "cam1"
sMTLRsq2 = "cam2"
sMTLRsq3 = "cam3"
sMTLRsq4 = "cam4"
sMTLRsq5 = "cam5"
sMTLRfo = ".tga"
render outputfile: ("c:\\temp" + sMTLRsl + "test" + sMTLRsq1 + sMTLRfo) renderElements:true frame:0
render outputfile: ("c:\\temp" + sMTLRsl + "test" + sMTLRsq2 + sMTLRfo) renderElements:true frame:1
render outputfile: ("c:\\temp" + sMTLRsl + "test" + sMTLRsq3 + sMTLRfo) renderElements:true frame:2
render outputfile: ("c:\\temp" + sMTLRsl + "test" + sMTLRsq4 + sMTLRfo) renderElements:true frame:3
render outputfile: ("c:\\temp" + sMTLRsl + "test" + sMTLRsq5 + sMTLRfo) renderElements:true frame:4
-----
This will render out 5 frames to c:/temp/
The problem is, it writes out the render elements only for the last frame rendered.
If you want to test it. Create a new scene. Turn VFB off. For some reason no render element is written out when the VFB is on.
Add a render element and execute the script. The problem as far as I can see. When I add a render element I don´t add an explicit output path
for the element nor a path for the complete rendering in the render dialogue. Because this is what the script should do.
When I execute the script the output path of the first frame rendered is set as path for the renderelement in the render setup window.
This file is than overwritten by each new rendering. Is there some way to clear the output path of a render element with maxscript.
Or maybe any other idea how to get around this is much appreciated.
Comment