denoising blender animations with opencv and python

Nikolaus Gradwohl2017-04-07T05:42:22+02:00

Nikos Priniotakis posted a teaser of a denoising script for blender animations a few months ago, that shows really impressive improvements on a noisy cycles animation (see his original tweet here) I sent some twitter messages back and forth with him and he sent me the links to the opencv denoise function he used for the demo. So I finaly found the time to wirte a short python script that uses pyopencv to denoise all the pictures in a folder and copies it to another folder.

The script I used to denoise my animation is here

import cv2
import os
import numpy as np
from matplotlib import pyplot as plt
files = os.listdir("metabubbles/")
for f in files:
    if f.endswith('.png') and f.startswith('0'):
        print f
        img = cv2.imread("metabubbles/%s" %f);
        dst = cv2.fastNlMeansDenoisingColored(img)
        cv2.imwrite('res/%s' %f, dst);

The denoising process is no magical pixiedust that can be sprinkled on your noisy cycles-renders to fix everything but when used correcly it can improve preview renders a lot, but if the script is used on an image sequence that is too noisy it introduced a whole lot of new artifacts. I used the script on an amiation I rendered last year. Here is how the original video compares to the denoised version.

denoising blender animations

read more ...

Animation Node experiment - closed curve

Nikolaus Gradwohl2015-11-24T08:12:12+01:00

For this animation I used a pyhton script node to generated 3D coordinates for a closed curve you can download the blend file here

closed curve

read more ...

Animation Node experiment - script node spiral

Nikolaus Gradwohl2015-11-19T06:52:59+01:00

For this animation I used the python script node of the Animation-Node-Addon to create a list of coordinates for a bezier-curve.

you can download the blend file here

script node

read more ...

particle driver experiment

Nikolaus Gradwohl2015-10-07T06:24:12+02:00

for this experiment I used a driver expression to animate the particle emission speed

you can download the blend file here

particle driver experiment

sound visualizer experiment 1

Nikolaus Gradwohl2014-02-07T13:52:21+01:00

for this sound visualizer I created a python script that creates curves for 16 frequency bands of the sound file

The song can be heard in full length here

my script is based on the unbake f-curve script by liero

you can download the blend file here

sound curves

object traces

Nikolaus Gradwohl2013-09-23T04:46:08+02:00

For this animation I used the bTrace-addon to create a curve from a set of particles. Then I wrote a small python script that copies the current state of the curve every 5 frames. I animated the visibility of the copies to make them appear only if the original curve has passed this position to create a 3D onion skinning like effect.

you can download the blend file here


read more ...

blender game of life

Nikolaus Gradwohl2012-08-28T06:56:59+02:00

I implemented a game-of-life engine in python that generates blender animations

The generation of the blend file takes a while and they get quite big so I made the python script available at the end of the blog post instead of the blend file this time

game of life

read more ...

9^3 cubes

Nikolaus Gradwohl2012-05-25T04:51:08+02:00

The cubes and the animation keyframes were generated using a python script

you can download the blend file here


read more ...

blender labyrinth generator

Nikolaus Gradwohl2012-05-21T05:08:35+02:00

I ported my labyrinth generator from processing to a blender python script

you can download the blend file here


read more ...

flying through the menger-sponge

Nikolaus Gradwohl2012-05-02T06:12:36+02:00

This is a flight throught a level 4 Menger Sponge. I generated the fractal using a pyhton script.

The blend file is very big so I don't link it here directly. You can regenerate it very easy by opening a text-editor in blender and running the python script below the image.

Menger sponge

read more ...