The second project that I was working on was car dynamics inside Houdini. My original idea was to make car dynamics and make the car crash into a wall or column. However, I didn’t manage to make the car crash due to running out of time.
I created a setup that can be applied to any car. The car can accelerate, brake and steer. The setup uses rbd simulation and does not involve a single keyframe. Because it’s a simulation, the accelerate and steering inputs can be mapped into the keyboard or gamepad via Houdini CHOPS and the car can be controlled almost real-time.
I created a simplified car that was used as a proxy for simulation and later swapped for actual high resolution car geometry. Working with lower resolution geometry made everything easier and faster.

I found and downloaded high resolution 3d model of Jeep. I had to precisely align the proxy geometry with the high resolution so I can later swap them.

Based on the simplified car geometry, I created constraints. Constraints are basically connections that hold the car parts together. There are many constraint types – Glue, Hard, Soft, Spring. Each constraint has its own behaviour and properties such as strength, rest length, damping etc.
The first constraint I made was the constraint connecting the wheel disk to car body. I used a spring type of constraint, and the constraint did the suspension effect of the car.

To enable steering, I had to create a steering geometry on the front wheels. The steering geometry was constrained to front tires. I used hard constraint. Hard constraint can use angular motors. Angular motor can add angular velocity around a certain axis. I created an angular motor around x axis. The value of the angular motor can be changed real-time during simulation. In this way, I was able to make the car steer. To lock the steering to a certain degree, I had to use a cone twist constraint. Cone twist constraints can limit rotation to a certain degree.
I also created a hard constraint between perpendicular wheels. This constraint represented axis. I also constrained each tire to disk with hard constraints. I did add an angular motor to make the tires rotate and essentially accelerate.
That’s a brief description of the constraint setup.

I made a simple terrain geometry with heightfield noise. The terrain was then imported into the simulation as a collider. I exported the simulation as a points. Each point represented the centroid of the packed car part. I then used the transform pieces node to match high res car geometry with each point based on the name attribute. The transform pieces node transforms input geometry according to the transformation attribute on template geometry.

I was running out of time, so I couldn’t afford to spend time with proper shading, lighting and rendering. I created a series of flipbooks and a single render.