Skip to content
toadstorm edited this page Aug 29, 2023 · 25 revisions

The Tools nodes are a combination of miscellaneous utilities and low-level API nodes that are commonly used inside other MOPs nodes. You can use these low-level nodes to potentially create new MOPs nodes of your own.

MOPs Alembic Skeleton (Plus)

alembic skeleton

MOPs Alembic Skeleton reads the intrinsic attributes of a properly-configured Alembic SOP, and builds a KineFX-compatible skeleton to match. You can use this skeleton, along with properly captured geometry, to quickly pose or animate an Alembic with a transform hierarchy. To use it, first make sure your Alembic SOP is outputting both shape and transform nodes (check the "Create Primitives For" parameter), and that the geometry is packed. Then connect to MOPs Alembic Skeleton; you shouldn't need to modify anything on the node itself. Then connect the two outputs to the matching outputs of a Capture Packed Geometry SOP, and enable "Capture by Attribute." Set the "Skin Attribute" to match the "Xform Path Attribute" on the MOPs Alembic Skeleton (this defaults to xformpath). You can then deform this geometry using a Bone Deform SOP, with the original skeleton as the rest (second) input, and the deformed skeleton as the third input.

MOPs Apply Attributes

apply attributes

Apply Attributes is the guts of most operations in MOPs. It takes packed primitives in the first input, and applies template point attributes (like those used by the Copy SOP) from the second input to the transforms of the first. The template point attributes can be applied as an additive, multiplicative, or overwrite operation to the transforms of the input packed primitives.

Apply Attributes, by default, uses the f@mops_falloff point attribute of the first input to influence how much each packed primitive is affected by this transformation. A value of zero means that the primitive isn't transformed at all, and a value of 1 means it's fully affected.

Orientations are blended using spherical linear interpolation, or "slerp". This method automatically finds the shortest path between two orientations in order to smoothly blend from one to the next. This is great for avoiding common problems like gimbal lock, but it means that if you're trying to spin an object past 180 degrees, you may experience the object rotating backwards to take the shorter path. To combat this, Apply Attributes will look for a vector attribute v@euler on the template points, which correspond to common "XYZ" rotation values. If this attribute is provided, you must also pay attention to the Rotate Order setting in order to avoid potential gimbal lock.

You can enable "Local Space" to make the transformations happen in each primitive's own local space; that is, any transformations will be done relative to any existing rotations.

You can try to speed up operations with lots of primitives by enabling "Ignore Zero Falloff Primitives", though this can sometimes cause unexpected results.

If Copy Attributes is enabled, you can also copy any point attributes from the second input points to the packed primitives.

MOPs Assign Mapper (Plus)

See MOPs Attribute Mapper.

MOPs Attribute Mapper (Plus)

attribute mapper

MOPs Attribute Mapper, and its counterpart, MOPs Assign Mapper, are designed to help make it easier to drive complex attributes like colors, texture paths, or instance paths, with simple float attributes (like MOPs Falloff!). Using the included spreadsheet controls, you can generate one or more attributes to assign and configure a number of values for those attributes, each with an accompanying "key" attribute. For example, you could define Cd as 1=red, 2=green, 3=blue, then use MOPs Assign Mapper to look for any numeric attribute on your points or primitives and set the color to red, green, or blue depending on the value of that attribute.

This can make it relatively straightforward to randomize or art direct texture inputs for materials, file instance paths, material assignments, etc. The applied attribute can either be written directly to an attribute of your choice, or applied as a material override (compatible with Mantra, Redshift, and some other third-party render engines).

MOPs Collision Geo (Plus)

collision geo

MOPs Collision Geo makes it easy to generate simulation-ready collision geometry for Bullet simulations from packed primitives. It automatically detects objects that are identical to each other and decomposes each unique object into convex hulls only once for quick and consistent performance. It can also detect and convert animated sequences into convex hulls that deform along with the existing animation. The output geometry can be immediately wired into a Packed RBD simulation.

The conversion happens in two stages: first a remesh, then a decomposition using either convex decomposition (default) or tetrahedralization. If you're not seeing enough segments by default, try turning down the Max Concavity parameter. It can help to enable Preview Segments so you can easily distinguish between the generated convex hulls.

Make sure that you're connecting packed primitives to this SOP. If you want to decompose a single object, use the built-in Convex Decomposition SOP instead. This SOP is meant to convert lots of objects at once in a consistent way, or to convert packed sequences or packed Alembics for use in Bullet.

Note that you'll want to enable "Create Convex Hull per Set of Connected Primitives" on the RBD Packed Object DOP for the solver to properly read this collision geometry.

MOPs Extract Attributes

extract attributes

MOPs Extract Attributes is the complement to Apply Attributes. Extract Attributes takes the intrinsic attributes that define a packed primitive's transform matrix, and writes them out as typical Houdini template point attributes (v@N, v@up, p@orient, v@scale, v@pivot) that you can use with a Copy to Points SOP or the like. The above example is extracting the intrinsics from the pig heads, and the result is plugged in as the Template Points for a Copy to Points SOP that's copying the red arrows.

MOPs Index From Attribute

index from attribute

MOPs Index From Attribute creates a point attribute i@mops_index that the MOPs Instancer will use by default to determine what instances to place on different points if the "Indexing Mode" of the MOPs Instancer is set to "Point Attribute." It creates this index from any existing attribute via remapping it to a given minimum and maximum range. The defaults remap the f@mops_falloff attribute to a range of index integers from 0 to 3. The above example shows seven different instances being copied to points on a line that have an animated falloff generating a i@mops_index attribute via this node.

MOPs Neighbors

neighbors

MOPs Neighbors stores information about neighboring points or packed primitives to an attribute, that can be generated (or later regenerated) as polyline primitives connecting these neighbors. You can use this node to establish connectivity between nearby primitives for things like custom spread solvers, or to create "Plexus" style effects between primitives. The example on the left shows a simple neighbor network between points, computed from a "reference" frame. The color of the lines represents the total edge distance to each point from the "Start Point Group" (the large cube in the upper left). The example on the right shows a simple "Plexus" effect, which simply draws new lines each frame as the instances move.

MOPs Noise Patterns

noise patterns

MOPs Noise Patterns is the basis for many of the noises used throughout MOPs (the Noise Modifier and Noise Falloff nodes in particular). It can generate either scalar or vector noises in a variety of patterns. The above example shows an identical noise function, in vector mode on the left and in scalar mode on the right. Most of the noise patterns can be run in "time-varying" mode, which is an easy way to get constantly-evolving noise without having to animate the offset.

MOPs Orient Curve

noise patterns

MOPs Orient Curve uses Parallel Transport to compute an orientation frame for each point along a curve. It has built-in controls for twisting as well. It's intended as a more convenient implementation of MOPs Parallel Transport, which outputs vectors instead of an orient quaternion and has no other controls. MOPs Parallel Transport is an implementation of the Parallel Transport algorithm, as described by Entagma in this tutorial video. It's a stable way of determining a smooth orientation frame along the length of a curve, without the typical instabilities introduced by animation with the Polyframe SOP.

MOPs Preview Falloff

preview falloff

MOPs Preview Falloff simply maps the f@mops_falloff attribute to v@Cd. It comes with a few handy ramp presets for different visualization options. This node is used inside basically every Falloff-type node in MOPs. In versions of Houdini prior to 17.0.489, previewing an animated f@mops_falloff value would cause crashes, so there is also an option to preview falloff using sprites instead of the geometry itself. This can also help for visualizing falloff on packed fragments, which are a specially-optimized kind of packed primitive (typically generated by voronoi fractures or by MOPs Explode) that cannot properly display an animated falloff value in the viewport.

The Disable Falloff Previews shelf tool will automatically seek these nodes out and disable them within a given SOP network, which is helpful for removing potentially destructive operations (editing Cd or converting to sprites) caused by falloff preview.

MOPs Reorient

reorient

MOPs Reorient creates a quaternion point attribute, p@mops_orient, that acts as a replacement for a packed primitive's existing local orientation frame without modifying the underlying transforms at all. In plainer English, this resets the rotation axes of the packed primitives without visibly moving anything. The second input is intended to be either a set of points with matching i@id attributes and a p@orient attribute that you want to replace the orientation with, or, more frequently, a mesh that you want to transfer the orientation from.

This SOP is very useful for providing a more accurate orientation for pieces that you've just run through MOPs Explode, and want to actually "explode" outwards when translating in Z. Normally when you run MOPs Convert or MOPs Explode, the local orientations of each packed primitive are left at the default, so when you translate them, they'll all move in the same direction. This is rarely what you want after an Explode operation, so you can use MOPs Reorient to transfer the orientation of the original unexploded mesh to your exploded primitives, without actually modifying the underlying packed primitives at all.

The above example is taking a bunch of cubes fresh out of a MOPs Instancer and reorienting them using a polygon sphere. Translating the primitives along their local Z axis causes them to move in a roughly spherical pattern.

MOPs Rig Resample (Plus)

rig-resample

MOPs Rig Resample allows you to seamlessly insert new joints in between existing joints in a KineFX rig. The new joints are automatically skinned either using a cheap distance metric or biharmonic skinning, and any existing animation is preserved.

MOPs Set Sequence Time

set sequence time

MOPs Set Sequence Time adjusts the frame/index of a packed disk sequence or Alembic sequence that's been instanced via the MOPs Instancer. You can either use a point attribute or an expression to set the timing. You can also adjust the cycling mode of the sequences; this SOP supports the standard cycle types offered by Packed Disk Sequences (cycle, clamp, mirror and strict) and extends them to work with Alembic sequences as well. It does this with the help of a few point attributes added to your packed primitives: s@mops_abc_wrap, f@mops_abc_start, and f@mops_abc_end.

The MOPs Delay SOP can be used alongside packed sequences, too! Just enable the "Do Sequence Delay" parameter.

Important: the viewport will lie to you when displaying time offset sequences, especially if you have a lot of instances or unique offsets. You need to unpack to accurately preview in the viewport. Rendering will work correctly without unpacking.

MOPs Visualize Frame

visualize frame

MOPs Visualize Frame is a handy tool to quickly visualize the local orientation axes of any packed primitive. It can also visualize the orientations of any other meshes or points that have a p@orient attribute, or v@N and v@up attributes.

MOPs Waveforms (Plus)

waveforms

MOPs Waveforms can take any input float attribute or vector component or distance to a point and use it (plus time) as the driver for a periodic waveform function (a sine, square, sawtooth, or triangle wave). The result of the wave function can be used to set or modify the value of any other point attribute. This can be a great starting point for all kinds of looping animations. You can chain and composite multiple waveform functions together to create more complex animations.

If the Fade function is enabled, the waveform can quickly be eased in or out over a given timeframe. This fade can optionally loop as well.