Hi there, everyone!. I’m trying to implement the following library from React-Three:
I do have my Pathtracer set up like this:
<Canvas>
<Pathtracer
alpha={0}
enabled={isPathTracing}
tiles={opts.Rendering_Tiles}
samples={opts.Rendering_Samples}
bounces={opts.Rendering_Bounces}
// backgroundBlur={opts.Environment_Blur}
resolutionFactor={opts.Rendering_Factor}
>
<Scene3D
isPathTracing={isPathTracing}
setControls={setControls}
/>
</Pathtracer>
</Canvas>
And this is where I set up my camera:
export function CameraManager3D() {
useCameraControls3D()
const { renderer, update, reset } = usePathtracer()
return (
<>
<PerspectiveCamera
makeDefault
position={[0, 2000, 5000]}
near={2}
far={50000}
fov={45}
/>
<CameraControls
makeDefault
smoothTime={0.1}
onChange={reset}
/>
</>
)
}
But this is giving me problems with the meshes on the scene. They all appear on the coordinates (0,0) whenever I’m rendering the scene with the Pathtracer.
Pathtracer disabled:
Pathtracer enabled:
Positions of my meshes are already updated in the scene before even beginning to render the scene in 3D, but it is as if the pathtracer renderer ignored those positions.
Any help is greatly appreciated.