|
|
In article <407efe5f$1@news.povray.org>,
Florian Brucker <tor### [at] torfboldcom> wrote:
> I'd try it the other way round:
>
> Set up a scene with some dummy boxes and adjust the camera in a way that
> it fits your needs. Later replace the dummy boxes by your real objects
> and scale them to fit the dimensions of the old dummies. This can be
> done pretty easy using min_extent and max_extent. And it is really
> easier than calculate new camera parameters.
>
> HTH,
> Florian
>
Well I am doing the follow now.
#declare scaledContainer =
object{
#local objMax = max_extent(container);
#local objMin = min_extent(container);
#local objdim = objMax-objMin;
#if (objDim.x > objDim.y)
#local objScale = 0.75/objDim.x;
#else
#local objScale = 0.75/objDim.y;
#end
container
scale objScale
}
Screen_Object(scaledContainer, <0.5, 0.5>, <0, 0>, true, 1.0)
This seems similar to what you are talking about. This seems to work
pretty good on the models I have tried it on. I thought Screen_Object()
would do everything for me when I found that macro but it doesn't seem
to be able to scale the object to make it fit the screen only move it in
front of the camera, still helpful though. Any suggestions on improving
this or know of something that could break its centering ablity?
Post a reply to this message
|
|