Attaching object to camera frustrum

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 04 April 2013   #1
Attaching object to camera frustrum

Hello

I'm trying to attach a plane to the camera frustrum, but I don't see any option in Xpresso to extract the furstrum X and Y positions...
Is there any way to do this?

Thanks
Alex
 
Old 04 April 2013   #2
There was a script from "tcastudio" in the past (2011) called "camPLANEv2 R13",
which done this nicely. But is was Phyton based!
 
Old 04 April 2013   #3
hi,

without having looked into tcastudios example the camera frustrum is a rather vague term
for me. what confuses me most is that you are referring to 2d coordinates, while both the
camera frustrum and the camera itself are actually 3d objects.

cameras are aligned along their z-axis. so if you want to place an object in the local camera
matrix and offset it along the z-axis by the focus distance f for example you have just to
multiply the camera matrix with the vector(0,0,f).

edit:

an quick example, i also added some nodes to scale fit the plane into the cameras fov.

http://i.imgur.com/6WkgfX4.gif

Last edited by littledevil : 04 April 2013 at 02:46 PM.
 
Old 04 April 2013   #4
Hi,

here is my xpresso version of an image plane rig.
You can move the plane in z and the size fits accordingly.
To get the render size/ratio linked to the plane I grabbed a piece of coffee code from the german c4d forum (can`t remember where I got it from).

Markus
Attached Files
File Type: zip ImagePlane_to_Camera.c4d.zip (66.8 KB, 17 views)
 
Old 04 April 2013   #5
Both are nice and useful examples !

If I follow littledevils XP --> I get a different result with the same formula ?!

What´s wrong ?
Attached Images
File Type: jpg Bildschirmfoto 2013-04-29 um 17.34.58.jpg (63.0 KB, 19 views)
 
Old 04 April 2013   #6
lol,

a little bigger image would have helped but i think you typed 0,5 instead of 0.5.
 
Old 04 April 2013   #7
Thanks for the hint!
I typed in a comma (0,5) instead of a point (0.5).

What kind of impact !
 
Old 04 April 2013   #8
Thread automatically closed

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.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 05:13 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.