|
|
> I can get fairly close with an orthographic projection but then I have
> to shear the image externally to make the nearside of the map horizontal.
Orthographic is the way to go, but to get the effect you're looking for,
you'll have to shear the *camera*.
Start with a camera looking straight at the X-Y axes (I'm assuming
left-handed coordinates here so the Z axis is pointing away):
camera {
orthographic
location -z
right x*mapwidth/2
up y*mapheight/2
look_at 0
With this camera, the Z axis will be pointing straight away from the camera.
To make it point kind of diagonally, we can use a simple matrix
transformation:
matrix <
1,0,0,
0,1,0,
-xamnt,-yamnt,1,
0,0,0
>
}
where xamnt and yamnt are the amounts that the z axis points in the x and y
directions. To match up with your picture, try xamnt = .3 and yamnt = .8.
- Slime
[ http://www.slimeland.com/ ]
Post a reply to this message
|
|
|
|
Slime wrote:
> Orthographic is the way to go, but to get the effect you're looking for,
> you'll have to shear the *camera*.
Thanks that works fine - obvious in hindsight and once you know matrix
transforms are legit on the camera (as long as you don't have vista
buffers - which I don't need but had for some legacy reason).
The end result is a rather odd optical illusion when you use it on a
chequered plane, the squares further away look larger and the right side
of the map looks more sloped.
I'm now playing with the matrix transform on perspective cameras, so
I've now got many options for displaying the map :-)
thanks again
Martin
Post a reply to this message
|
|