Reputation: 93
Does anyone know how to create a 360º camera in three.js?
I'm trying to render the entire scene as a 360º panorama like you would with a go pro 360 rig.
I'm trying to recreate a panorama by arranging several screens in a circle and stretch a threejs window across all the screens.
For this I need a very wide window that has a tree.js camera that captures the entire scene in 360º
Is this possible?
Upvotes: 5
Views: 3370
Reputation: 6986
It is definitely possible, as it was already implemented: https://github.com/spite/THREE.CubemapToEquirectangular
That library will just export snapshots as png, but looking at the code it should be possible to integrate the same method it uses into realtime-rendering if you want to...
Upvotes: 3
Reputation: 779
You can't represent a 360-degree view with a conventional view matrix. You need to render to a set of textures (e.g. the six faces of a cube) then combine them into a 360 degree mapping such as equirectangular.
Upvotes: 3