[Closed] Camera zoom extents… again
I need to render out 2 types of images for a huge amount of models but I’m struggling to get the right results… I’d appreciate any advice from anyone
See above link – the first type of image I’d like to create is a tightly cropped image of the object(s) where the image has a user specified “longest side”, e.g. 512 by whatever the ratio ends up being for that object.
I’ve been going through some sample code that DenisT posted ( http://forums.cgsociety.org/showthread.php?t=977505 ) that shows how you can get view bounding box for selected objects but I can’t figure out how to use these screen coordinates to do a “blowup” render. Any ideas?
The second type of image – again I’d like the user to be able to specify output size (width and height) and render the image with a consistent amount of padding, so it’s nicely framed.
I’ll also need to allow the users to choose “front”, “left”, “3/4 perspective” angles to render from, so I went down the route of creating, positioning and configuring a camera instead of just manipulating the viewport.
I’d like to create these renders without post processing or hacks – I’ve considered rendering larger and then cropping down to the size of alpha, or rendering twice (once with #cropselected to find output ratio, then rendering again to the user specified width but new height taking into account the previous output ratio…)
I’ve been going round in circles and I wonder if I’ve missed something obvious because this seems harder than it should be. How would you approach this problem?