Using random or noise functions to create movement like camera shakes can become annoying because it’s not always easy (or feasible) to control what’s going on between key frames. In that case you can “posterize” the result using the lerp() function like this:

with yourFunction referencing your original random curve and step being the interval in frames in which you want to sample that curve (so 5 would sample every 5th key frame, .2 would sample 5 times in-between key frames etc…).

Inf pixels are a pain, because the empty areas of a render could be inf as well. So sampling the z with an expression node and using the value of an adjacent pixel for each of them will mess up your edges. If possible, try sampling the surrounding area instead. This will leave the edges intact but deal with the odd erroneous pixel.

When there are NaN pixels in your render you can either use the value of an adjacent pixel or the average of all adjacent pixels to fix it. The latter will probably give better results, but won’t work when there’s another NaN pixel next to the first one. In an expression node, type:

To mirror your animation curves, you can use some simple expressions. Let’s say you animated an object from frame 0-50, and now you want to mirror it to frame 51-100.

Just write the following in your specific knob:

Python

1

curve(frame>=50?50-(frame-50):frame)

This uses the command:

Python

1

curve(x)

which will hold the animation on frame x. So what the above example does, it checks if the current frame is 50 or above. If this is true, it frameholds 50-(frame-50), which at frame 52 for example is …

Python

1

2

3

50-(52-50)

50-2

48

So on frame 52, it frameholds frame 48. If the frame is under 50, is just gives you your current animated value.

This is pretty useful for creating walk-arounds or anything symmetrical, when you’re too lazy to animate everything. :-)

Say, you need to animate a number and want one decimal. You link a text node to a floating point slider to get the job done, however, it will output a never-ending string of digits that nobody really cares about. You can format this, however. Have no fear.