Page 1 of 2

Batch render layers

Posted: Sat Jul 16, 2011 9:41 am
by ponysmasher
Not sure if this is of any use to anyone else, but since I often composite my animations I use it all the time now and I might as well share it.
-->Download it here<--

The script saves each top layer in a file to a separate file and can create a batch file that will render all the files as png sequences.

The options:
Image
Save automatic batch file. If this is unchecked the other options won't matter.

Put each render in it's own folder. If unchecked all renders will be put in one folder. Some compositors, like After Effects, can still import them as separate sequences.

Number layers in descending order. All layers will be saved with a number in front so you know what goes where. With this checked it will start numbering layers from the top.

Directory of Anime Studio. Needed for the batch file.

Delete files after render. This will delete the separate .anme files that were created, NOT the original file or the rendered images.

After you've run the script just double click the batch file and the rendering will start.
Image
You won't get any progress, just the time when a new file has started rendering. This doesn't bother me much, I'll just start the render and start working on the next scene while it renders in the background.

Some notes:

-This will only work in Anime Studio Pro 8 on Windows.

-When you run the script it will save the currently open file so don't run it if you don't want to save it like it is right then and there.

-Layers with "_null" anywhere in the name will be skipped. This is pretty specific to my own workflow but it might be good to know.

-It could save to other formats than png but you'd have to edit the script file and replace any occurences of png with the format you want. Since I only use png I haven't bothered making it an option.

Posted: Tue Jul 19, 2011 4:04 am
by GCharb
I tried a few renders with it, it works fine and I was able to import in afx for composition.

But it is easier for me to export PSD though as they just load in all layers in afx in the right order in one action.

But I can see the usefulness of such a plugin, thanks for sharing! :)

Posted: Tue Jul 19, 2011 9:05 am
by ponysmasher
Yeah, I used to do the psd to after effects thing too but switched to this workflow for the following reasons:

-Much smaller file sizes with Png. Really, the difference is huge.
-A bit easier to replace a layer after making changes.
-I'm using other software than After Effects that don't support layered psd files as comps. (Recently bought HitFilm that has a great 3D particle simulator and other effects)

But like I said, this script is pretty specific for my workflow.

Posted: Tue Jul 19, 2011 12:48 pm
by GCharb
Yeah, PSD can be huge, I might have another go at it, thanks again!

Posted: Mon Jul 25, 2011 7:32 am
by jonnymark
Render output

After selecting Render > Batch Render, a separate folder is created for each render layer in your images directory. Your render target output is saved to the masterLayer folder if its renderLayer input is either not connected, or connected to the masterLayer (in other words, defaultRenderLayer). If you've connected a different render layer to the render target renderLayer input, then the render target output is saved to the folder for that layer.

Rendered image filename options

Use render tokens to customize the filenames of your render output. Use the <RenderPass> token to add your render target name to the created subfolder or image file name.

For instance, in the example above, using a Filename prefix of <RenderLayer>\<RenderPass>\ will create separate folders for each render layer as well as separate folders for each render pass and the render target. The render target folder is saved to the masterLayer folder.

Posted: Mon Jul 25, 2011 12:50 pm
by uddhava
ponysmasher,

This script looks useful for me as my video editor doesn't recognize PSD layers.
When I try to use it I get this message in the renderer...

Starting...
Rendering "script test_02_Layer 1" at 13:45:45.62 Mon 07/25/2011
The system cannot find the path specified.
Rendering "script test_01_Layer 2" at 13:45:45.65 Mon 07/25/2011
The system cannot find the path specified.

Done rendering at 13:45:45.66 Mon 07/25/2011
Press any key to continue

Any ideas?

uddhava

Posted: Mon Jul 25, 2011 1:19 pm
by ponysmasher
Yeah, it seems AS sometimes forgets which directory it´s currently in and saves the .anme file in the folder where it last saved to. I'll have to do some testing.
It works if you save the file with "save as" and then run the script though.

Posted: Mon Jul 25, 2011 1:27 pm
by uddhava
ponysmasher wrote:Yeah, it seems AS sometimes forgets which directory it´s currently in and saves the .anme file in the folder where it last saved to. I'll have to do some testing.
It works if you save the file with "save as" and then run the script though.
Should I save the file to a certain folder?

Posted: Mon Jul 25, 2011 3:02 pm
by ponysmasher
No, just save it to wherever you want.

Posted: Sun Jul 31, 2011 9:45 am
by uddhava
I forgot to reply to this.

I "saved as" the file, but I still have the same problem mentioned above. Hope I can get this to work could be quite useful.

Thanks, uddhava

Posted: Fri Sep 02, 2011 10:11 am
by capricorn33
Very good and useful script!

Thanks for sharing, Ponysmasher!

Posted: Thu Sep 22, 2011 2:08 pm
by uddhava
Hello,

I have tried this script, but I have not been able to get it to work. I was wondering if any one who has used this with success might be able to help me because it would be a very useful script for me.
Below is my original reply with the problem I have with the script.

Thanks, udd
uddhava wrote:ponysmasher,

This script looks useful for me as my video editor doesn't recognize PSD layers.
When I try to use it I get this message in the renderer...

Starting...
Rendering "script test_02_Layer 1" at 13:45:45.62 Mon 07/25/2011
The system cannot find the path specified.
Rendering "script test_01_Layer 2" at 13:45:45.65 Mon 07/25/2011
The system cannot find the path specified.

Done rendering at 13:45:45.66 Mon 07/25/2011
Press any key to continue

Any ideas?

uddhava

Posted: Fri Dec 09, 2011 3:14 pm
by Stan
This script seems to be very useful, but the link in the first post is dead. ponysmasher, can you please fix it?

Posted: Fri Dec 09, 2011 10:42 pm
by neon22
looks like all scripts on that site have gone 404

Posted: Fri Dec 09, 2011 11:50 pm
by ulrik