Repository navigation
Description
On main 5b2c773, a video draws a StandardMaterial's emissive in the colour it had on the part's first frame, scaled by each frame's strength. That means:
- an emissive that is black on its first frame stays black for the whole video;
- a change of hue is ignored;
- a change of strength alone is applied.
--frame N stills draw it right, so a composition can look correct in every still and still be wrong in the export. This hits <Mesh3d> and <Instances> alike. base_color changes are fine, because they're keyed once a part is recoloured. #85 is a different problem: it's about <Instances> placements.
Repro
import { AbsoluteFill, Composition, registerRoot, useCurrentFrame } from "raea";
import { Sphere } from "raea/3d";
import { LinearRgba } from "raea/color";
import { StandardMaterial } from "raea/pbr";
import { Mesh3d } from "raea/mesh";
import { AmbientLight } from "raea/light";
import { Transform } from "raea/transform";
import { Camera3d } from "raea/camera";
function G() {
const f = useCurrentFrame();
const e = LinearRgba.rgb(0.2, 0.6, 1.0).mul(f < 60 ? 0 : 6); // dark, then glowing from frame 60
return (
<AbsoluteFill style={{ background: "#000" }}>
<Camera3d transform={Transform.fromXyz(0, 0, 8).lookingAt([0, 0, 0])} />
<AmbientLight brightness={40} />
<Mesh3d name="ball" transform={Transform.fromXyz(0, 0, 0)}>
<Sphere radius={1} />
<StandardMaterial base_color="#000000" emissive={e} />
</Mesh3d>
</AbsoluteFill>
);
}
registerRoot(() => <Composition id="g" component={G} width={640} height={360} fps={60} durationInFrames={120} />);Measured at the centre of the ball, mean RGB of a 40x40 patch (raea render g.tsx -o g.mp4, and --frame 110 for the still):
| emissive over the shot | video at 0.5 s | video at 1.9 s | still, frame 110 |
|---|---|---|---|
| 0, then 6 from frame 60 (above) | — | 6 (black) | bright blue |
| 1, then 6 from frame 60 | 117,169,203 | 203,233,247 | 203,233,248 |
| blue×4, then orange×4 from frame 60 | 186,223,242 | 186,223,242 (still blue) | 246,206,155 (orange) |
| 6, constant | — | 227 | — |
The same happens on an <Instances> set: the first repro with three instances beside the mesh shows both black in the video and both lit in the still.
Where it seems to come from
This is my reading, not tested. In runtime/scene/src/live.rs (around line 313) and fast.rs (around line 244), a mesh's per-frame row keys only emissive_k, the strength, and only when the first frame has an emissive. The emissive colour itself is never keyed, the way col_r/g/b are once recoloured is set. Keying the emissive colour the same way, when it differs from the first frame's, would cover all three cases.
Workaround in a composition: mount the glowing part only from the frame it starts to glow, or keep a few fixed-colour copies and mount the current one.
raea main 5b2c773 (source build), macOS on M5 Pro.
Activity
Live 3D: a mesh's emissive colour is sent the frame it changes, with …
shinyobjectz commentedon Nov 12, 2026
Your reading was right, and it's fixed on main in 5d320bc. A video draws its 3D live, and the live path keyed only
emissive_k, and only when the first frame glowed; the colour itself was never sent again. Now the full path sends the emissive colour the frame it differs from what was last sent (none counting as black), with its strength (0 once black), and the fast path hands such a frame to the full one.runtime/live/tests/live_emissive.rssteps a ball from dark to blue to orange to dark and checks what each frame sends, underRAEA_LIVE3D_CHECK. All three of your table's cases come out right with it,<Instances>included. Closing; thanks for the measurements.