You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PMREMGenerator.fromScene(new RoomEnvironment()) throws inside <R3F>: the whole scene draws nothing and the render reports 0 errors #131
A studio environment made with three's PMREMGenerator (the usual way to get reflections without an HDR file) throws inside <R3F>, and then the whole <R3F> draws nothing. The render still ends with raea render: 0 errors. The only trace is a stack in the log with no message:
Taking the environment out, the same mesh draws. RoundedBoxGeometry and meshPhysicalMaterial with clearcoat both draw fine; only the environment breaks it.
Expected
The environment is used, as <Environment preset> already is: a scene.environment texture from PMREMGenerator.fromScene(new RoomEnvironment()) lights the scene. If raea can't make it, the scene draws without it and a warning says so, as for other things raea leaves out.
A JS error thrown while building an <R3F> scene counts in the render's error total (and raea check), and the log shows the error's message, not only the stack.
Why it matters
This is three's own recipe for soft studio lighting, and it is common in R3F scenes written for the browser. Our 3D character uses it, so in raea it silently disappeared from the video while the render reported no errors. We only noticed by comparing frames.
Repro (raea 0.1.2, three 0.185.0, @react-three/fiber 9.8.2; macOS 26.5 arm64)
Rechecked on 0.1.3: still the same, and it isn't only the environment. Any error thrown inside <R3F> is swallowed: the scene draws nothing, the render exits 0 with 0 errors. The same throw outside <R3F> is refused with exit 1 (REFUSED the composition threw at frame 0: Error: ...), which is what I'd expect for both.
Thanks for rechecking on 0.1.3, and for narrowing it down. You're right that the real bug was the swallowed error, not the environment. Both parts are fixed on main (bb7dc3b) and ship in 0.1.4:
Anything thrown inside <R3F> now counts as the composition's error: while rendering, in an effect, or in a ref. Your <Boom /> repro now ends with REFUSED the composition threw at frame 0: Error: mesh threw and exit 1, the same as a throw outside R3F.
PMREMGenerator no longer breaks the scene. fromEquirectangular of a panorama raea can load lights the scene from that panorama. fromScene(new RoomEnvironment()) isn't supported yet, because it renders on the GPU. Your scene now draws without that environment, and a warning names PMREMGenerator.fromScene and suggests a panorama instead, such as <Environment preset> or an .hdr through fromEquirectangular.
Your repro is in the tests now (sdk/r3f/test/errors.test.tsx).
Fixed in raea 0.1.4 (https://github.com/shinyobjectz/raea/releases/tag/v0.1.4): an error thrown inside <R3F> now fails the render with its message instead of drawing nothing, and three's PMREMGenerator works there. Thanks for the clear report.
Activity
Ragulsundaram commentedon Nov 14, 2026
Rechecked on 0.1.3: still the same, and it isn't only the environment. Any error thrown inside
<R3F>is swallowed: the scene draws nothing, the render exits 0 with0 errors. The same throw outside<R3F>is refused with exit 1 (REFUSED the composition threw at frame 0: Error: ...), which is what I'd expect for both.raea render x.tsx -o x.png --frame 0: all black, exit 0,raea render: 0 errors, 2 warns, 1 note(only exposure warnings). Without<Boom />the red box draws.So point 2 above (an error inside
<R3F>counts as a render error) would cover every case, not just PMREM.Ragulsundaram commentedon Nov 14, 2026
@shinyobjectz please take a look at this
#131: what an R3F scene throws is the composition's error, and three'…
shinyobjectz commentedon Nov 14, 2026
Thanks for rechecking on 0.1.3, and for narrowing it down. You're right that the real bug was the swallowed error, not the environment. Both parts are fixed on main (bb7dc3b) and ship in 0.1.4:
<R3F>now counts as the composition's error: while rendering, in an effect, or in a ref. Your<Boom />repro now ends withREFUSED the composition threw at frame 0: Error: mesh threwand exit 1, the same as a throw outside R3F.PMREMGeneratorno longer breaks the scene.fromEquirectangularof a panorama raea can load lights the scene from that panorama.fromScene(new RoomEnvironment())isn't supported yet, because it renders on the GPU. Your scene now draws without that environment, and a warning namesPMREMGenerator.fromSceneand suggests a panorama instead, such as<Environment preset>or an.hdrthroughfromEquirectangular.Your repro is in the tests now (
sdk/r3f/test/errors.test.tsx).shinyobjectz commentedon Nov 15, 2026
Fixed in raea 0.1.4 (https://github.com/shinyobjectz/raea/releases/tag/v0.1.4): an error thrown inside
<R3F>now fails the render with its message instead of drawing nothing, and three'sPMREMGeneratorworks there. Thanks for the clear report.#165: an <R3F> scene lit by PMREMGenerator.fromScene(new RoomEnvironm…