I use Unity 3d for quick architectural visualizations. Sometimes the level of detail would allow a high resolution image but I am limitated by the graphic card. Following script saves still images while playing.
if (Input.GetKeyDown(“c”))
{
var name = String.Format(“{0}/{1:smile:04} shot.png”, realFolder, Time.frameCount );
// name is “realFolder/frameCountxxxx shot.png”
Application.CaptureScreenshot (name);
}
Is there a way to save 4, 9 or 16 images that fit together like one big poster? This probably means that I need a function that zooms AND shifts the projection plane of the camera.
Of course, it’s important to get distortion free parts of the original image. After 4, 9 or 16 “moves and captures”, the camera would be back at the original position. . . A tilt-shift camera would be great! Thank you!
I guess, you don’t need the ‘tilt’ lens function, since that is for control the depth of field.
BTW. this is the function for ‘shift’ lens.
private var atan = Mathf().Atan;
private var tan = Mathf().Tan;
private var d2r = Mathf().Deg2Rad;
function view_control(c0:Camera, shearing:Vector2):Matrix4x4
{
var fov:float = c0.fieldOfView*d2r;
var aspect : float = c0.aspect;
var far:float = c0.farClipPlane;
var near:float = c0.nearClipPlane;
BUT with ANTI ALIAS, shaddows shear away from the scene. (E.g. when the image shears up, the shaddows shear down.
With AA, my image flips. I use a function to flip it back;
( http://www.unifycommunity.com/wiki/index.php?title=InvertCamera ).
However this is not “directly” the problem, because:
(a) shaddows do not appear flipped but sheared away
(b) if I turn off the flip back function, same effect. . .