A Blender Addon to manage renders with Render Region. Works with two methods, "divide" or "multiply": "divide" divides the render into regions and allows you to render all regions or just some; with the "multiply" method the render resolution is multiplied by the indicated value and the render is divided into regions, all with the original resolution.
Useful in several cases, for example:
The main goal is to create scripts to launch the render from the terminal, but it is also possible to render from the addon, although in this way it cannot automate the merging of the regions.
To merge all images from the script created by this addon imagemagick and python 3 must be installed.
The regions are rendered top to bottom left to right, so the first one will be the top left and the last one will be the bottom right. You can add margins to regions to have overlapping areas: this way you can avoid problems due to denoise in cycles or effects in the compositor, for example "glare", when merging regions.
Tested with Cycles and Eevee with Blender 4.2.0, in Ubuntu 24.04 and Windows 10.
(the "Output path" field must be set correctly)
This addon is set by default to create scripts, to launch the render from the terminal.
Selecting "Create bash and python script" the "render region" button write a script, for launch the renders, (.sh bash script in Linux and MacOS, .bat batch script in Windows), and a python script, for merging all images, in the output folder.
The bash script launches renders of the selected regions, creating a temp python script for set the region to render. In the script there are commands for all rendering; the regions not to be rendered are commented out. At the end of the script is the command to run the python script. If you do not want to start the process of merging all the renderings, you must comment out the line with the python command:
The python script crops (if overlap margins have been set) and merges all regions to get the final image.
There are two methods: Divide and Multiply
The render is divided into regions according to the values indicated in the "Columns" and "Rows" fields. "Columns" indicates how many parts the width of the render is divided into, while "Rows" indicates the division of the height. The "regions to render" field indicate the regions to render.
For example:
-- Method: Divide -- "Columns": 2 and "Rows": 3 -- regions to render: all
Obviously it is better to avoid dividing the render into regions that would have non-integer numbers: 1920 in 2 regions (960):ok; 1920 in 3 regions (640):ok; 1920 in 7 regions (274.28...) no.
The resolution, X and Y, is multiplied by the value indicated in "multipler" and the render is divided into regions, all with the original resolution Example:
This addon can be used with both Cycles and Eevee, but with Cycles there are problems using "Denoise" (Tab Render Properties > Sampling panel > Render - Denoise check): the "denoise" produces artifacts along the edges of the image, usually only for single pixels along the edges: by merging the images these artifacts will be clearly visible as they are all close and aligned. Other possible problems during merging can be given by effects in compositor, such as the "glare" which adds a halo around the brightest pixels: if these pixels are located near the edge of the region the effect will add the halo which may be larger than the edge distance and therefore be cut off. Combining the images you will see the halo cut out.
To fix this problem, the regions need to be enlarged by adding a margin which will then be cropped before merging the images.
Since the regions are calculated in a relative way and not in pixels, it is difficult to find a value for the margin compatible with the render size, because you have to avoid rounding problems that would affect the render size.
The button "Calculate Margins" finds the largest margin, starting from the value in "Max Margin" going backwards, which generates values with fewer decimals, safer.
The first best values found are written in the "w" and "h" fields. Any other values are reported in the terminal.
If no safe values are found, 0 is returned. In this case you need to change the rendering size, or the number of regions, or increase the "Max Margin" value.
You can choose the value of the margins without calculating it with the "Calculate margins" button, but rounding errors will be possible.
The "Create Reference Image" button generates a reference image (using imagemagick); region borders are drawn with red lines, and margins (or overlapping areas) with semi-transparent areas. All regions are numbered.
If the scene uses the compositor and there are "file output" nodes, the script will modify the names of each slot by adding the indication of the region they belong to. For example:
this name will be changed to "comp2_3x2_0_0" for the first render, "comp2_3x2_0_1" for the second render, and so on. The python script that merges all the renders should also merge the renders from the File Output Node.
If Compositor is activated and there are "File output"nodes, the file name will be changed according to the name assigned to the region.
Control Render Region is distributed under the terms of the GNU General Public License, version 3
limit resolution of reference image
This extension requests the following permission:
Create script to render from terminal and render image