you can move the x and y also in the 3d vector to move it around.
On Thu, Sep 26, 2013 at 6:18 PM, Tim Crowson <[email protected] > wrote: > I'm also going through Andy Moorer's scene that he blogged about > here<http://andy.moonbase.net/archives/1117>. > Seems like this ought to have what I need to figure this out.... Maybe Andy > will chime in here and help understand if I can apply his technique to what > I'm trying to do.... > -Tim > > > On 9/26/2013 5:04 PM, Tim Crowson wrote: > > Thanks Alok! That works and gives me a nice rig for controlling the > distance manually along Z, but I actually need to move the controller > around the frame and have it "snap" to geometry, or at least give me a > vector I can use to test for an intersection. > > On 9/26/2013 4:49 PM, Alok Gandhi wrote: > > 1 create an ice tree on a null(call the rig) > > 2 get scalar to 3d vector node (you will only change z through a slider, > x, y, should be 0)> > 3 get a srt to matrix node > > 4 plug the scalar to 3d into position of srt to matrix> > 5 get a 4x4 matrix node> > 6 connect the srt to matrix out to value of 4x4 matrix> > 7 get data node camera.kine.global> > 8 get a multiply node and connect 4x4 matrix into first port, > camera.kine.global into second(order matters)> > 9 get a set data node> > 10 connect the multiply node's out into value of set data and give it a > name like 'xfo' or something> > > 11. On the controller to snap, create another ice tree. Get data rig.'xfo' > and set data to self.kine.global. > > you are done. Just move the camera and the controller will follow. To move > it on the camera ray path just use the slider created in the step 2. > > Wrote this right of the top of my head, did not try it in ice actually. > But should work. > > Just get the distance between the controller and the camera through an > expression or through ice. I suggest expression because getting vector > lengths is expensive in ice (that is also the reason we have squared > distance node in case it is just a comparison of distances). > > Cheers! > > Alok. > > > On Thu, Sep 26, 2013 at 5:15 PM, Tim Crowson < > [email protected]> wrote: > >> But the distance I want is the distance between the camera and the >> closest point on an arbitrary geometric surface behind the target. Now >> maybe the easiest thing to do would be to snap the target to said surface >> and get that distance. But there again, I need to identify the position in >> space where the ray from the camera intersects that surface. >> >> -Tim >> >> >> On 9/26/2013 4:09 PM, Christian Freisleder wrote: >> >> Hey Tim, >> I would use a expression. >> open the exression editor-->Function-->Distance-->distance to camera >> the result would be something like >> ctr_dist_cam( null. ) >> null. would be the object name you're using to mesure the distance. >> hope that helps >> christian >> >> On 26.09.2013 22 <26.09.2013%2022>:58, Tim Crowson wrote: >> >> I'm trying to set up a camera rig that will let me use an item of some >> kind (null, curve...) to act as a kind of focal point that can be moved >> around the frame. Basically I want to have a control parented to the camera >> which I can move around the frame, and which can be used to create a vector >> between the camera and whatever surface is "behind" that focal control. I'd >> then get the distance between the camera and that point on the surface and >> pass that to my lens shader. >> >> I'm really a noob when it comes to ICE in general, so I'm wondering how >> best to do this. I suck with vectors... >> -- >> >> >> >> *Tim Crowson >> **Lead CG Artist* >> >> *Magnetic Dreams, Inc. >> *2525 Lebanon Pike, Building C. Nashville, TN 37214 >> *Ph* 615.885.6801 | *Fax* 615.889.4768 | www.magneticdreams.com >> [email protected] >> >> *Confidentiality Notice: This email, including attachments, is >> confidential and should not be used by anyone who is not the original >> intended recipient(s). If you have received this e-mail in error please >> inform the sender and delete it from your mailbox or any other storage >> mechanism. Magnetic Dreams, Inc cannot accept liability for any statements >> made which are clearly the sender's own and not expressly made on behalf of >> Magnetic Dreams, Inc or one of its agents.* >> >> >> >> >> -------------------------- >> To unsubscribe: mail [email protected] with subject >> "unsubscribe" and reply to the confirmation email. >> >> >> >> >> -------------------------- >> To unsubscribe: mail [email protected] with subject >> "unsubscribe" and reply to the confirmation email. >> >> >> -- >> >> >> >> >> -------------------------- >> To unsubscribe: mail [email protected] with >> subject "unsubscribe" and reply to the confirmation email. >> > > > > -- > > > -------------------------- > To unsubscribe: mail [email protected] with subject > "unsubscribe" and reply to the confirmation email. > > > -- > > > > *Tim Crowson > **Lead CG Artist* > > *Magnetic Dreams, Inc. > *2525 Lebanon Pike, Building C. Nashville, TN 37214 > *Ph* 615.885.6801 | *Fax* 615.889.4768 | www.magneticdreams.com > [email protected] > > *Confidentiality Notice: This email, including attachments, is > confidential and should not be used by anyone who is not the original > intended recipient(s). If you have received this e-mail in error please > inform the sender and delete it from your mailbox or any other storage > mechanism. Magnetic Dreams, Inc cannot accept liability for any statements > made which are clearly the sender's own and not expressly made on behalf of > Magnetic Dreams, Inc or one of its agents.* > > > > > -------------------------- > To unsubscribe: mail [email protected] with subject > "unsubscribe" and reply to the confirmation email. > > > -- > > > > > -------------------------- > To unsubscribe: mail [email protected] with subject > "unsubscribe" and reply to the confirmation email. > --
-------------------------- To unsubscribe: mail [email protected] with subject "unsubscribe" and reply to the confirmation email.

