# Auto Vertical Lens Shift // Viewport

**URL:** <https://forums.chaos.com/t/auto-vertical-lens-shift-viewport/106401>\
**Category:** Requests\
**Created:** [September 5, 2021, 7:25pm UTC](https://forums.chaos.com/t/auto-vertical-lens-shift-viewport/106401 "2021-09-05T19:25:46Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![woytha](https://avatars.discourse-cdn.com/v4/letter/w/a6a055/32.png) [@woytha](https://forums.chaos.com/u/woytha)\
**Post date:** [September 5, 2021, 7:25pm UTC](https://forums.chaos.com/t/auto-vertical-lens-shift-viewport/106401/1 "2021-09-05T19:25:46Z")

</div>

Hello,  
it would be great to see Auto Vertical Lens Shift in viewport, like it is 3DS Max. This is common stuff when visualizing architecture or technical graphs and would be really helpful to see it real time…  
Thanks…

---

<div class="post-metadata">

**Author:** ![gagui](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/gagui/32/33244_2.png) [@gagui](https://forums.chaos.com/u/gagui)\
**Post date:** [January 5, 2022, 8:58am UTC](https://forums.chaos.com/t/auto-vertical-lens-shift-viewport/106401/2 "2022-01-05T08:58:02Z")

</div>

Hello,  
I can see that this option is in the last release of vray for houdini but for some reason it seems to be broken because when I try to adjust nothing happens.  
Could somebody confirm that this?

---

<div class="post-metadata">

**Author:** ![bdancer](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/bdancer/32/52257_2.png) [@bdancer](https://forums.chaos.com/u/bdancer)\
**Post date:** [January 5, 2022, 10:54am UTC](https://forums.chaos.com/t/auto-vertical-lens-shift-viewport/106401/3 "2022-01-05T10:54:40Z")

</div>

\> Could somebody confirm that this?

This request is about viewport preview of this feature.  
There are no plans implementing this.

I’ll check your issue asap.

---

<div class="post-metadata">

**Author:** ![woytha](https://avatars.discourse-cdn.com/v4/letter/w/a6a055/32.png) [@woytha](https://forums.chaos.com/u/woytha)\
**Post date:** [January 5, 2022, 11:14am UTC](https://forums.chaos.com/t/auto-vertical-lens-shift-viewport/106401/4 "2022-01-05T11:14:00Z")

</div>

> [@gagui](#):
>
> Hello,  
> I can see that this option is in the last release of vray for houdini but for some reason it seems to be broken because when I try to adjust nothing happens.  
> Could somebody confirm that this?

It does work if you render the shot. But not in the houdini viewport.

---

<div class="post-metadata">

**Author:** ![bdancer](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/bdancer/32/52257_2.png) [@bdancer](https://forums.chaos.com/u/bdancer)\
**Post date:** [January 5, 2022, 12:20pm UTC](https://forums.chaos.com/t/auto-vertical-lens-shift-viewport/106401/5 "2022-01-05T12:20:41Z")

</div>

\> But not in the houdini viewport.

Yes, there is no plans implementing this.

---

<div class="post-metadata">

**Author:** ![gagui](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/gagui/32/33244_2.png) [@gagui](https://forums.chaos.com/u/gagui)\
**Post date:** [January 5, 2022, 12:22pm UTC](https://forums.chaos.com/t/auto-vertical-lens-shift-viewport/106401/6 "2022-01-05T12:22:01Z")

</div>

Any directions to do it by hand then?

---

<div class="post-metadata">

**Author:** ![gagui](https://dub1.discourse-cdn.com/chaosprd/user_avatar/forums.chaos.com/gagui/32/33244_2.png) [@gagui](https://forums.chaos.com/u/gagui)\
**Post date:** [January 10, 2022, 9:34am UTC](https://forums.chaos.com/t/auto-vertical-lens-shift-viewport/106401/7 "2022-01-10T09:34:09Z")

</div>

Does anybody knows about the algorithm to calculate de lens tilt shift?  
I think having this it should be pretty easy to make a custom camera to preview this effect in the viewport.

I have made some progress making a secondary camera with the inverse rotation in X to make the camera parallel to the ground and shifted the lens in Y. The problem I have with this is calculate the exact amount of lens shift it needs to match the same target of the main camera. By now I shift the lens the same amount of the distance in Y between main camera target and it’s position but it seems not very accurate. Maybe I have to put focal length and apperture in the ecuation…

---

<div class="post-metadata">

**Author:** ![Jon3D](https://avatars.discourse-cdn.com/v4/letter/j/c5a1d2/32.png) [@Jon3D](https://forums.chaos.com/u/Jon3D)\
**Post date:** [February 10, 2022, 8:27am UTC](https://forums.chaos.com/t/auto-vertical-lens-shift-viewport/106401/8 "2022-02-10T08:27:14Z")

</div>

I dont know if its possible to see the effect in the viewport with a secondary camera but we use a expression to calculate the angle of the camera relative to the target and fit this angle into the tilt shift parameter. That gives quite reliable results. Of course only after rendering the frame…
