Hi there, as we’re working on another project involving this vertical tilt I would like to ask for your help again.
Via this link you can view the current state of the project
For this project we are working for a client where we want to present a new construction project. The model is presented in a babylonjs scene, where we have an animation throughout controlled through swipe/scroll. When you near a chapter point the viewer will get snapped to the nearest chapter point.
On most of the chapter points, there is an overlay image. As this is one of our selling points this is very important to get right.
However at this point using the scene.activeCamera.applyVerticalCorrection()
gives a few issues which I would love to get resolved, as we will use this feature a lot in the future.
clipping issue
First we have the clipping issue. So when applying the applyVerticalCorrection()* this will introduce a sliced view, where the top of the scene will be removed from view. Don’t know why, or at which value this will be cut off.
This effect can be deminished by setting the minZ of the camera to a higher value. Changing this in my case to for example 1.5 or higher will resolve the issue of clipping the top of the scene, but this will clip everything near to the camera when you’re moving close to certain objects.
This is also not desired, and I’d love to see this resolved.
Overlay mismatch
A second issue we are having a different 3D view from the same camera from which the render was made. As you can see the both don’t match nicely. There appears to be a vertical mismatch between the image and the 3D model.
Please let me know if you need additional information about this issue.
*VerticalCorrection()
In architecture is’t often desired and important to have a nice composition for your image.
Therefore photographers & architects often make use straigt/parallel verticals without the vantage point above (or below). When looking straight on it’s no issue as this is naturally the outcome, however usually we want to show a bit more sky, or the top of the building. This will introduce a vantage point high up in the sky, and will lead to converging vertical lines
An example below:
(instructables)
We’d like to get the middle sketch.
This can be achieved in 2 ways: vertical shift & vertical tilt.
Vertical Tilt will look up, and tilt the “render” back so that it looks straight.
Vertical Shift will look straight forward, and pretends the “render” is bigger than the viewport, to slide/“shift” the “render” into place
Both will deliver a similar result, however they can be slightly different, as (I presume) they are calculated in a different way.
In the past we have been working in ThreeJS, there we had the option to work with vertical shift, which worked 1:1 with our CAD software (3dsMax). This allowed to deliver us an exact overlay image, without clipping.
Please let me know if anyone can help me to resolve the overlay & clipping issues here.
Also let me know if you need any additional information to be able to debug this.
Thanks in advance
Pieter