Now that my working days are spent working purely with Swift, it's a good time to stretch my technical and creative muscles and learn something new in my free time. I've long admired Houdini from SideFX, and mastering that is my new goal.
I've picked Houdini over other 3D applications such as Maya and Modo for a few reasons:
- Houdini takes a procedural approach to building, animating and texturing scenes. Every object is represented as a node and its properties can easily be accessed and tweaked.
- VEX, Houdini's language, permeates the entire application: everything from geometry to shaders can be written in VEX and this is the direction I'd like to explore.
- Houdini seems to be the tool of choice for particle effects including pyrotechnics and fluid simulations.
- I love a node based user interface!
- SideFX have a great licensing model for learning Houdini: their Apprentice version is free for noncommercial projects and doesn't time out after 30 days.
- It's hard 🙂 I don't mean that in a bad way - Houdini is a huge and amazingly powerful piece of software that I suspect will be a challenge to master and who doesn't love a challenge?
I needed a bit of a kick start to get to grips with some of the basics - tasks as simple as setting a keyframe may not be immediately obvious. To help me out, I turned to Pluralsight who have some great online training.
My first experiments in Houdini have been looking at different techniques playing with impacts. I've taken four approaches, which you can see in the video above, here's a little summary of how I've put these together.
Setting the Scene
The scene is pretty basic: a box which is the target and a moving sphere which I'll launch towards the box. Adding a rigid body ground plane automatically creates a DOP (Dynamic Operations) Network - which controls the physics simulation.
I've also added a camera which points towards a null object centered on the box. The first simulation uses depth-of-field, so to get the camera's focus distance property to be the distance between it and the null object, I've written my first piece of VEX (hurrah!):
Of course, the day Houdini supports Swift will be the happiest day of my life 🙂
Experiment 1: Breakable Rigid Bodies
My first experiment is pretty simple to set up. Rigid body objects (RBD) are created from both the box and the sphere using the "RBD Object" shelf tool and the box is made breakable with the "Make Breakable" shelf tool. These two steps creates all the nodes necessary for the simulation:
In this network, there's only one solver - the rigid body solver.
Selecting the sphere and giving it an 'x' velocity under its "initial state" makes it fly towards the box and, upon impact, creates the effect above.
To get the depth of field rendering nicely, the camera has a pretty wide aperture (an f-stop of 0.6) and I've set the Mantra pixel samples to 8 x 8.
Experiment 2: Particle Fluids
My second experiment makes the box a highly viscous fluid - this is more like shooting a ball bearing through treacle. In this experiment, the sphere is still an RBD, but the box is made into a particle fluid using the "FLIP Fluid from Object" shelf tool. To add viscosity, I additionally used "Make Viscous". The end result is s lightly different DOP Network:
In this network, there are two solvers - the rigid body solver for the sphere and a FLIP fluid solver.
For this experiment, I wasn't interested in simulating refraction and decided on an opaque fluid. To that end, I turned off the fluid interior display in the top level network.
Experiment 3: Finite Element Method
The third experiment takes a very different approach - rather than making the box and the sphere rigid bodies, I made them into FEM solids using the "Solid Object" shelf tool. Solid objects have properties such as stiffness, damping and density and Houdini supplies presets for materials such as rubber, organic tissue and cork. Much like an RBD, solid objects have an initial state and that's how I gave the sphere its initial velocity.
The DOP Network after creating the solid objects is:
In this network, there's just one solver - the finite element solver.
Experiment 4: Grains
My forth and final (and favorite!) experiment uses Houdini's grains. Here, the sphere is an RBD but the box is turned into a system of grains using the "Wet Sand" shelf tool:
In this network, I'm back to two solvers - the rigid body solver and a POP solver for the grain particles.
A little tinkering with the clumping and internal collision properties of the POP Grains node gave a fairly solid object until the sphere hits it and makes it collapse.
Conclusion
Houdini is powerful - super powerful - but daunting. From my experience, it will take some time to start feeling at home in the application but, my goodness, it's worth it. Once I had a grasp of the basics, creating these effects was actually a pretty simple affair - the shelf tools give some really nice defaults that can be easily tweaked.
Keep an eye on my blog or follow me on Twitter, where I am @FlexMonkey, to to keep up with my explorations with Houdini.
Add a comment