Pighaus Games Docs

These docs describe 1.3, which is in testing. The version on Fab is 1.1: read its docs.

Composition1.1

Where the character sits on screen, and what moves them while you play. Every number is a percentage of the screen, and every one says what it does to the picture.

Composition is how you say where the character sits on screen. You pick a spot, say how much they may drift from it before the camera corrects, and add shifts that move the spot as you play: raise them when you look down, lead them when they run. The camera works out where it has to be for all of that to be true, every frame.

The screen, in numbers#

Almost everything here is a percentage of the screen:

050100
Xleft edgemiddleright edge
Ytopmiddlebottom

So 35, 55 is a third of the way across and a little below the middle. 50, 50 is dead centre. The one thing to keep hold of: Y counts down, so a smaller Y is higher up the screen.

A percentage means the same framing at any distance, lens or angle. A close Rig and a far one can share a spot; what differs is how far the camera has to move to reach it.

Where On Screen#

The spot the camera puts the character on. 35, 55 is the classic over-the-shoulder shot: the character sits on a third, and the space they're walking into is what you see. The shoulder swap mirrors it about the middle, so 35 becomes 65, and eases between the two.

Free Drift#

The camera always aims to put the character exactly on the spot. Free Drift is how far they may be pushed off it, by follow lag, a hard turn or their own animation, before the camera starts correcting. It's measured out from the spot, so 8 means eight percent either side.

This is what makes a shot feel held by a person rather than bolted to the character: footstep sway and small corrections happen inside it and never touch the framing.

Free DriftFeels
2, 3locked off: every step moves the camera
8, 10the default: relaxed but attentive
20, 25loose and observational: only real movement gets a reaction

Full Strength At is how far out the camera is correcting as hard as it can. Between the two, correction eases in, so the camera never snaps from doing nothing to full strength. Catch-Up Speed is how quickly it closes the gap: 2 is unhurried, 10 is brisk.

Max Camera Move#

The one setting in centimetres: how far the camera may move sideways or up and down to put the character on their spot. It's a budget, not a target. Ask for a spot that needs more movement than this and the camera stops at its limit, with the character short of where you asked. The preview on the Rig shows exactly that with a red line, and the asset checker warns you.

A far-away camera needs a bigger budget than a close one to reach the same spot.

Shifts#

A shift moves the spot while you play, and each one reads as a sentence:

> As Driven By goes from Starts At to Full At, move the character by Move By.

Look down past 15 degrees and, by 60 degrees, the character has risen 15 percent of the screen. That's Looking Down with Starts At 15, Full At 60 and Move By 0, -15. Note the minus: a negative Y raises the character, because Y counts down.

Every Rig has four shifts built in, because every Rig has an opinion about these moments, even if the opinion is "do nothing":

WatchesTypically
Looking Updegrees above leveldrops the character so there's sky to see
Looking Downdegrees below levelraises them so there's floor to see
While Turninghow fast you're turningmoves them into the turn
Looking Away From Travelthe angle between where you look and where they runslides them aside so you can see past them

Add more under More Shifts: speed, crouch, aim, falling, slope, lock-on and more, or any number your gameplay feeds in. Shifts add up, and Shift Limit caps how far all of them together can move the character.

Go deeperAll the settings on a shift
SettingWhat it does
Driven Bywhat the shift watches
Starts Atbelow this, nothing happens (in the driver's own units: degrees, cm/s, 0 or 1)
Full Atwhere the whole Move By applies
Response Curveoptional shape for the ramp between them; empty is a straight line
Move Byhow far the character moves, in percent. X across, Y down, negative the other way
Slide Or Turnmove the camera to reframe, or turn it on the spot
Extra Free Driftloosens the Free Drift while the shift is engaged
Takeshow long the move takes to arrive and to leave. Zero for smooth drivers like pitch; a little time for ones that flip, like crouch
Max Speeda speed limit, in percent of the screen per second. A slow look down moves the framing slowly the whole way; a fast pan is held to this pace. 40 reads as a deliberate operator; 0 is no limit
Ease Direction Changesfor a driver with a sign, like turning or the angle to where they run: when it flips at full strength, the character swings across the screen at the pace Takes and Max Speed set, instead of jumping to the other side. Off by default
Go deeperEvery driver a shift can watch
Driven byReadsIn
Speedhow fast they're moving. Move By X is spent along their direction of travel on screencm/s
Crouchcrouched or not. A Character is read directly; anything else calls SetCrouched0 or 1
Aimthe Aim camera state0 or 1
Ceiling Roomhow little room there is overhead0 to 100
Fallingfalling, judged by clear ground below0 or 1
Slopethe slope they're moving ondegrees, signed
Lock-On Distancehow far away the framing subject iscm
Framing Subjectwhere the framing subject sits, mirrored. Move By 100 puts the character exactly opposite thempercent
Gap Roomhow far off centre the camera sits in a gap. Move By 100 centres itpercent
Gameplaya number you feed in with SetGameplayDriveryours

Every driver is read once per frame, so two shifts watching the same thing can never disagree.

Go deeperSlide or turn

Sliding moves the camera so the character lands on the shifted spot, which is what the rest of composition does. Turning leaves the camera where it is and points it elsewhere, limited by the Rig's look-at offset limits rather than by Max Camera Move. Sliding reads as the operator stepping; turning reads as them glancing. A Rig can mix the two.

Try it#

Drag the values and watch the frame. The inner box is Free Drift and the outer one Full Strength At; look down past Starts At and Looking Down raises the character.

Where On Screen, Free Drift and Full Strength At on a 16:9 frame, and the Looking Down shift raising the character from 15 degrees down to 60.

See it before you play#

Open any Rig and the top of The Shot draws its framing: a 16:9 frame with the character to scale, the spot, the Free Drift and Full Strength boxes, and an arrow for every shift that's doing something. Under it is a slider for every driver the Rig reads, so you can drag pitch from level to straight down and watch the character rise before pressing play.

In game, Draw Camera Stack draws the same picture in front of the lens and lists every shift on its own line, so "which shift is doing that?" always has an answer.

Follow lag#

Under Following on a Rig, switched on by the tick on its line. Follow lag lets the character pull ahead of the camera when they sprint, then has the camera catch up once they stop. It's what makes speed feel like speed.

Tick Only Fall Behind In Depth and the camera only drops back along the direction it's looking. Run across the screen and the character stays exactly on their spot; run away from the camera and they pull off into the distance instead. Without it, a sideways sprint slides the character towards the edge of the frame as well.

Go deeperFollow lag settings, and how it decides
SettingWhat it does
Lag Starts Abovebelow this speed the camera keeps up exactly as normal
Full Lag Atthe speed where it hangs back the most
Follow Speed When Lagginghow hard it follows at that point. Lower than the normal follow speed means it falls behind
Most They Get Aheadthe furthest the character may get in front, in cm. A limit, nothing more
Catch-Up Speedhow fast the camera returns to its normal distance once the running stops
Caught Up Withinhow close it has to get before the return counts as finished
Only Fall Behind In Depthlag along the view direction only, leaving the framing alone

Which phase it's in is decided by speed, and the camera stack readout names it. Tracking: below Lag Starts Above, the camera keeps up. Lagging: they're running, so they pull ahead, out to Most They Get Ahead and no further. Returning: the running has stopped, and the camera closes the gap at Catch-Up Speed. Hold a sprint and the shot simply sits at the limit for as long as you keep running.

Two things make the return behave: the camera's momentum from the run is dropped as the return begins, so it stops with the character rather than coasting past, and the camera stops leading the character during the return, so a slow Catch-Up Speed really is slow.

Not to be confused with composition's own Catch-Up Speed above, which is how fast the framing corrects. Same words, different jobs: this one lives under Pivot, that one under Composition.

Go deeperWhat happens during a Rig blend

A Rig blend blends what each Rig would do, not what each Rig says. Each Rig's shifts are worked out on their own against the same drivers, added up and capped by that Rig's own Shift Limit, and then the two results are blended. So a Rig with no pitch shift crossing to one with a big one sees the character move smoothly across the blend, rather than jump halfway through.

Go deeperMoving the character from gameplay
PushShift(Source, AmountPercent, BlendTime, Mode, SlackPercent)
ClearShift(Source, BlendTime)
SetGameplayDriver(Name, Value)

PushShift works like a claim: push again from the same source to change it, clear it to blend it out. It adds to the Rig's own shifts and obeys the same Shift Limit. Use it for a takedown that wants the pair framed wide for a moment, a reveal, or a lean, without making a whole Rig for it. The Blendable Camera Shift anim notify does the same for the length of a notify.

SetGameplayDriver feeds a named number to any shift driven by Gameplay, so a Rig can react to health, heat or a charge meter with no code in the camera.

Go deeperThe names in Blueprint and C++

The panel uses plain labels; the property names behind them are shorter.

PanelProperty
Where On ScreenTarget
Free DriftDeadZone
Full Strength AtSoftZone
Catch-Up SpeedRecovery
Max Camera MoveReach
Shift LimitMaxShift
Move ByAmount
Starts At / Full AtDriverStart / DriverFull
TakesBlendTime
Max SpeedMaxSpeed
Go deeperComing from 1.0: what replaced what

Everything that used to move the shot sideways is now a shift. Rigs that used these were converted the first time they loaded:

Before 1.1Now
Shoulder OffsetWhere On Screen. The auto-shoulder probe keeps its reach in Auto Shoulder Probe Reach
Look Aheada Speed shift, leading along the direction of travel
Mirror Framing Subjecta Framing Subject shift; the mirror limit became Shift Limit
Pitch Room Frame Shifta Ceiling Room shift
Gap centring's own benda Gap Room shift
The arm offset notify, in cma shift in percent

Screen Target, Correction Rate and Max Slide kept their values and became Where On Screen, Catch-Up Speed and Max Camera Move. The old 0 to 1 fractions became percent on load, so a Rig saved on 1.0 opens with the framing it had.