Tools / TumbleRig / Utilities / Nodes

Apex Crowd

Tens of characters playing and blending clips from one Scene Animate, on points.

Access
TumbleTrove+
Node version
1.0
Package
TumbleRig
Houdini
22.0+
What you can make with it

Overview

Key a walk, a run or an idle in a Scene Animate, wire it in with some points, and every point becomes an agent playing those clips at its own time, speed, blend and size. Agents are not rigs: the rig runs once per clip frame and every agent reuses those frames, so thirty agents cost a few milliseconds a frame. Re-key a clip and every agent plays the new keys.

TIP

Promote to Hero turns one agent into a character of its own with its clips as keys, to animate by hand.

Parameters

Clips

Find Clips

Fills the list from the keys: every run of keyed frames with no step bigger than Gap, per character.

Gap

The largest step between keys inside one clip. Leave more frames than this between clips.

From Bookmarks

Fills the list from the timeline's bookmarks instead: one clip per bookmark, named after it, for each character keyed inside it. Drag a bookmark over each clip on the timeline (End on the frame that matches Start for a cycle) and the clips no longer depend on the gaps between keys.

Name

What the agents' clip settings call this clip.

Character

Whose keys it plays.

Start, End

The clip's frames in the Scene Animate. For a cycle, End is the frame that matches Start.

Mode

Cycle repeats the clip. Hold plays it once and holds the last frame.

Root Offset

For a cycle that travels, such as a walk: each cycle starts where the last one ended instead of jumping back.

Agents

Clip, Blend With, Blend

The clips every agent plays, and how much of the second one, 0 to 1.

Vary Blend

Moves each agent's blend up or down by up to this much.

Start Frame

The frame where an agent with no offset is at the start of its clip.

Spread Offsets

Starts each agent at a random frame of its clip, so they don't move in step.

Vary Speed, Vary Size

Each agent plays faster or slower, and is bigger or smaller, by up to this fraction.

Match Phase

Blends two clips of different length at the same point in each cycle, so a walk and a run blend step for step.

Seed

Another random spread.

Draw

Draw

Each Agent writes every agent into one mesh. Instances blends a few variants and copies them to the agents as packed geometry, which draws faster; agents sharing a variant move in step and play at speed 1.

Variants

How many phases each clip combination gets with Instances.

Speed

  • Clip cache: the rig runs once per clip frame, about 3 seconds for 75 frames, then stays cached. The rig's viz (joint boxes, tubes) is always left out, so the rig skips building it and no agent carries it. It runs again only when you change keys, clips or the characters. Shorter clips cache faster.
  • Each Agent (about 10 ms a frame): cost grows with agents × points per character. Every setting works: Vary Speed, Vary Blend, offsets, per-agent clips. The default, and the right choice up to a few dozen agents.
  • Instances (packed copies): cooks one mesh per variant, so cost grows with the number of variants, not agents, and the viewport draws packed copies fastest. Pick it for many agents (a hundred or more) playing a few clips. Keep variants few: Vary Blend at 0, few clip combinations, Variants 4 to 8. Vary Speed does nothing here (variants play at speed 1), and agents in a variant move in step.
  • Vary Blend makes nearly every agent its own blend: no cost in Each Agent, but many variants in Instances.
  • Heroes are full characters: each costs what the rig costs (tens to hundreds of milliseconds). Promote only the few the camera looks at.
  • Animated points cost nothing extra; the clip cache is unaffected.
  • For playback, display the crowd node, not the Scene Animate above it, so the rig doesn't run as well.

Heroes

Agent, Pick Agent

The agent to promote or demote. Pick Agent: click it in the viewport.

Promote to Hero

Adds a Scene Add Character and a Scene Animate below the crowd with the agent's clips keyed on every frame of the shot, placed where it stood, and hides the agent in the crowd.

Demote

Shows the agent in the crowd again. Its hero nodes stay.

Root Control

The control a hero is placed with (its translate, Y rotation and scale get the agent's place).

Heroes

The agents that are heroes, by number.

Inputs and outputs

Inputs

Scene Stream

The output of a Scene Animate holding the clips, one or more characters. A clip whose Character the stream doesn't have plays nothing: the node warns and lists the characters it found.

Agents

Points, one per agent. They place it as Copy to Points does: P, then orient (or the 3×3 transform that skeleton points carry, or N and up), then pscale. The shapes' normals (on points or on vertices) and other directions turn with the agent. Animate the points and the agents follow them; turn Root Offset off for a clip then, or the agent travels twice. These point attributes override the node's settings: clip, clip2 (clip names), blend, offset and speed (frames, a multiplier), id and hero.

Recipes

Version notes

  • Apex Crowd: warns when a clip's character is not in the Scene Stream instead of making no agents; "no clips yet" shows on the node too
  • Apex Crowd: agents' normals turn with them on every character, so they shade like the character whichever way they face
  • Node cache before every Output of 96 assets: a reopened scene reads a node's result without cooking what is above
  • Apex Crowd: agents' normals blended and turned with them
  • Apex Crowd 1.0: no rig viz in the clip cache, skeleton transform placement, From Bookmarks, speed tips, steer recipe
  • Apex Crowd 1.0 (th::apex_crowd, TumbleTrove+): tens of characters on points playing and blending Scene Animate clips