Jump to content

Procedurally fit camera to bounding box of object


Recommended Posts

It's quite simple.
First zero your camera positions. Then copy position of object you want to frame to camera position. Then move camera a little back along it's local axis (so it doesn't clip the rendered image). It's aligned now.
Then compute size (diameter) of bounding sphere of the object and put that diameter into Ortho Width. So it's zoomed correctly.

I suppose that you have orientation and resolution you want to keep on camera.

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