POV-Ray : Newsgroups : povray.general : Square Landscapes !!, Please Help !! big problems !! : Re: Square Landscapes !!, Please Help !! big problems !! Server Time
13 Aug 2024 21:28:01 EDT (-0400)
  Re: Square Landscapes !!, Please Help !! big problems !!  
From: Jerry Anning
Date: 2 Jun 1998 13:02:21
Message: <3574301D.26BB6E42@dhol.com>
Oliver Batchelor wrote:
> 
> I am making a graphical RPG game with tiled land and a directly overhead
> camera and need some help.
> 
> I created a highfield and scaled it by 30, 1, 30 translated it by -15,
> 0, -15 to put it back in the middle of the whole thing, put the camera
> directly overhead at 0, 40, 0, changed the renderer to render at 100 by
> 100 resolution. And I had 3 problems.
> 
> 1) Firstly the Land didnt come  out square at all  it came out as a
> rectangle, being higher than it was wide.!!!
> 
> 2)I don't know where to  put the camera to get all of the highfeild
> exacly fitting into the rendered screen. (The Resulting tga had parts of
> black around the sides or It didnt contain the very edges of the
> highfeild)
> This is essential because the pattern I use to get the file going into
> the highfeild is a tiled pattern and the result needs also to be tilable
> to be able to put the images next to each other with no clear meeting of
> the 2 tiles.

These two questions are related.  First, to get a square aspect ratio,
use a right vector of <1,0,0> instead of the default <4/3,0,0>.  Second,
in principle you should place the camera at <0,-30,0>.  In practice this
doesn't quite work.  Experiments suggest that your best plan is to use
camera settings as follows:

camera { up <0,1,0> right <1,0,0> location <0,30.4,0> look_at <0,0,0> }

and translate your object (not your camera) by <-.1,0,-.1> because of a
slight offset problem POV seems to have.  You could get an exact size
with the orthographic camera, but you would lose your height
information.  Also, you may run in to gpf problems looking directly
along an axis. if so, change the x coordinate of the camera location to,
say .00001 and leave the rest unchanged.  Another gotcha to look out for
is that antialiasing may make your edges inconsistent even when the size
is right, so you may want to turn it off if this happens.

Jerry Anning
cle### [at] dholcom


Post a reply to this message

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