blender 2.80 experiment 7 - keyframes

Nikolaus Gradwohl2019-01-14T05:20:22+00:00

This blender experiment is based on the curve generation python script from my erlier post - Ths time I added keyframes to the locations of the bezier curve vertices and their handles.

Keyframing a curve vertex from a python script is pretty simple. All that is required is calling the keyframe_insert method on the point object and specifing the path to the attribute that should be keyframed.

For example

b.bezier_points[i].co = (1,1,1)
    b.bezier_points[i].keyframe_insert(data_path='co')

inserts a new keyframe for the position of a curve vertex at the current frame of the scene.

to change the frame i used

bpy.context.scene.frame_set(framenumber)

you can download the blend file here

keyframed curve vertices

read more ...

blender 2.80 experiment 5 - scripted curve

Nikolaus Gradwohl2018-12-12T05:30:07+00:00

For this blender 2.80 experiment I created four bezier curves using the blender python api. There have been some changes in the api, but porting existing python scripts to 2.80 is pretty easy - the main changes required for older code to run is how the objects get added to the scenes, because of the new collections in blender 2.80

you can download the blend file here

scripted curves

to run a python script open a texteditor and run a script with ALT-p

read more ...

WTF-Counter version2

Nikolaus Gradwohl2018-11-11T04:15:20+00:00

nine years ago I build the first version of my wtf-counter - a huge emergency button connected to an arduino and a linux box that later got replaced with a raspberry pi. The button can be hit whenever a WTF! situation is happening in the office and the current count is displayed on a monitor. The installation is still in place and used quite a lot - but since I'm currently working at a customers site, I've build a second version. But since the toolstack I used for v1 is a bit dated by todays standards I decided to modernize it a bit.

The new version of the WTF-Counter uses a raspberry pi zero and the emergency button is directly connected to one of the gpio pins of the raspberry using only a resitor and a ts-jack. The pi writes an entry to a log file whenever the button is hit and uses a small monitor to display the current count using a small pygame programm. I didn't install an X-Server but draw the graphics directly on the framebuffer of my pi.

wtf counter v2

read more ...

denoising blender animations with opencv and python

Nikolaus Gradwohl2017-04-07T05:42:22+00: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+00: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+00: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+00: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+00: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+00: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

traces

read more ...

blender game of life

Nikolaus Gradwohl2012-08-28T06:56:59+00: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 ...