Render outputSize that fit the object
Hi man! :)
How do I set the width and height measurements in rendering (setup) that fit a selected object in the top view?
Situation:
I have an object
I create a freecamera in Top Viewport
Renders the camera
The image (vfb) must correspond to an BoundigBox surrounding object
For the first three steps and dummy box are successful, but the last I do not understand how to do...
Do you have any suggestions?
Ciao
Michele
Comments
Ciao Insanto and thanks for
Ciao Insanto and thanks for the reply:)
So, let me explain better;
I created a script that allows me to create a HightMap starting from any object.
Now, I want to render in Top view the object, and create a Bitmap of HightMap.
The rendering must have the same measures of the object (a BoundingBox surrounding the object)so that it fit the object... very similar to #boxselect type rendering in max 8.
With obj.max-obj.min I have found a way to build the BoundingBox that surrounding the object.
It 'can get the length and height of the BoundingBox and transfer these measurements to create the rendering outputSize?
so you dont know how to zoom
so you dont know how to zoom into it propperly so itll fit the whole screen or you dont know how to translate the worldSpace bb into screenspace?
if you just want the dimensions to use in the render props you can do something like
(local dims = obj.max-obj.min;[dims.x,dims.y])
or do you want the vfb to maintain the current resolution but change it's aspect ratio?
it seems a tad odd to me to change the render res based on an objects dimensions, but that may just be me
Raphael Steves