Skip to content

0.1.1+ stills batches freeze Material uniforms, globals.time and keyed rows at the first frame (the plugin clock never advances when catch_up skips the replay) #162

Open

Description

@lizTheDeveloper

Since the #77 fix (0.1.1+), raea render --at A,B freezes everything driven by the plugin clock at the batch's first
frame:
custom <Material> uniform updates, globals.time, and keyed component rows. A batch of stills that starts
past frame 0 renders frame B as a copy of frame A's animation state. Rendering B alone is also stuck: globals.time
reads 0. raea 0.1.0 did these right, as a side effect of catch_up stepping every earlier frame.

Measured (vast.ai RTX 3090, Linux)

Same composition and frames. For each case, --at A,B in one process, compared with --at B in its own process.

scene 0.1.0: batch B vs lone B 0.1.0: A vs B 0.1.4: batch B vs lone B 0.1.4: A vs B
an animated ocean (<Material uniforms={{ P: { t, ... } }}>, A=60, B=200) 41.2 dB 17.3 dB (animates) 17.3 dB 37.8 dB (frozen at A)
paper cranes (<Material> uniforms, 60/200) 99.5 dB (same) 22.3 dB 22.4 dB 103.3 dB (identical to A)
  • A stills batch on 0.1.4 sampled globals.time = 0 at frames 60, 61 and 140.
  • Applying our SDK-only patches changed nothing (same numbers), so this is engine-side.

Cause (reading main)

  • Every engine has a PluginClock. load.rs sets self.replay only when plugins::steps(inserted). For a scene
    with nothing stateful, Engine::catch_up returns at once (self.replay.is_none()), so PluginClock.stepped stays
    at 0.
  • plugins::arm never advances. It steps only when f == stepped + 1. Otherwise it holds with
    TimeUpdateStrategy::ManualDuration(Duration::ZERO). For a still at any frame > 1 that is never true, not even for
    the second frame of a consecutive batch. So Time (hence globals.time) never advances.
  • keyed_rows returns early when PluginClock exists and !advancing. The rows due on the frame never land.

Suggested fix

When catch_up skips the replay (a scene with nothing to carry), jump the clock to the frame being drawn:

  • set stepped = f - 1 so arm steps;
  • make that one update's ManualDuration the jump (f / fps − elapsed), so Time.elapsed = f / fps. That's absolute,
    the same in every batch, as Looks-style shaders assume;
  • let keyed_rows apply everything due through f.

With nothing stateful in the scene, a big dt on that update harms nothing. Scenes that carry state keep the
current full replay.

I can't build raea where I am to validate a patch. Our renders are pinned back to 0.1.0 meanwhile, which costs us the
#77 speedup.

Activity

  1. added a commit that references this issue on Nov 16, 2026
  2. added a commit that references this issue on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions