|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
How does POV distinguish between TGA files in HF_Gray_16 format and normal
TGA files for the definition of height fields?
For HF_Gray_16 files the docs state: height=red*256+green
For 'normal' files the docs state: height = 0.3 * red +
0.59 * green + 0.11 * blue
Both definitions are
The docs do not specify a switch in the definition of the height field
object.
Frans
Post a reply to this message
|
|
| |
| |
|
|
From: Lance Birch
Subject: Re: TGA files containing HF_Gray_16 data, Question 1
Date: 4 Apr 1999 22:39:18
Message: <37081446.0@news.povray.org>
|
|
|
| |
| |
|
|
But isn't it the file format? I thought it flagged the file in the file
header with a different byte for the byte that specifies the color depth...
(don't quote me on that one...)
--
Lance.
---
For the latest 3D Studio MAX plug-ins, images and much more, go to:
The Zone - http://come.to/the.zone
Post a reply to this message
|
|
| |
| |
|
|
From: F VERBAAS
Subject: Re: TGA files containing HF_Gray_16 data, Question 1
Date: 6 Apr 1999 17:21:23
Message: <370a6cc3.0@news.povray.org>
|
|
|
| |
| |
|
|
Lance Birch heeft geschreven in bericht <37081446.0@news.povray.org>...
>But isn't it the file format? I thought it flagged the file in the file
>header with a different byte for the byte that specifies the color depth...
>(don't quote me on that one...)
>
>--
>Lance.
No, it is a consistent 24 bits length flagging: See an example below:
Length of ID Field = 0
Color map type of file = 0
Type of file = 2
Origin of map = 0
Length of map = 0
Map entry size = 24
X Origin = 0
Y Origin = 0
Origin of map = 256
Length of map = 256
Image pixel size = 24
Image Dscription = 0
col row green blue red HF value
1 1 0 0 255
28.0500
2 1 0 255 0
150.450
3 1 255 0 0
76.5000
4 1 0 0 0
0.000000
Frans
Post a reply to this message
|
|
| |
| |
|
|
From: Steven Jones
Subject: Re: TGA files containing HF_Gray_16 data, Question 1
Date: 6 Apr 1999 18:53:34
Message: <370A825B.9A6BF9E0@tsn.cc>
|
|
|
| |
| |
|
|
When Povray is used to GENERATE tga height fields, it uses the formula
.3*Red+.59*Green+.11*Blue and when it saves it divides by 256, rounds
down and saves that as the red part and then saves the remainder of the
division as the green part.
Post a reply to this message
|
|
| |
| |
|
|
From: Lance Birch
Subject: Re: TGA files containing HF_Gray_16 data, Question 1
Date: 6 Apr 1999 19:34:00
Message: <370a8bd8.0@news.povray.org>
|
|
|
| |
| |
|
|
AHHHHHHH........... (looks on in thoughtful gaze)
--
Lance.
---
For the latest 3D Studio MAX plug-ins, images and much more, go to:
The Zone - http://come.to/the.zone
Post a reply to this message
|
|
| |
| |
|
|
From: F VERBAAS
Subject: Re: TGA files containing HF_Gray_16 data, Question 1
Date: 7 Apr 1999 17:08:35
Message: <370bbb43.0@news.povray.org>
|
|
|
| |
| |
|
|
Yes, it does so when HF_Gray_16 is on. But when it READS a height field
definition, how does it know to use either .3*Red+.59*Green+.11*Blue (like
the docs say) or to reconstruct red+green/256, or does it silently always
use the latter, and throw away any information in the blue channel?
I could of course go into reverse engineering, generating fields with
specific patterns and so, or dive into the code. I hoped, however, that
someone would know the answer.
Frans
Steven Jones heeft geschreven in bericht <370A825B.9A6BF9E0@tsn.cc>...
>When Povray is used to GENERATE tga height fields, it uses the formula
>.3*Red+.59*Green+.11*Blue and when it saves it divides by 256, rounds
>down and saves that as the red part and then saves the remainder of the
>division as the green part.
>
Post a reply to this message
|
|
| |
| |
|
|
From: Steven Jones
Subject: Re: TGA files containing HF_Gray_16 data
Date: 7 Apr 1999 18:22:18
Message: <370BCC88.85D17B81@tsn.cc>
|
|
|
| |
| |
|
|
It always uses the latter. Great if you know what you're doing in Paint
Shop Pro you can make a height field with red and green.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
So, when making a height field with a paint program, one will practically
have to concentrate on the red channel only. Fine 'tuning' using the less
sensitive blue channel is not effective.
This makes me now understand why my attempt to model ocean waves using a
height field in POV, using multiple transparant layers with a sine pattern
in the pigment have failed.
I actually was applying a 255 steps height scale, with an annoying extra
ripple on, of which I now know that it was the humble green channel,
repeating wat the big red brother dictated.
I suggest this is made more clear in the docs, that actually describe the
possibility to generate a height field using POV.
Is there anyone who is interested in a small application converting a normal
TGA file with three effective channels into a correct HF_Gray_16 file using
the relation '.3*Red+.59*Green+.11*Blue'?
Frans
Steven Jones heeft geschreven in bericht <370BCC88.85D17B81@tsn.cc>...
>It always uses the latter. Great if you know what you're doing in Paint
>Shop Pro you can make a height field with red and green.
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
F.VERBAAS wrote:
>
> So, when making a height field with a paint program, one will practically
> have to concentrate on the red channel only. Fine 'tuning' using the less
> sensitive blue channel is not effective.
>
> This makes me now understand why my attempt to model ocean waves using a
> height field in POV, using multiple transparant layers with a sine pattern
> in the pigment have failed.
> I actually was applying a 255 steps height scale, with an annoying extra
> ripple on, of which I now know that it was the humble green channel,
> repeating wat the big red brother dictated.
>
> I suggest this is made more clear in the docs, that actually describe the
> possibility to generate a height field using POV.
>
> Is there anyone who is interested in a small application converting a normal
> TGA file with three effective channels into a correct HF_Gray_16 file using
> the relation '.3*Red+.59*Green+.11*Blue'?
I wonder if it would be possible to simply apply the standard greyscale
image you produced as an image map to a plane, render the image to full
screen using the hf_gray_16 settings, and then use the resulting image
as a color correct version. Would the translation work or would it simply
copy the incorrect data into a different format ?
--
Ken Tyler
mailto://tylereng@pacbell.net
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
You would, in effect, convert a 256-color image to HF_16, still containing
only 256 unique values. Correct colors, yes, but still only 256. You might
as well take the standard greyscale image to a paint program and make it the
red channel of a truecolor TGA.
Margus
Ken wrote in message <370FCBC4.8854EE2B@pacbell.net>...
>
>I wonder if it would be possible to simply apply the standard greyscale
>image you produced as an image map to a plane, render the image to full
>screen using the hf_gray_16 settings, and then use the resulting image
>as a color correct version. Would the translation work or would it simply
>copy the incorrect data into a different format ?
>
>
>--
>Ken Tyler
>
>mailto://tylereng@pacbell.net
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |