Page 1 of 1

VrayPhysicalCamera

Posted: Sat Dec 12, 2009 1:17 pm
by mannybmanago
Greetings,

This is my first post and I hope I get some response. We are using a LWF in our rendering and animation so we always use VrayPhysicalCamera, I haven't seen any tutorial using the VrayPhysicalCamera in the forum or in youtube. I already saw the "Turbo Tutorial - How to use V-Ray Maxwell f-render etc with CDS", but I hope to get extra help. An ordinary camera is fine, but VrayPhysicalCamera has different parameters, like FOV has no equivalent to VrayPhysicalCamera.

Regards,
Manny

Re: VrayPhysicalCamera

Posted: Mon Dec 14, 2009 2:55 pm
by Carl Buhre
mannybmanago wrote:Greetings,

This is my first post and I hope I get some response. We are using a LWF in our rendering and animation so we always use VrayPhysicalCamera, I haven't seen any tutorial using the VrayPhysicalCamera in the forum or in youtube. I already saw the "Turbo Tutorial - How to use V-Ray Maxwell f-render etc with CDS", but I hope to get extra help. An ordinary camera is fine, but VrayPhysicalCamera has different parameters, like FOV has no equivalent to VrayPhysicalCamera.

Regards,
Manny
Hello Manny and welcome to the forum,

Are you using VRay in 3ds Max, Maya or Softimage? And which one of our Camera Tools are you trying to combine with the VRay camera? All of our tools? Because for the tools that add movement all you need to do is create a VRay camera, align it with our camera and link the two (parent it). But for FOV effects and such it's a little bit more tricky. Normally you would have to use the Connection Editor or Wire Parameters to link up the FOV value with the equivalent in VRay but I'm not that familiar with VRay so I'll have to try it out and see if I can find a solution.

I'll post more later.

Re: VrayPhysicalCamera

Posted: Mon Dec 14, 2009 4:51 pm
by Carl Buhre
I tried VRay for 3ds Max 2009 and to me it seemed pretty straight forward for the focus effect. Target Distance to Target Distance.
FOV was trickier since it uses degrees so you have to use some math to convert the value when it's transferred.

Re: VrayPhysicalCamera

Posted: Tue Dec 15, 2009 1:13 pm
by mannybmanago
We are using 3D Studio Max Design 2009/2010 and Vray as rendering engine. I tried but still failed connecting wires between Craft Cameras and VrayPhysicalCamera. Can you make a video demo in youtube, please. I think the "Craft Spline Speed-Controller - Part 1 - Turbo Tutorial" is a good example using vray physical camera.

Many newbies with craft animation like me would appreciate it and all the Vray users as well.

Thanks,
Manny

Re: VrayPhysicalCamera

Posted: Wed Dec 16, 2009 5:44 pm
by Luigi Tramontana
Hi there Manny.

First I will cover Max, then Maya.

This is more tricky than is explained in the video, true true. As you mention, the reason being that Vray does not have an equivalent of FOV. It is very unfortunate that Max does not allow for the focal length to be wired and therefore it is a bit more difficult, but not horribly difficult ;)
In maya it is a little simpler (see below).

MAX:
Ok, so here is the solution you seek:

In the wire parameter dialog you get the Craft camera to push the FOV into the V-Ray camera, but you wire the FOV to "focal length" instead. Now here comes the "tricky" part. You must write the focal length as a function of the FOV. This is the function per se.
[focal length] = [film gate]/(2*tan(0.5*FOV))
[Film gate] is a constant which you find in the V-ray camera dialog (it is the dimension of the "actual" film, which most often is 36mm).
Now, if [film gate] is 36, you would think you are to write the following on the V-ray focal length side:
36/(2*tan(0.5*FOV))
However, Max is doing some funky conversions behind the scenes. You see, in max tan() wants DEGREES???, but FOV is c o n v e r t e d to radians for some inexplicable reason, so this is the formula you need, hehe.
36.0/(2.0*tan(0.5*FOV*180.0/3.1415))
Just copy it and paste it into the "focal length" expression field on the v-ray camera side in the "wire parameters" dialog.

Hope this solves your problem.


MAYA:
In maya you need to use expressions.
So:
1. Select the camera shape of the craft camera from which you wish to copy to the vray camera
2. open the attribute editor and right-click on the focal length.
3. select Create New Expression...
4. Copy the text in "Selected object and attribute" ([cameraname].focalLength)
5. Select the vray camera shape.
6. in the attribute editor you right-click on the "Focal Length" parameter in "Extra VRay Attributes"
7. select Create New Expression...
8. in the expression field you now paste the text you copied and put an equals sign on the very left side of the pasted text.
9. Then copy the text in "Selected object and attribute" ([VRayCameraname].vrayCameraPhysicalFocalLength)
Now it should say [VRayCameraname].vrayCameraPhysicalFocalLength = [cameraname].focalLength
10. Click on "Create". Now the VRay camera's focal length should change to the exact same value you have as focal length in the Craft Camera.


Good luck.
// Luigi Tramontana

Re: VrayPhysicalCamera

Posted: Wed Dec 16, 2009 9:46 pm
by mannybmanago
Oh my...that's so tricky for me, I don't even know how the formula was derived...it's a good thing you are there guys! You have just made our life easier...A MILLION THANKS TO YOU...I will have to try this ASAP.

Vray fans, applause!!!

Regards,
Manny

Re: VrayPhysicalCamera

Posted: Thu Dec 17, 2009 2:15 pm
by Carl Buhre
I've updated our help documentation with this. You can find the guide here:

http://docs.craftanimations.com/index.c ... ripts.html (click on VRay or "Combining Craft Cameras with VRayPhysicalCamera")

or you can go to the guide directly (without the side menu) using this link:
http://docs.craftanimations.com/scripts ... vrayOption

Re: VrayPhysicalCamera

Posted: Wed Dec 23, 2009 10:02 pm
by mannybmanago
Hello again,

I tried and it works fine and thanks again. Would it be great if this will be in a script? Say I have to set up many cameras and of different types, then I have to do this all the time for each CDS camera to VrayPhysicalCamera. And in case I a change the VrayPhysicalCamera film gate, another I could run another script just to update the formula. I think this would be easy on you guys.

Thanks again for the support and Happy Holidays to all!!!

Regards,
Manny

Re: VrayPhysicalCamera

Posted: Tue Jan 05, 2010 10:54 pm
by mannybmanago
Still no news with the Script?

Re: VrayPhysicalCamera

Posted: Thu Jan 07, 2010 9:57 am
by Carl Buhre
mannybmanago wrote:Still no news with the Script?
You can probably use the Macro Recorder to record the script yourself. Just enable the Macro Recorder and do what you want to do and the commands will be listed in the Macro Listener.