applyVerticalCorrection issue resulting in sliced model

Hi there,

I’m working on an architectural project, and it’s going great.
However I have an issue with the camera it seems.

To be able to match the renders we made in 3ds max I have to apply vertical correction

scene.activeCamera.applyVerticalCorrection()

The model comes out like this in the viewport.

This is without the camera modifier applied.

Is there something I’m overlooking?
This is why we need the camera correction, to be able to match the renders we made.
It’s matching our renders (almost) perfectly

Thanks!
Pieter

Anyone an idea about this?
Is there a way to ease out this VerticalCorrection? If I transition to an aerial position the VerticalCorrection is unwanted, and causes this clipping issue.

Please let me know if there’s anything that can be done about this.
Also a bit more control over this kind of tilt/shift would be great.
The tilt you guys implemented a while back is actually a bit more complex than shift.
For our renders we’re using mainly the shift (vertical & horizontal) which just shifts the viewport in “view-space” vertical:top-bottom or horizontal:left-right.
This would be awesome if that’s possible

This is/was the topic about the requested feature for controlling the vertical shift (/tilt).

Thanks!
Pieter

Also… To illustrate a bit this vertical shift/tilt I made the following screenshots:

Initial camera with camera and target on same height.
This often causes the issue that we see too much ground and not enough sky/building/… to correct this you would look up…

Just looking up will look like this:
As you can see this causes the vertical lines to converge, it’s natural but not always what you want in your composition, therefore there are (in reality as well) vertical tilt and shift (not sure this exists in reality, but tilt lenses do) lenses.

Using such a vertical tilt lens will correct this by tilting the projection plane of the camera lens (if I fully understand it, more in detail on this here)
You can control this vertical tilt with a value, but usually it’s just wanted to get those vertical lines straight again, this can easily be done by using the “auto vertical tilt correction” (or the camera.applyVerticalCorrection() in BJS).
This will skew your view a little bit, but when not exaggerated it’s not a problem.

This will result in this view:


In 3ds Max:
image

When unchecking the “auto vertical tilt correction” you get to see the number with which the image is tilted. And this number is controllable. That would also be a necessary option in BJS, so that when we animate a camera transition we can let this number transition to match from the first camera to the next
image

At the moment I did this in the following way:

            const updateTilt = setInterval(() => {
              cam.applyVerticalCorrection()
            }, 5)

An alternative to this however is the vertical shift
Here we would start again with the same view, looking straight forward:

But instead of looking up and correcting with vertical tilt we would be using the vertical shift
What this does is like taking a virtual snapshot of the view but this extends beyond the viewport-boundaries and shifts, or pans this view up-down or left-right, like so:

What’s interesting about this method is that we can also use the horizontal shift, to choose our perspective center-point, but still shift the view a bit left or right if there’s something important that needs to be in view:
Here you can see the center of the perspective (circle) vs the center of the composition/image (cross)

So we would really appreciate to be able to control both the vertical shift (horizontal & vertical) and the vertical tilt (horizontal & vertical). And this with an automatic vertical tilt, but still controllable with a number so we can tween this tilt between camera positions.
Seconday it would be awesome if we could also control the lens shift (horizontal & vertical), just with a number (auto is not needed/possible (?) here).

Thanks a lot!
Pieter

Great,
Already one thing to cross of my whish list: camera.projectionPlaneTilt

This can be used to animate the tilt back to 0 for aerial views where this is not really desired.

Pieter

Hi @Pieter_van_Stee, thanks for the detailed explanation

So from what I understood, in BJS for now we only have vertical tilt correction, and auto vertical tilt correction - and you would need us to add horizontal/vertical shift, that’s correct ?

If I get this right in terms of maths, shifting the projection plane would mean that we offset the sides of the frustum by some % of the width/height of the frustum. It may seem simple on the paper, but we have many assumptions on the frustum (especially the mesh culling pass) that would be broken if we just updated the projection matrix. @sebavan do you think that’s something we can consider implementing ?

Hi Craig,

Indeed, that’s what we would need to be able to match our rendered visuals.
I understand that the technical underlying system might be more complex than the esthetic surface.
But if this would be possible in any way this would be great.

We have been working with threejs in the past. There the V/H shift was possible, so maybe you could hav e a look how they did it? :stuck_out_tongue:

PS, any idea on why the model is being clipped when the vertical tilt is applied?

Thanks so much
Pieter

I guess we could at least support the rendering and disable culling in such which won t harm in many situations as we are mainly CPU bound not really GPU. Do you want to give it a stab ?

Also cc @PolygonalSun

If only I had more time :frowning: … I’ll see if this is an easy fix

1 Like

Thanks @CraigFeldspar

For now we can manage with the tilt correction, but would be awesome to have the Shift as well :wink:

Hey @sebavan would you like me to create an issue for this? :slight_smile:

Let s wait and see if @CraigFeldspar has some time first :slight_smile: