Hello Remotion team! Thanks for your work.
My setup:
I'm working with @remotion/three.
I'm loading a glft model using the code:
import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader";
const gltf = useLoader(GLTFLoader, staticFile("/mockups/models/macbook/scene.gltf"));
then i display the model:
<AbsoluteFill>
<ThreeCanvas
>
<scene>
<primitive
object={gltf.scene}
/>
<ambientLight/>
<pointLight/>
<directionalLight/>
</scene>
</ThreeCanvas>
</AbsoluteFill>
Problem:
At the beginning of every loop, on the Remotion studio, I have small delay, because of loading the 3D scene.
with a console message THREE.WebGLRenderer: Context Lost.
The rendered result has problems too. At the moment when the the model's Sequence start, the whole video is glitched and gets low FPS for a few moments.
Question:
Is there a way to somehow render the 3d model just once after the player component is initiated, and then use it without re-rendering on each loop?
P.S.: thanks for your time 💜