The rock snake

Personal project · Houdini, VEX, Cinema 4D and Octane

3D render of a rock snake with a glowing blue eye and dramatic rim lighting against a dark background

The rock snake will appear in a game my boyfriend is working on. It’s a personal portfolio project in which I dived deep into the technical side of Houdini, to explore how you can build a complex, organic creature procedurally.

The rock snake, built procedurally in Houdini, in a desert landscape in a game, with a small figure in the foreground that shows how big the snake is
In my boyfriend’s game: the small figure in front shows how big it is
The rock snake, built procedurally in Houdini, coiled in an arena in a game, beside a circle of rocks, with a small figure for scale
In the arena: coiled beside a circle of rocks
The rock snake, built procedurally in Houdini, at night in a game, with falling snow and a small figure in a glowing circle on the left
At night in the snow, with the small figure on the left in a glowing circle

Thousands of stones, one snake

I wanted to show how you can use Houdini and VEX to build a robust snake out of countless loose stones and rock fragments. The eye-catchers are the glowing blue eyes. It’s all about procedural generation and detail, for games and VFX.

How it started

The snake started out as a head with a hood, like a cobra’s. It didn’t have a tail yet. Below you can see the first model, next to a human for scale. The first renders didn’t have any loose rocks on them either: the skin was a grainy layer, but the blue eye was already glowing.

From Cinema 4D to Houdini

I started in Cinema 4D. There I first tested the stones on a doughnut. The idea: the stones have to hold the shape of the doughnut, and later follow the shape of the snake as well. After that, I had particles move over the snake, using Flock and Surface Attract among others, and used a Cloner with different stones.

Switching to Houdini was the turning point of this project. There, I got the collisions between the stones under better control. They are simulated with two separate systems: an RBD simulation, and a system I wrote myself in VEX, in the pre-solver of the RBD solver. That way, the stones react to each other as they move.

In Houdini, I set up the rig and the geometry of the snake. I then scattered the rocks over it procedurally with my own VEX code. In the end, I lit the snake in Houdini and rendered it with Octane; I had already rendered the first phase in Cinema 4D with Octane as well.

Wireframe of the rock snake in Houdini, with the node network that imports and merges the model

A tail, and a pose like Kaa

At first the snake had no tail at all. But I wanted it to lie coiled up, like Kaa in Disney’s classic The Jungle Book. I loved that pose. So it got a tail. After that, I mainly worked on the animation, to get it just right. For the close-ups, I placed a whole set of cameras around the head.

In the video, the snake also breathes fire and smoke. I first tested that fire with a Pyro Emitter in Cinema 4D.

Test in Cinema 4D: a stream of fire from the mouth of the grey snake model, with the Pyro Emitter settings next to it
A test with a Pyro Emitter in Cinema 4D: fire from the mouth

An ecosystem on its skin

Beneath the rocks, its skin is built up like an ecosystem: it has moss on its skin, with lots of stones on top.

The biggest challenge

Distributing all those thousands of stones so that the shape of the snake stays smooth. And giving the lighting in the dark exactly that menacing, cinematic edge.

To keep the snake’s shape smooth despite all those thousands of loose stones, I built the base from a clean underlying curve rig and smooth geometry in Houdini. The VEX code does the clever calculations behind the scenes: with it, I very precisely control the distribution, rotation (orientation) and scale of each individual stone relative to the surface normals. Thanks to these custom VEX functions, all those thousands of stones fall automatically and seamlessly into the curves of the body, so the organic, flowing line is perfectly preserved without turning into a chaotic pile of rubble.

Next project: the glowing stag →

E-Line Vision
Bringing vision to light.