POV-Ray : Newsgroups : povray.windows : Height Field Files Server Time
28 Jul 2024 16:30:57 EDT (-0400)
  Height Field Files (Message 1 to 4 of 4)  
From: David Vincent-Jones
Subject: Height Field Files
Date: 26 Apr 1998 12:49:43
Message: <6hvp07$slq$1@oz.aussie.org>
I am generating data for a height field and would like to directly create
the holding file. I will be working with 16 bit data in Win95.
Can somebody steer me to the file layout for a .sys or other format that is
not too complex to create without a paint program.


Post a reply to this message

From: Johannes Hubert
Subject: Re: Height Field Files
Date: 26 Apr 1998 13:25:19
Message: <6hvqnh$sng$1@oz.aussie.org>
David Vincent-Jones wrote in message <6hvp07$slq$1@oz.aussie.org>...
>I am generating data for a height field and would like to directly create
>the holding file. I will be working with 16 bit data in Win95.
>Can somebody steer me to the file layout for a .sys or other format that is
>not too complex to create without a paint program.


This site has lots of file-format descriptions, you should find some for
image-files too:
http://www.wotsit.demon.co.uk

# Johannes


Post a reply to this message

From: PoD
Subject: Re: Height Field Files
Date: 26 Apr 1998 14:25:21
Message: <35437C11.2559@merlin.net.au>
David Vincent-Jones wrote:
> 
> I am generating data for a height field and would like to directly create
> the holding file. I will be working with 16 bit data in Win95.
> Can somebody steer me to the file layout for a .sys or other format that is
> not too complex to create without a paint program.

The simplest format to create is probably TGA, it's supported in every
version of POV-Ray as well.  All you need is an 18 byte header as
follows

2 bytes both zeros
1 byte value 2 (this means uncompressed true colour)
5 bytes all zeros ( colourmap specifier, you won't have one hence all
zeros)
16 bit integer, value 0 (x origin)
16 bit integer, value 0 (y origin)
16 bit integer, width of image in pixels
16 bit integer, height of image in pixels
1 byte value 24 (pixel size)
1 byte value = 32 ( top down image )

then just put your data in using the following format for each pixel
0,low byte,high byte

Hope this helps (hope I got it right as well :) )
PoD.


Post a reply to this message

From: Jon A  Cruz
Subject: Re: Height Field Files
Date: 26 Apr 1998 18:28:48
Message: <3543B520.F2824380@geocities.com>
David Vincent-Jones wrote:
> 
> I am generating data for a height field and would like to directly create
> the holding file. I will be working with 16 bit data in Win95.
> Can somebody steer me to the file layout for a .sys or other format that is
> not too complex to create without a paint program.


Well, a .sys file is usally a executable piece of code.

You might be thinking of the boot image that Win95 uses where they
rename a BMP file to '.sys'.

Anyway, just go for the Targa (TGA) file format. It is very easy to
program (as long as you ignore the tail extensions) and versitile.

Just go to ftp://ftp.truevision.com/pub/TGA.File.Format.Spec/ to find
out the details.


Post a reply to this message

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