How to take a 360 dome picture in scene?

I wanna take a picture from somewhere in my scene for photo dome. How to make it?

To take a picture you need to find an app to your phone, get the file and code like it:

I think this thread talks about what you want. Generate equirectangular 360 panorama from babylon.js scene - #16 by sebavan. It looks like there was a PR merged Fixes Bounty #Generate equirectangular 360 panorama from babylon.js scene by lokiiarora · Pull Request #14251 · BabylonJS/Babylon.js · GitHub, but it doesn’t appear to be in the docs. It looks like this is the function you want packages/dev/core/src/Misc/equirectangularCapture.ts

3 Likes

Quick example - https://playground.babylonjs.com/#D4VED9#26

2 Likes

Thanks for the tip!

So it can be achieved by a handy function can be imported from @babylonjs/core:

captureEquirectangularFromScene(scene, { size: 512, filename: 'pic.png' })

That’s nice.

1 Like