PDA

View Full Version : NURBS plane relative dimensions of Image Plane


JellyFire
12-20-2007, 12:58 PM
Hey, I'm a bit stuck trying to do something with camera's...
What I want is for a nurbs plane's boundary to always be the same as the image plane's boundary when looking through the camera...

This is so I can do some funky things with UV space of plane...

I need to script it and it has to be applicable to any camera of any focal length, so I believe a bit of triganometry in some utility nodes might be in order...

So, when looking through the camera, the NURBS plane is the same size in 2D as the image plane, and when the focal length is changed, the plane will scale to stay the same size in 2D...

Thanks for any help.
Christian

deadalvs
12-20-2007, 03:13 PM
hmm...

depending on trigonimic angles, some problems with infinite lengths may occur... hmmm...

but why don't You simply parent a plane to the camera (as a child) and move the cvs based on the camera-z ?

this might simplify the problem a lot... it's "not solved yet", but ...

JellyFire
12-23-2007, 03:47 PM
I got it all sorted...
Trig is the way forward, being able to find out the area of the plane off the camera angle.
BUT, you can't just plug in the camera angle into the plane...
You can however get the equation that maya uses to get it which is based off the horizontal aperture and focal length...

I'll post a simplified version of my mel script that just handles this after NY.
Christian

CGTalk Moderation
12-23-2007, 03:47 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.