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.



Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now