Skip to content

MOPs Tutorial 1: Welcome

toadstorm edited this page Jul 8, 2020 · 9 revisions

Welcome to MOPs!

Hello and welcome to the first of the MOPs Masterclass tutorials! These are intended to be a series of lessons on how MOPs works, both practically and conceptually, rather than just a rundown of what every setting does. These core concepts are a lot less likely to change with future updates than the exact controls for each node, and my hope is that with this background knowledge, you’ll have a much easier time keeping up with changes, and I won’t have to re-record tutorial videos all the time.

MOPs is a toolkit that’s all about making it easy to move things around in Houdini. The main goal of MOPs is to take conceptually simple operations, like “rotate a bunch of things around their local axes” or “move things along a curve and loop when the end is reached”, and make them simple in practice. It turns out that even “simple” transformations can have some fairly involved math behind them, which we’ll get into a little bit in a later lesson, so MOPs aims to abstract that away so you can focus on the important things, like animating or lighting or going home in time for dinner.

Making packed transforms easier to manipulate

In any 3D package, you’ll find a concept like “instances”: meaning, a bunch of copies of a single object that are positioned, oriented, and scaled (“transformed”) in space. Instances are great because they’re computationally inexpensive compared to just animating regular meshes, since the computer only needs to keep a single mesh in memory and then copy it to each “transform”.

In Houdini there are a few different kinds of instancing available, but the most common kind you’ll see currently are called “packed primitives”. When you use the Copy SOP with “Pack and Instance” enabled, or when you use the Pack SOP alone, what you’ll get is a kind of “reference” to a mesh, represented as a single point in the Geometry Spreadsheet. The P attribute represents the position of each instance in space, but the rest of the transform information is cruelly hidden away from you in what Houdini calls an “intrinsic attribute.” Intrinsic attributes tend to store little secrets about all kinds of objects in Houdini, like whether it’s a polygon or a NURBs surface, what attributes it has, or, more importantly, what its transform is: its position, orientation, and scale.

spreadsheet What's the VEX function for "crying while vomiting"?

It’s easy enough to move these points around by manipulating the P attribute if you’re even a little familiar with Houdini… there’s plenty of operators that can handle that easily. However, things get a lot trickier when you want to rotate or scale packed primitives, and even more tricky to do any of these transformations in their local spaces.

World Space Local Space
world_space local_space

Just a couple of dudes, rotating. Nothing weird about it.

MOPs gives you the tools to easily modify these intrinsic attributes, in world or local space, without having to write any code or think too much about linear algebra. The less you have to step back and worry about the math, the more you can focus on art, discovery, and play. An important thing to remember is that MOPs is just a toolkit for manipulating attributes that already exist in Houdini. There’s nothing special about MOPs nodes other than the nice little icons… everything here is native Houdini. That means that you can mix and match MOPs nodes with regular Houdini nodes with very few exceptions. MOPs will work on any packed primitives, but they’ll work best when the points representing those primitives have an id attribute. Because packed primitives are represented as points, many MOPs nodes will also work just fine on regular old points, too!

MOPs also comes with some other great tools for messing around with meshes and curves, retiming animations, and a whole host of special Falloff nodes that can quickly be used to modulate the effects of other MOPs nodes. Like everything else in MOPs, though, these Falloff nodes are just messing with point attributes, so you can use them for completely unrelated effects!

falloff_rbd_activate Example file: falloff_rbd_activate.hip

It’s important to note that MOPs is built as an API… the main Tool nodes I’m going to describe in the next chapter, Apply Attributes and Extract Attributes, are used internally by most other MOPs nodes, and they’re open for you to use for one-off effects or to create your own entirely new tools.

The next tutorial is going to explain what the core MOPs nodes do in practical terms, and how they can be used to make all of these special attributes easier to work with.