Progressive Animation Render Addon and Image Stacking

I remember when Cycles first came out, people loved the progressive rendering, where it shows you the whole image and gets clearer and clearer the longer you wait. But one of the first things people asked was “Can you render an animation progressively too?“. The answer was no. Until now that is.

I’ve created an addon that allows you to do exactly that.

proganim

(Download it!)

It’ll render each frame of the animation to its own folder (like path/to/render/frame_15/image.jpg), and then repeat the whole animation render again using a different seed, which means that there’ll be a different noise pattern. Then you can hit the Merge Seeds button and it’ll gather all the different images for each frame, average the pixel values and make a nice clean animation.

The idea of rendering different seeds and then merging them together is called Image Stacking. Yes I did a tut on this a while back, and yes the post has been deleted (due to the fact that I got it all wrong). Image stacking is simply taking a bunch of images with different noise patterns and mixing them all together, averaging their values. You can do this in Blender of course using the node editor by mixing the first two image with a Fac of 0.5, then the third image with the result of the last mix by 0.33, the fourth image with that result by 0.24, the fifth at 0.2… which is a lot of hard work if you have hundreds of seeds.

Cue ImageMagick! A small but powerful command line program that can do a bunch of stuff to images, like resizing them, converting them, aligning them, and oh yeah, merging them!

convert "path/to/images/*.png" -evaluate-sequence mean "path/to/images/merged_image.png"

That’s the command you’d use to merge a folder of images into a single image with less noise. If you like you can change mean to another mathematical function like median (which is apparently better when used in photography for merging high ISO noise images, but in my tests still proved worse)

That command is used in my addon, so make sure you have ImageMagick installed, otherwise it’ll moan at you.

Here’s a video overview of the addon, and below it is some temporary documentation before I finish it and put it on the wiki.

Repeats: The number of times to render each frame with a different seed. You can set this to some ridiculously unreachable number and then just stop it when you’re happy (you’ll have to kill the blender process to stop it though)

Samples per seed: Quite self-explanatory, the number of samples to render each time.

Output Path: This is exactly the same as the path in Blender’s usual Output panel, they are linked.

Folder Layout: You can either render to a bunch of folders where each frame has it’s own folder with the seed images inside those folders (/frame_15/seed_1.jpg, /frame_15/seed_2.jpg…) or have a folder for each seed set such that each of these folders has the entire animation in it(/seed_set_1/frame_15.jpg, /seed_set_1/frame_16.jpg). The latter (“Seeds”) is useful if you’d like to start compositing the animation before it has finished rendering all the seeds. This is probably better, but due to how ImageMagick works, a temporary folder is made when merging the images and all the images are copied into there, temporarily taking up disk space. Other than that there doesn’t seem to be any drawback that I can think of.

Seed Variance: A choice between incremental (increase the seed for every image) and random (a random seed between 0 and 1000000000). The only reason you’d need to use Incremental is if you want to know exactly what seeds you’ll get.

Overwrite: If enabled, the animation will render every frame for each seed just as you’d expect. But if you leave it disabled, it’ll skip images that have already been rendered. This effectively allows you to resume a stopped or crashed render. (It checks if the file exists and how many seeds have already been rendered for that frame)

Info: This block shows info like the total number of samples for each frame (samples per seed multiplied by repeats) and shows the paths to the images. When rendering or merging, this block will change to a progress indicator.

Merge on Completion: When all the seeds have been rendered, perform the Merge function.

Delete Seeds: When finished merging, delete the high-noise seed images, leaving just the merged ones.

Progressive Render/Animation: The big button. Render the current frame or full animation using the settings above.

Merge Seeds: Average the pixel values using ImageMagick. If you don’t have ImageMagick installed it’ll show an error and provide a link to the download page (and a link to this page on how to install it properly)

The end!
Please let me know in the comments if you have any ideas for a new feature, and report any bugs, crashes and errors.

Changelog:

  • 26/07/2013: Added Overwrite option to allow resuming of unfinished renders
  • 23/07/2013: Folder Layouts option, folders for seeds with each frame in them, or folders for frames with each seed in them.