Back Render [Batch Rendering]

Command-line batch rendering

Batch render from the command line in the background.

  • Background rendering
  • Batch rendering of multiple Blend files
  • Batch rendering of all scenes
  • Batch designation of multiple frames
  • Create a bat file for rendering

Download

gumroad

Menu

  • 3D view → Tools → Back Render

Function

You can use your own settings without using the status of the scene.
If you do not set individual settings, the settings will be rendered as they are in the scene.

  • All scenes
  • scene
    • You can specify a scene other than the current scene
  • Frame number
    • Specifies the frame to render
    • You can specify each frame as discrete
    • You can specify the frame range using’- ‘or’ … ’
    • Example: 3,10,15,50-70,450…800
  • Output path

Rendering other Blend files

You can manage multiple Blend files in a list and perform batch rendering.

  • In the list, you can add, delete, duplicate, sort
  • You need to set the frame number to render
  • About additional functions
    • You can select .blend files from your browser and add them to the list
    • If you select a folder, search for .blend files in that folder and add them to the list

Get status from Blend file

You can get the status from the Blend file in the list.
This is useful for getting the current frame.

Output command line code

The command line code generated based on the add-on settings is output.
By using the output text at the command prompt, you can perform rendering from other than the add-on UI.

  • Can be accessed from the text icon to the right of the “Render” button

Create a bat file for rendering

Generate a .bat file based on the add-on rendering settings.
You can do batch rendering without needing to start blender or this addon.

How to use

  1. Execute “generate .bat file” button
  2. A bat file is generated based on the add-on rendering settings
  3. The file is created in the same folder as the running blend file.
  4. Double click on the generated .bat file and it will render

Link

忘却まとめ

3 Likes

As I needed to do some background rendering, your add-on came at the right time - thanks! :smiley:

Some notes / questions / ideas:

  • render multiple frames and frame ranges: very cool
  • get status: nice
  • importing an external .blend file:
    • the button in the import dialogue says Add Camera Data - maybe this description could be optimized
    • would it be possible to select multiple .blend files and import them at the same time?
    • it’s a very nice feature to render other scenes as the saved active one. Right now, it’s required to fill in the other scene name manually, so I need to know the exact name. Would it be possible, to a have a drop-down list of available scenes for every .blend file instead, so the user can easily pick one? In addition, it would be helpful to have info about the set frame ranges, so maybe a drop-down like this:
      • Scene [1-100]
      • myOtherScene [25-75]
      • thirdScene [0-49]
  • btw, there is no warning, when sending an unsaved file to render → nothing gets rendered in that case
  • I need to ask, but I guess it’s not possible being a command line render process: Just wondering, if there is a way to get any feedback about the status of started render jobs and when one gets finished - besides looking at the console? Is there a post render action like opening the folder with the renderings in the explorer maybe, which could be included as an option for the user?
  • but it’s great, that the render jobs get saved with the .blend file, so I can specificially create render job files to get back to later on order to render specific jobs again :+1:

Thanks!

1 Like

Mistakes in the text of the import button dialog

I overlooked it !!! I thank you for this report.

Warning message when trying to run with an unsaved file

I would add this.

Is it possible to select multiple .blend files and import them at the same time?

I wanted to implement this too, but I couldn’t find a way…

  • Drop-down menu listing multiple scenes in an external Blend file.
  • Checking a Rendering Job
  • Get feedback and open a folder after rendering is complete

For these three, I don’t know if we can implement them yet.
I am just starting to learn to access the command line and external files.
There is still room to implement a variety of features in this add-on, and I too feel like I need this three.

1 Like

Maybe you will find some solutions and / or other additions in the future. :wink:
It already works as expected, so no rush.
Thanks!

ver1.1.0 Added Create.bat file function / Progress bar

  • Added Create.bat file function
  • Added Progress bar
  • Added Processing after rendering(Shutdown / Sleep / Reboot)
  • Supported multiple scene data of external Blend file
  • Other improvements

Added .bat file generation function

Generate a .bat file based on the add-on rendering settings.
You can do batch rendering without needing to start blender or this addon.

How to use

  1. Execute “generate .bat file” button
  2. A bat file is generated based on the add-on rendering settings
  3. The file is created in the same folder as the running blend file.
  4. Double click on the generated .bat file and it will render

Add progress bar

You can visually check the status of the file being rendered.

It monitors the destination folder, counts the number of image files with matching file names, and compares it with the scheduled number of renderings to display the progress.
It can be used as a pseudo progress bar.

  • You can also use this progress bar for rendering from .bat files and other rendering methods

option

  • Manually add progress bar
    • Useful when rendering again from the same bat file
  • Open folder after rendering is complete
  • Remove completed
  • Remove all

Known bugs

If a file with the same name already exists and the file update time is close, it may not be counted correctly.
It seems to be a bug that occurs because the update time of the file output by Blender is slightly slower than it actually is.

Add other options

Processing after rendering

After the rendering is finished, you can shut down, restart, and sleep.

  • It can be accessed from the [∨] icon in the upper right corner of the menu.
  • Only supported in .bat files

Use default startup file

When starting Blender for rendering, do not load the startup file.
It is enabled by default.

  • Blender starts up faster
  • All add-ons will be disabled
  • Disable if add-ons that affect rendering are recommended

Supports multiple scene data of external Blend file

  • Added drop-down menu listing multiple scene data in external Blend file

Added console switch button

  • You can switch the display of the console window of blender
  • You can check the background rendering progress from the console window
  • It can be accessed from the icon at the top right of the panel menu

Other changes

  • When you add a .blend file, if the list item name is a duplicate, add a number to the item name was to be
  • Made the status display of the menu easier to see
  • In the current .blend file mode, displays a warning message when you try to run in the unsaved state was to be
  • In external .blend file mode, show a warning message when trying to run without list items
  • By the external .blend file mode, when importing the .blend file, to be able to import and select multiple files now

Bug fix

  • Improved the operation speed of “Get status from blend file” a little
  • Fixed incorrect text in import button dialog
  • Fixed the problem that the output path may be duplicated when all the scenes of individual status in the current file mode are enabled and the output path is enabled.
    • In this case, I added the scene name to the file name.
1 Like

Wow, fantastic update - thanks!

  • I love staring at the progress bars - well done! (sometimes/rarely the progress doesn’t get updated, not sure why yet)

  • modifier keys to open file or directory - very helpful

    • open file: great regarding blender files! With the render directory: I guess, you could remove Shift to open in this specific context
    • option to open the directory of the created .bat file (same as current blend file) would be handy as well
  • small typo at Animation/Scene: Flame

  • progress count:

    • correct with one frame: 0/1 unrendered, 1/1 when finished
    • one frame off with sequences: e.g. 50 frames: 0/49 → 49/49 ; should be 0/50 → 50/50
  • console panel switch, import multiple files at once, scene selection list: nice!

  • little bug: when switching to define an output path, and unclicking this later to return to the default output path, this doesn’t seem to work - I guess, the previous path got overwritten. Workaround: Get status again.

  • bug: After clicking Create .bat File, when clicking the Render button, this will create a .bat file again instead of starting the render job

  • .bat file:

    • create: error, if the .blend file has never been saved before of course
    • run: some issues with the formating, won’t run:

currently, the addon creates the following, which doesn’t work - just showing the specific lines here:

cd C:\Program Files\Blender Foundation\Blender 2.90
blender.exe -b D:\CREATE\Blender\Play\orange 20.blend --factory-startup -t 2 --scene Scene --render-output D:\CREATE\Blender\Play\Render\orange orange\my orange --render-anim

modified to work - no cd plus using quotes to deal with spaces:

"C:\Program Files\Blender Foundation\Blender 2.90\blender.exe" -b "D:\CREATE\Blender\Play\orange 20.blend" --factory-startup -t 2 --scene Scene --render-output "D:\CREATE\Blender\Play\Render\orange orange\my orange" --render-anim

Thanks

1 Like

Thanks.
Most of the reported issues have been fixed and improved by me.
However, the following points did not convey the intention well.

I guess, you could remove Shift to open in this specific context

progress count:

  • correct with one frame: 0/1 unrendered, 1/1 when finished
  • one frame off with sequences: e.g. 50 frames: 0/49 → 49/49 ; should be 0/50 → 50/50
1 Like

Cool! :smiley:

Shift to open in this specific context:

  • Just a detail: Using the modifier key Shift, to open a file is available for the output path as well, but I think this method won’t open a file here, or should this open a rendered image, if it already exists? Opening the folder would be enough in this case I thought. As said, this ist just a tiny, more a cosmetic detail and doesn’t do any harm to leave it like it is.

Progress count:

  • Also just a cosmetic detail: When rendering a sequence of images, the max number should display the sum of all images, so when rendering 50 images, before starting to render, it should display 0/50 and when finished 50/50. Currently it displays 0/49 before starting to render and 49/49 when being finished. Again, a tiny detail. Don’t worry about it. :wink:

Thanks.

ver1.2.0 Enhanced bat file generation function / Bug fix

[Process after bat file generation] setting added

  • run bat file
    • Execute the generated bat file immediately
  • Open folder
  • None

Add [bat file save setting]

You can change the saving method when executing the “generate bat file” function.
You can change it from the add-on settings.

  • User chooses save destination every time
  • Temporary working folder
    • Will be saved in a temporary folder
    • Bat file is deleted when Blender is closed
    • This is useful when you don’t need the file itself because the bat file is used immediately.
  • Save to the same directory as the current .blend file
    • There is an option to save the bat file in a subfolder
    • The default folder name is “render_bat”

Added the function to search for missing files

  • You can search the specified folder for a blend file with a broken path and reset it.
  • Broken link items are displayed in red so that you can see broken files in the list menu.

Other additions

  • Added ability to save bat file manually
    • Manually select the save destination and save

Bug fix

  • Fixed the problem that rendering cannot be done when there are spaces in various directories and scene names.
  • Fixed some typos
  • Fixed a problem that clicking [Render] button after creating [.bat file] creates .bat file without rendering.

How to restore the usability of ver1.1.0

If you change the settings, you can restore the feeling of ver1.1.0.

Sub menu [∨] → Processing after bat file generation → Change to [None]
User setting → Change save type to [ Save in same directory as current .blend file ]

1 Like

OK,
I just released ver1.2.0 with bug fixes and improvements at this stage.

1 Like

Fantastic! :pray:

ver1.3.0 Add significant functions such as progress bar, preview render, all cameras, user scripts

I made many improvements and added options.

  • Preview render
  • Added “All cameras” option
  • Added “All view layers” option
  • Added “Resolution” option
  • Added “Render Engine” option
  • Added “User Script” option
  • Supports all scene options in external blend files
  • Added count display
  • Change menu layout

Add progress bar

back_renderver1-3-0_probar
You can now check the progress of the rendering job being processed.

  • Rendering start time, finish and display elapsed time after completion
  • Show the progress of the frame currently being rendered
  • Log files are stored in the [log_probar] folder inside the add-on
    • Delete the progress bar item and it will be moved to the trash at the same time
  • Abolition
    • The existing function “Monitoring the output image file” was abolished because it had many bugs and was a pseudo function.
    • The ability to manually add progress bar items has been removed
  • Currently rendering from bat file is not supported

Preview render

back_renderver1-3-0_preren
Create a viewport animation, save it as an .mp4 and autoplay it when done.
This is useful for previewing motions and checking external Blend files in advance.
Various options allow you to temporarily change the rendering settings.

If the menu display is “External .blend file”, create the active blend file in the list.

Option

  • Resolution X / Y
  • Resolution percentage
  • Frame start / end
    • Option to fit the frame range of the action of the active object
      • Only the frame range of a specific motion can be rendered
  • Save to temporary folder
    • Save to a temporary folder instead of the specified destination
    • It will be deleted after quitting Blender, so it is convenient when you do not need the file.
  • View context
    • Render in the current 3D view
    • Overlay invalidation option
      • You can hide wireframes, etc.
    • Use camera view option
      • Always use camera view instead of current viewpoint
    • If you don’t use view context, it will render in shaded view without overlay hiding
  • Render only frames with keyframes
  • sequencer
    • OpenGL display using Render Sequencer
  • Use another Blender
    • Launch another Blender to open the current Blend file and render
    • It doesn’t load the current Blender, but there is a problem that the active window moves to that

Added some option

Added “All Cameras” option

batch_2020-05-27_21h54_32
All scenes, all view layers, and all camera options can be used together.

  • Renders viewpoints from all cameras
  • Cameras with render enable / disable settings disabled will pass through
  • The camera name is added to the file name of the output path
  • “Folder by camera name” option
    • Classify into folders with camera names
    • The camera name will not be added to the file name
  • When executing from a bat file, add-on installation is required for the rendering environment

Added “All view layers” option

  • Render all view layers
  • View layers with Use view layers disabled are passed through
  • The view layer name is added to the output path filename.
  • “Folder by view layer name” option
    • Classify into folders with view layer names
    • No longer add view layer name to file name
  • When executing from a bat file, add-on installation is required for the rendering environment

Added “Resolution” option

reso_2020-05-27_21h54_46
You can set a different resolution from the settings in the blend file.

Added “Render Engine” option

engine_2020-05-27_21h54_55
It uses a different engine from the settings in the blend file.

  • You can choose from Eevee, Workbench, Cycles, etc.

“Other” settings

“Other” is used to specify something other than the default render engine.

  • You must enter the capitalized unique name specified for each engine
  • You can get the current engine name with “bpy.context.scene.render.engine”

Added “User Script” option

user_script_2020-05-27_21h55_02
User scripts can be run before rendering.
You can configure individual settings that you don’t like in add-on settings.
There are three methods available depending on the situation.

User script file

  • Specify the location of the .py file to use and execute

Text block

  • Executes with the text block in the current blend file
  • Useful for running multi-line programs that are not as filed
  • “” Is not used as it is, so “” is automatically converted to “'”

One line user script

Execute a single line of program.
If you’re new to Python, it’s easy to paste the execution history that is displayed in the info editor.

Example: Change the scene camera to the camera named Camera_B

bpy.context.scene.camera = bpy.data.objects["Camera_B"]

  • Convenient for simple execution
  • You can use “;” as a line break
    • You can use this to execute even multiple lines
  • “” Is not used as it is, so “” is automatically converted to “'”

Supports all scene options in external blend files

  • Added " Divided folders by scene name " option to all scene options

Added count display

The number of frames, the number of scenes, and the number of cameras are displayed.
It is displayed on the left side of the option menu.

  • The number of frames shows the total number of rendered frames

Changed

Change menu layout

With more options, we’ve adjusted the layout to make it more visible.
Made it possible to collapse detailed options.

1 Like

wow :star_struck:
thanks for this huge update!

ver1.3.12 Rendering stopped / all logs displayed / Bugs fixed

Fixed bugs in various functions to improve stability.
You can now stop the rendering job.
Now you can see the current status of each render job, making it easier to see what you’re doing.

Improvements and bug fixes related to external blend files

Enabled to obtain some information when adding an external file .

  • It solves the problem that progress bar cannot be displayed unless “Get status from blend file” is executed .
  • You can get the scene name, frame start, frame end, output path, engine name of each scene.
  • To get more status, you still need to do “get status from blend file”

Bug fix

  • Fixed the problem that “Get status from blend file” fails when the data name has Japanese.
  • Fixed an issue where the engine option could not be selected
  • Fixed an issue where the folder option for batch rendering was not selectable
  • Fixed the problem that various options added in ver1.3.0 were not supported when switching scenes.
  • Fixed the problem that “Find missing files” function may not work properly.

Stop a running rendering job

2020-06-09_14h32_01
You can now cancel a rendering job.

  • You can cancel it by clicking the “✕” button on the upper right of the in progress rendering job on the progress bar .

Display all logs

  • Made all render logs visible from the console
  • You can now check the latest one-line log
    • Now you can see what the rendering work is doing
  • Changed to save a log file that saves all logs
    • Will be saved in the log_probar folder

Added automatic log file deletion function every 30 days

Periodically delete the log_probar folder to the Trash to prevent the log file from becoming huge.

  • It is performed when Blender is started or when the Back Render add-on is registered.
  • Done every 30 days
  • Only done if there are more than 30 files in the folder

Number of threads

  • Initialized the number of threads to 0
    • Now uses all PC power by default
    • Set to 1 or higher if you want to do different work while rendering
  • Maximum number of threads is 64
  • Fixed an issue where the number of threads could not be set to 0

Preview render

  • Preview renders can now be background rendered
    • Render by using another Blender as standard
  • Enabled to render even if the current file is not saved
    • If you want to use another Blender for background rendering, save the current file

Bug fix

  • Fixed an issue where an error was printed when preview-rendering the current blend file when there are no list items in the external blend file
  • Fixed an issue where the end frame could not be set in the “Use action frame range” option.

progress bar

  • Enabled to edit the name of each item
    • You can edit the name by ctrl-clicking on the name of each item
    • If you write down the number of samples and the rendering settings, it will be easier to identify the job.
  • Enabled to change the monitoring interval of rendering jobs from add-on settings

Bug fix

  • Fixed an issue where job was not monitored when saving a file with the progress bar menu displayed and reloading the file
    • Make sure to close the menu whenever a file is loaded because it starts monitoring when the progress bar menu is opened

Other Bug fix

  • Fixed an error that occurred when executing the main rendering function
  • Fixed an issue where the add-on menu disappears when the user setting bat file save type is set to “Always select by user”

Known bugs

  • Depending on your project settings, it may be slower than normal rendering
    • Seems like a problem with command line rendering itself
  • If there is a file output node of the compositor editor in the progress bar, there is a problem that the count will be incorrect.
    • This is a problem that occurs because both the add-on render saves the image and the file output node saves the image, and the add-on is counting the number of times the image was saved.
1 Like

ver1.3.2 Updated Bug fix

Added job processing order option

In the existing rendering method, there was a problem that the processing was slow when executing the job of multiple list items of the external file, so I added the option to process it in order.

  • Simultaneous processing (low speed)
    • Process all jobs at once
    • Rendering time is slow (existing method)
  • Process in sequence (high speed)
    • Process jobs in order
    • There is a bug that Blender can not be operated during execution
    • Experimental

Bug fix

  • Fixed an issue where progress bar items could not be created properly when rendered in external file mode
  • Fixed an issue where the pre-execution progress bar item could not be deleted
1 Like