|
|
|
|
|
|
| |
| |
|
|
From: Wolfgang Wieser
Subject: 16 bit image map pattern not working with isosurface
Date: 1 May 2003 10:00:11
Message: <3eb1286a@news.povray.org>
|
|
|
| |
| |
|
|
Using the following code...
#declare pigment_foo = function {
pigment {
image_map {
png "gray16.png"
interpolate 2
}
}
}
isosurface {
function {
... prigment_foo(x,y,z).gray ...
}
...
}
...it turns out that the resulting isosurface only uses the
high 8 bit of the image_map although the image map source is
a 16 bit grayscale PNG.
Am I doing something wrong or
is there a way to get native support for 16 bit or
is it unavoidable that I fall back to using two 8-bit PNG-based
pigments (one for MSB one for LSB) ?
Wolfgang
Post a reply to this message
|
|
| |
| |
|
|
From: Christoph Hormann
Subject: Re: 16 bit image map pattern not working with isosurface
Date: 1 May 2003 11:00:05
Message: <3EB13674.FD19BC5D@gmx.de>
|
|
|
| |
| |
|
|
Wolfgang Wieser wrote:
>
> [...]
>
> Am I doing something wrong or
> is there a way to get native support for 16 bit or
> is it unavoidable that I fall back to using two 8-bit PNG-based
> pigments (one for MSB one for LSB) ?
Who said the png reader supports 16 bit grayscale files? :-)
The only format where 16 bit data is currently supported for image maps in
plain POV-Ray 3.5 is ascii PGM.
Christoph
--
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 28 Feb. 2003 _____./\/^>_*_<^\/\.______
Post a reply to this message
|
|
| |
| |
|
|
From: Wolfgang Wieser
Subject: Re: 16 bit image map pattern not working with isosurface
Date: 1 May 2003 12:44:16
Message: <3eb14edf@news.povray.org>
|
|
|
| |
| |
|
|
> Who said the png reader supports 16 bit grayscale files? :-)
>
> The only format where 16 bit data is currently supported for image maps in
> plain POV-Ray 3.5 is ascii PGM.
>
Quoting POVRay-3.5 doc: (povray-3.50c/doc/html/povdoc_187.html)
> PNG format heightfields are usually stored in the form of a grayscale
> image with black corresponding to lower and white to higher parts of the
> height field. Because PNG files can store up to 16 bits in grayscale
> images they will be as smooth as TGA and PPM images.
This is about height fields, so I thought it was just natural that
it would also work for pigments.
Wolfgang
Post a reply to this message
|
|
| |
| |
|
|
From: Thorsten Froehlich
Subject: Re: 16 bit image map pattern not working with isosurface
Date: 1 May 2003 14:18:02
Message: <3eb164da@news.povray.org>
|
|
|
| |
| |
|
|
In article <3eb14edf@news.povray.org> , Wolfgang Wieser <wwi### [at] gmxde>
wrote:
> This is about height fields, so I thought it was just natural that
> it would also work for pigments.
pigments != heightfields
Thorsten
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Wolfgang Wieser wrote:
>Using the following code...
>
>#declare pigment_foo = function {
> pigment {
> image_map {
> png "gray16.png"
> interpolate 2
> }
> }
>}
>
>isosurface {
> function {
> ... prigment_foo(x,y,z).gray ...
> }
> ...
>}
>
>....it turns out that the resulting isosurface only uses the
>high 8 bit of the image_map although the image map source is
>a 16 bit grayscale PNG.
>
>Am I doing something wrong or
>is there a way to get native support for 16 bit or
>is it unavoidable that I fall back to using two 8-bit PNG-based
> pigments (one for MSB one for LSB) ?
>
>Wolfgang
>
Hi,
I busted my head over this one too for a while. I ended up using TGA's of
the 16-bit-for-height_field flavor and extracting the MSB and LSB by
function{pigment_foo(x,y,z).red+pigment_foo(x,y,z).green/256}
which is probably where you are almost at anyway.
By the way, check out http://3dgallery.dhs.org/tutorials/iso_tutor.html if
you haven't already.
--
Abe
============
http://www2.taconic.net/bullfrog/sky
============
Post a reply to this message
|
|
| |
| |
|
|
From: Christoph Hormann
Subject: Re: 16 bit image map pattern not working with isosurface
Date: 2 May 2003 01:33:46
Message: <3EB2033A.9489F377@gmx.de>
|
|
|
| |
| |
|
|
Abe wrote:
>
> [...]
>
> I busted my head over this one too for a while. I ended up using TGA's of
> the 16-bit-for-height_field flavor and extracting the MSB and LSB by
>
> function{pigment_foo(x,y,z).red+pigment_foo(x,y,z).green/256}
>
> which is probably where you are almost at anyway.
Note this is probably an extremely bad idea since it does not work with
interpolation and using not interpolated image maps will result in
infinite gradients in the function.
Christoph
--
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 28 Feb. 2003 _____./\/^>_*_<^\/\.______
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Christoph Hormann wrote:
>
>Abe wrote:
>>
>> [...]
>>
>> I busted my head over this one too for a while. I ended up using TGA's of
>> the 16-bit-for-height_field flavor and extracting the MSB and LSB by
>>
>> function{pigment_foo(x,y,z).red+pigment_foo(x,y,z).green/256}
>>
>> which is probably where you are almost at anyway.
>
>Note this is probably an extremely bad idea since it does not work with
>interpolation and using not interpolated image maps will result in
>infinite gradients in the function.
>
>Christoph
>
>POV-Ray tutorials, include files, Sim-POV,
>HCR-Edit and more: http://www.tu-bs.de/~y0013390/
>Last updated 28 Feb. 2003 _____./\/^>_*_<^\/\.______
>
Ouch! I missed the implications of interpolating before extracting MSB and
LSB. But then I was doing landscapes and the extra wrinkles were not that
apparent. (I would call it "a bad idea" instead of "an extemely bad" one,
since it
sort-of-sometimes-under-certain-circumstances-when-the-moon-is-in-the-righ-phase
works ;))
Is the correct answer then to build a 16 bit function_image from a non
interpolated image_map and interpolate that?
--
Abe
============
http://www2.taconic.net/bullfrog/sky
============
Post a reply to this message
|
|
| |
| |
|
|
From: Warp
Subject: Re: 16 bit image map pattern not working with isosurface
Date: 2 May 2003 12:24:33
Message: <3eb29bc1@news.povray.org>
|
|
|
| |
| |
|
|
Abe <bul### [at] taconicnet> wrote:
> function{pigment_foo(x,y,z).red+pigment_foo(x,y,z).green/256}
Doesn't pigment_foo(x,y,z).hf do exactly this?
--
plane{-x+y,-1pigment{bozo color_map{[0rgb x][1rgb x+y]}turbulence 1}}
sphere{0,2pigment{rgbt 1}interior{media{emission 1density{spherical
density_map{[0rgb 0][.5rgb<1,.5>][1rgb 1]}turbulence.9}}}scale
<1,1,3>hollow}text{ttf"timrom""Warp".1,0translate<-1,-.1,2>}// - Warp -
Post a reply to this message
|
|
| |
| |
|
|
From: Wolfgang Wieser
Subject: Re: 16 bit image map pattern not working with isosurface
Date: 3 May 2003 12:57:17
Message: <3eb3f4ec@news.povray.org>
|
|
|
| |
| |
|
|
>> function{pigment_foo(x,y,z).red+pigment_foo(x,y,z).green/256}
>>
>> which is probably where you are almost at anyway.
>
> Note this is probably an extremely bad idea since it does not work with
> interpolation and using not interpolated image maps will result in
> infinite gradients in the function.
>
Well, I thought that I will run into trouble with bilinear
interpolation. However, I actually didn't see any problems.
I'm interpolating the LSB and the MSB pigment map separately
and it looks great. Not interpolating one of them is a bad idea.
Maybe we could find a mathematical proof for the correctness or
falseness...
Wolfgang
Post a reply to this message
|
|
| |
| |
|
|
From: Wolfgang Wieser
Subject: Re: 16 bit image map pattern not working with isosurface
Date: 3 May 2003 16:31:15
Message: <3eb42713@news.povray.org>
|
|
|
| |
| |
|
|
Christoph Hormann wrote:
> Note this is probably an extremely bad idea since it does not work with
> interpolation and using not interpolated image maps will result in
> infinite gradients in the function.
>
...what would you suggest to work around this problem
(beyond patching POVRay)?
Wolfgang
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |