POV-Ray : Newsgroups : povray.general : Square Landscapes !!, Please Help !! big problems !! Server Time
13 Aug 2024 19:23:06 EDT (-0400)
  Square Landscapes !!, Please Help !! big problems !! (Message 1 to 7 of 7)  
From: Oliver Batchelor
Subject: Square Landscapes !!, Please Help !! big problems !!
Date: 2 Jun 1998 00:31:44
Message: <3573802F.50CD946D@netaccess.co.nz>
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.

3)What type of tga files does Pov produce, and is there any way of
making pov produce 16 bit Uncompressed tga files only ? (I can only load
16 bit uncompressed files not any other type of tga)

Thanks a lot,

--
__________________________________________________
|                      Oliver
Batchelor                                                   |
|          Email :
Bat### [at] netaccessconz                                         |
|Homepage :
http://users.netaccess.co.nz/Batch/                           |
|_________________________________________________|


Post a reply to this message

From: Jon A  Cruz
Subject: Re: Square Landscapes !!, Please Help !! big problems !!
Date: 2 Jun 1998 02:44:17
Message: <35739F40.46BE8625@geocities.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.!!!

Check out your camera up and right vectors. That is usually the way to
change pixel aspect ratio.

> 
> 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.

I'll punt on this one for now.

> 
> 3)What type of tga files does Pov produce, and is there any way of
> making pov produce 16 bit Uncompressed tga files only ? (I can only load
> 16 bit uncompressed files not any other type of tga)
> 

From the docs:
> +FT	Uncompressed Targa-24 format

To change it to something else (You sure you can't handle 24-bit?), you
could get Image Alchemy. Quite a handy tool. I've got a link to it at
http://www.geocities.com/SiliconValley/Network/4453/jon.htm#links (HSI
Alchemy Now)


alchemy -a -16 old\*.tga 


Voila!


Also, from the help file/docs:

> Most of these formats output 24 bits per pixel with 8 bits for each of red, green
and blue data. PNG allows you to optionally specify the output bit depth from 5 to 16
bits for each of the red, green, and blue colors, giving from 15 to 48 bits of color
information per pixel. The default output depth for all formats is 8 bits/color (16
million possible colors), but this may be changed for PNG format files by setting
Bits_Per_Color=n or by specifying +FNn, where n is the desired bit depth.
>


Post a reply to this message

From: Nieminen Mika
Subject: Re: Square Landscapes !!, Please Help !! big problems !!
Date: 2 Jun 1998 11:55:54
Message: <6l17aa$7ka$2@oz.aussie.org>
Oliver Batchelor <bat### [at] netaccessconz> wrote:
: directly overhead at 0, 40, 0

  Bad idea. Something like <0,40,-.00001> is better.

: 1) Firstly the Land didnt come  out square at all  it came out as a
: rectangle, being higher than it was wide.!!!

  Add 'right x' to the camera definition (and please read the documentation
about the 'right' keyword).

-- 
                                                              - Warp. -


Post a reply to this message

From: Jerry Anning
Subject: Re: Square Landscapes !!, Please Help !! big problems !!
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

From: Ronald L  Parker
Subject: Re: Square Landscapes !!, Please Help !! big problems !!
Date: 2 Jun 1998 22:52:25
Message: <3576b86a.361569596@news.povray.org>
On Tue, 02 Jun 1998 16:31:44 +1200, Oliver Batchelor
<bat### [at] netaccessconz> 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.!!!

This is probably because your camera expects to create an image that
is 4/3 as wide as high.  If you change the declaration of your right
vector to have the same length as your up vector, it should work as
you expect.  For more information, see section 7.4.4.5.1 of the
manual.

>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)

Unless you use an orthographic camera or have perfectly flat edges on
your heightfield, there's no way to make this happen.  I suggest the
orthographic camera.  The default perspective camera just won't cut it
for this application, unless you move it really far away and zoom way
in.  See section 7.4.1 for information on different projections,
including orthographic.

>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.

Your light source will have to be very far away to prevent the shadows
from changing abruptly from one tile to the next. 

>3)What type of tga files does Pov produce, and is there any way of
>making pov produce 16 bit Uncompressed tga files only ? (I can only load
>16 bit uncompressed files not any other type of tga)

POV can output compressed or uncompressed Targa-24 files.  The only
format with a variable bit depth is PNG format.  You must have missed
this in section 6.2.2.3.1 of the fine manual.


Post a reply to this message

From: Oliver Batchelor
Subject: Re: Square Landscapes !!, Please Help !! big problems !!
Date: 3 Jun 1998 00:27:29
Message: <3574D0B0.766B8890@netaccess.co.nz>
>   Add 'right x' to the camera definition (and please read the
> documentation
> about the 'right' keyword).
>

When I do this it makes all objects infinatly wide and the right
height.What is wrong ?

> --
>                                                               - Warp.
> -



--
__________________________________________________
|                      Oliver
Batchelor                                                   |
|          Email :
Bat### [at] netaccessconz                                         |
|Homepage :
http://users.netaccess.co.nz/Batch/                           |
|_________________________________________________|


Post a reply to this message

From: Oliver Batchelor
Subject: Re: Square Landscapes !!, Please Help !! big problems !!
Date: 3 Jun 1998 00:29:25
Message: <3574D125.7FA368CD@netaccess.co.nz>
Oliver Batchelor wrote:

> When I do this it makes all objects infinatly wide and the right
> height.What is wrong ?
>

Cancel that I think It is the orthographic keyword I added.Still, what
is wrong ?

> > --
> >                                                               -
> Warp.
> > -
>
> --
> __________________________________________________
> |                      Oliver
> Batchelor                                                   |
> |          Email :
> Bat### [at] netaccessconz                                         |
> |Homepage :
> http://users.netaccess.co.nz/Batch/                           |
> |_________________________________________________|



--
__________________________________________________
|                      Oliver
Batchelor                                                   |
|          Email :
Bat### [at] netaccessconz                                         |
|Homepage :
http://users.netaccess.co.nz/Batch/                           |
|_________________________________________________|


Post a reply to this message

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