Jump to content

Crop camera based on object bounding box


Recommended Posts

Hi all,

I'm trying to find a way to use the bounding box of an object to dynamically drive the cropping parameters of my camera. I'd like to render only the region (and frame range) that an object appears in the frustum, will have to figure out motion blur after. 

I have the world space coords and the bounding box min/max, and I'm struggling to find the best way to translate that to 2D coords. I know toNdc should pass me back the 0,1 coords but I'm not sure how to use it correctly.

Any help or advice on where to start would be much appreciated.

Thanks

 

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...