POV-Ray : Newsgroups : povray.general : centering an object for the camera : centering an object for the camera Server Time
3 Aug 2024 06:15:31 EDT (-0400)
  centering an object for the camera  
From: Eric Medlin
Date: 14 Apr 2004 14:13:27
Message: <eric.medlin-4FE5FD.14132614042004@news.povray.org>
I would like to be able to have code in my scene.pov file that will 
center objects and move the camera or object so that the model will fill 
most of the scene.  So far I have found this.
object{
   model // defined as a mesh2 object in another file
   Center_Trans(model, x+y+z)
}
This will move the object so that the center of it's bounding box is at 
0,0,0.  For my objects the center of the bounding box works fine for 
centering.  Now how can I move the object and camera closer or farther 
apart in povray so that it will fill up the scene.  Right now I have the 
camera hard coded to allow the largest object to fit in the scene, but 
some of my smaller objects appear to small.  I was thing I might could 
get the bounding box's height and width and use them to determine how 
far apart the camera and object need to be, but so far I have not been 
able to find out how to get it.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.