Hello,
I’m trying to generate the images to use in a skybox.
To do that I need to position the camera somewhere in the scene.
Take a picture (that will be the front image).
Rotate the camera 90 degrees to the left… Rotate may be an ambiguous word to use…
I need the camera to face the left side, so that I can get another image from the canvas.
Then right, back, top and the floor image.
Right now I just need help on how to rotate (face the way I want) the camera…
I tried using camera.position.rotateByQuaternionToRef and rotateByQuaternionAroundPointToRef but I think I’m far from it…
Any ideas?
Edit1:
I thinking in using camera.rotation.x, y and z…
But I have no idea how to calculate the right values for a 90 degrees change…
Edit 2:
It seems that it receives a rad value to rotate, so 90 degrees = PI / 2;
(It would be nice to have the information on the property, for some people maybe an obvious thing… but not to me)
Now I can see the light!!!
hi. you can use How to use Reflection Probes - Babylon.js Documentation render one frame in render target texture after build scene and you can use this rendered texture as cubemap for reflections or skybox
Maybe you need use render target texture RenderTargetTexture - Babylon.js Documentation and copy probe cube texture to this render target, dispose probes and use render target texture …
but these are just my assumptions that need to be checked. you need to capture probe in one frame and off reflection probes. maybe you can use simple texture and store your captured cube texture in https://doc.babylonjs.com/api/classes/babylon.texture …