Jump to content

Find position from oriented camera


Recommended Posts

hi,

I try to get the Bounding Box left,right,top,bottom  position  from the object front at the camera 

i achieve to get the front and back distance

so the camera is the oriented vector, and i triy to get BBox.x,y from this oriented vector

I am sure it's really easy, but a  newbiee on Houdini 2(week) ... but it'S AMMMAIIZZING !!! :) i Love it

Thank you for your help

Hava a nice day

Best Regards

Daniel

 

 

vector myptCamera = point(1, "P", 0);
float minDist = 9999;
float maxDist = -1;

float minLeft = 0;
float maxRight = 0;

// callcule le point le plus proche et le plus loins de la camera
for(int i = 0 ;i < @numpt; i++ ){ 

vector myPtDest = point(0, "P", i);

float dist = distance(myPtDest, myptCamera);
if (minDist > dist){
    minDist = dist;
}
if (maxDist < dist){
    maxDist = dist;
}
}
@minDist = minDist;
@maxDist = maxDist;

 

 

camera_BBox.hiplc

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...