Saw this neat trick in a tweet from Donald Mitchell. If you unwrap a 4d noise on a 4d torus, you get a perfect non-distorted looping texture. The math is super simple even.

# Nodevember 2019

I’m taking part in #nodevember, the idea is to do something small with nodes each day, according to prompts given at http://nodevember.io.

I’ll be adding stuff here as I go. Not too clever stuff so I’ll just dump it all into one post.

Nov 1 : LAVA

Nov 2 : CLOUDS

Nov 3 : LIGHTNING

Nov 4 : TORNADO

NOV 5 : SNOW

NOV 6 : REPTILE

# Hodgepodge Cellular Automaton

It’s alive!

I was reading an old favourite, “The Computational Beauty of Nature“, and ran into this interesting cellular automaton the author dubbed Hodgepodge. The original source seems to be “A CELLULAR AUTOMATON DESCRIBING THE FORMATION OF SPATIALLY ORDERED STRUCTURES IN CHEMICAL SYSTEMS” from M. GERHARDT and H. SCHUSTER, 1988. It seems to also be known as a “Belousov-Zhabotinsky Reaction”

Luckily the book is accompanied with some source code, so this was an easy steal ðŸ˜‰

2019-07-19 Hodgepodge 3d

This was easy to naively extend to three dimensions, here you go.

# 2d Convex Hull

A 2d convex hull is nothing new, but here we can control the number of vertices.

First we create the hull with Triangulate 2d and Divide, and measure edge lengths. Then we recursively collapse edges by finding the shortest edge and collapsing it into the intersection of the neighboring edges. Repeat until N points remain.

# Wispy Clouds

You can get wispy clouds by doing extreme extreme volume displacement by some nice noise. Here I have a planar volume and I’m only displacing along the volume (Y displacement multiplied by 0) so I don’t even need to enlarge the displacement bounds.

# Periodic Pebbles

A looping set of pebbles, e.g. for rendering a looping texture.

# Stereographic Fisheye Lens

# Face Contours

Back again. This started as something else, but ended up with finding contours. I calculate the difference between a sphere and a face, and in uv-space get the curl, which is then projected back onto the mesh.

# Max velocity volume blending

Velocity volume blending has always had a glaring omission in my opinion. *Add* mode gets out of hand, *Blended Average *values areÂ hard to nail down, what I want is to pick the greater velocity from the existing vel and my new source vel. I’m sure most users think that’s what *MaximumÂ *mode is, but it is not!Â In fact it picks the larger numeric value for each component – so if you have a volume of {0,0,0} and you try to blend in some {-2,0,-2}, you still end up with a volume of all zeros. This is easy to confirm with the attached scene by bypassing the added switch node.

The attached scene has an additional Field VOP that overrides the default Maximum behaviour with what I think is the more logicalÂ operation – the longer velocity vector is picked for each voxel.