grease pencil experiment 6 - grid

Nikolaus Gradwohl2019-07-17T04:11:06+00:00

for this animation I created a 3D grid of lines of grease pencil strokes with a python script

you can download the blend file here

grease pencil line grid

read more ...

grease pencil experiment 4 - filled shapes

Nikolaus Gradwohl2019-07-15T04:17:00+00:00

For this animation i created two shapes with different materials, that have stroke and fill colors activated

you can download the blend file here

grease pencil filled

read more ...

grease pencil experiment 4 - depth of field

Nikolaus Gradwohl2019-07-13T10:01:15+00:00

While experimenting with grease pencil animation scripted in python, i recognized that the grease pencil shapes also affect the depth map - so they can be used to change the DoF using the defocus node in the compositor. I was really pleasantly surprised - this opens a whole lot of new possibilities :-)

you can download the blend file here

depth of field on grease pencil

read more ...

grease pencil experiment 3 - animated circles

Nikolaus Gradwohl2019-07-12T05:19:59+00:00

for this animation I animated the drawing of the circular grease pencil strokes themselves

you can download the blend file here

animated circles

read more ...

grease pencil experiment 2 - freestyle

Nikolaus Gradwohl2019-07-11T05:16:41+00:00

for this animation i used a python scripted grease pencil animation similar to that in my blogpost from yesterday and added a proper blender 3D Object. I rendered the animation with eevee and freestyle

you can download the blend file here

grease pencil and freestyle

read more ...

scripted grease pencil animation experiment 1

Nikolaus Gradwohl2019-07-10T05:09:18+00:00

i recently read an article by Alex Martinelli about scripting the grease pencil objects in blender 2.8 (available here) and had to try this myself. I haven't used the grease pencil system in blender much so far, but now that I can use it to script in 3D I will definitly do more experiments with it.

you can download the blend file here

grease pencil experiment 1

the source code is heavily based on the examples of Alex, only the two nested loops are my code

read more ...

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)

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

to change the frame i used


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 ...