Hey there!
I’m working on the feature with “Side-by-side” view for 3d monitors and I almost done with it but I also need to shrink the camera view. I attached a screenshot of what I need to do exactly. Is it possible to do it in the same way and in the same time fitting it in the browser window?
I’m already using the viewports, but the problem is when I’m trying to stretch the viewport by the y parameter it’s just making my fov smaller. How can I fit it in window?
Hello! Even though this topic is long dead, I was not able to find the solution to this side by side shrinking issue.
In this playground, I render the scene twice from the point of view of each eye.
Now on certain screens, the final 3D image will appear strech horizontally because each view only occupies half the viewport in the initial config.
Compressing horizontally the left and right images would compensate that effect and create the desired result. Is there anyway to do that in Babylon without tampering the projection matrix? The current viewport approach is a bit limited.
Here is a before/after view of what I am trying to achieve drawn on paint ^^
Basically I can attach the eye cameras to a transform and then scale this transform on its local x axis, which will be then applied to the child cameras
That’s quite a dirty hack, I am still looking for a better solution if it exists.
Also I was wondering if the StereoscopicFreeCamera is still actively maintained. If that’s the case I could open a PR to add this stretching feature
@CrashMaster You can also use the Camera.onProjectionMatrixChangedObservable observable to change the projection matrix by calling Matrix.PerspectiveLH and set the width/height of the viewport used by the projection code: