Notifications
Clear all

[Closed] Move a Camera in its own Z axis?

How do you create a script like the perspective button when looking at a camera viewport?

  Basically the camera moves in its own local axis to compensate for the fov. 

Any tips ?

Thanks,

Guillermo Leal

10 Replies

to compensate fov? Do you mean like Hitchcock’s Vertigo effect 😮 ? Put to cameras fov an expression,


degToRad(2*atan(w/2/length(pos)))

where w is constant (= viewport width at focus), and pos is assigned to Cam’s pos controller

 JHN

You mean like the vertigo effect, the “fov is inverted” to the camera postion…
If so look at this: http://public.subd.nl/cgtalk/VertigoEffect-v2_00.max

Note the file is not mine, it’s from the long not seen Swami*, so I hope nobody minds me posting this file, if so let me know.

I’d say take it apart!

-Johan

 JHN

Posted too late… Same principle in the file I posted.

-Johan

yep, there was a thread about this at discreet forum years ago. Just wondering where swami disappeared …

I used to learn loads from Swami Lama’s scripts in the old days (R3 onwards) – it seemed that it was him and Bobo who were pretty much writing everything MXS on the net then. he used to have a website with scripts on it and a section where he posted cool recipes that he had made!

where are you Swami???

this was his site – knew i remembered seeing it.

http://home.cfl.rr.com/swami3d/

Thanks for the formulas and the sample file,yYES that is exactly what I want.

I’m trying to put that expression into a script, so I cam move the camera in it own z axis and the fov changes just like the expression but I can’t
.

I’m relative new to maxscript. Can anyone explain the expression a bit, please?

Thanks,
Guillermo Leal

I put the file online, here: http://www.deconstudio.net/down/Vertigo_animateCamPosition.zip

In Swami’s example there’s a script controller, while in this there’s expression at cameras FOV

Thanks decon,

I’ve changed a little bit your solution.
Your Expression controller is now at a Multiplier Curve of the FOV controller.
This way you can change the FOV as always, and retaining that value while camera moves.

Page 1 / 2