POV-Ray : Newsgroups : povray.binaries.images : Problem with smooth heightfield Server Time
20 Nov 2024 06:22:15 EST (-0500)
  Problem with smooth heightfield (Message 1 to 10 of 22)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Hugo
Subject: Problem with smooth heightfield
Date: 10 Oct 2001 10:21:32
Message: <3bc4596c@news.povray.org>
Hello,

The attached picture show heightfields created from an isosurface. The
bottom ones are "smooth" but don't exactly look like I would expect, or like
I remember triangles do when they are smoothed correctly.. I tried different
lights.. I tried TGA, PNG and GIF.. I tried POV 3.5, MegaPOV 0.7 and POV
3.1g and two computers.. It's all the same..What do you think?


#version 3.5;

camera { right -1.33*x up 1*y direction 1*z
 location <-3.5,3.2,6>*.6 look_at 0 angle 48 }

light_source { <-25,25,25> color rgb 1 }

height_field { png "heightfield.png"
 water_level .000001 translate -.5
 scale <3,.75,2.75> rotate 90*x
 pigment { rgb 1 }
 finish { ambient 0 diffuse .67 specular .1 }
 no_shadow }


Post a reply to this message


Attachments:
Download 'Problem_Heightfield.JPG' (89 KB)

Preview of image 'Problem_Heightfield.JPG'
Problem_Heightfield.JPG


 

From: Christoph Hormann
Subject: Re: Problem with smooth heightfield
Date: 10 Oct 2001 10:29:21
Message: <3BC45B3A.71BEFC86@gmx.de>
Hugo wrote:
> 
> Hello,
> 
> The attached picture show heightfields created from an isosurface. The
> bottom ones are "smooth" but don't exactly look like I would expect, or like
> I remember triangles do when they are smoothed correctly.. I tried different
> lights.. I tried TGA, PNG and GIF.. I tried POV 3.5, MegaPOV 0.7 and POV
> 3.1g and two computers.. It's all the same..What do you think?
> 

That looks much like the heightfield having only 8 bit resolution.  Using
'hf_gray_16 on' in global_settings should help if you generate the
heightfield with Povray.  But be careful when using png output in Povray
3.5 with this since it does not work correctly right now.

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: Ron Parker
Subject: Re: Problem with smooth heightfield
Date: 10 Oct 2001 10:35:03
Message: <slrn9s8n4o.9oc.ron.parker@fwi.com>
On Wed, 10 Oct 2001 16:29:14 +0200, Christoph Hormann wrote:
>
>
>Hugo wrote:
>> 
>> Hello,
>> 
>> The attached picture show heightfields created from an isosurface. The
>> bottom ones are "smooth" but don't exactly look like I would expect, or like
>> I remember triangles do when they are smoothed correctly.. I tried different
>> lights.. I tried TGA, PNG and GIF.. I tried POV 3.5, MegaPOV 0.7 and POV
>> 3.1g and two computers.. It's all the same..What do you think?
>> 
>
>That looks much like the heightfield having only 8 bit resolution.  Using
>'hf_gray_16 on' in global_settings should help if you generate the
>heightfield with Povray.  But be careful when using png output in Povray
>3.5 with this since it does not work correctly right now.

Actually, the PNG output is fine.  It's the PNG input that's broken.

-- 
#macro R(L P)sphere{L F}cylinder{L P F}#end#macro P(V)merge{R(z+a z)R(-z a-z)R(a
-z-z-z a+z)torus{1F clipped_by{plane{a 0}}}translate V}#end#macro Z(a F T)merge{
P(z+a)P(z-a)R(-z-z-x a)pigment{rgbt 1}hollow interior{media{emission T}}finish{
reflection.1}}#end Z(-x-x.2y)Z(-x-x.4x)camera{location z*-10rotate x*90}


Post a reply to this message

From: Christoph Hormann
Subject: Re: Problem with smooth heightfield
Date: 10 Oct 2001 11:09:37
Message: <3BC464A8.DFAEFBFC@gmx.de>
Ron Parker wrote:
> 
> Actually, the PNG output is fine.  It's the PNG input that's broken.
> 

No, i have always (including last betas) used my 16 bit png's in Povray
heightfields without problems.  

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: Ron Parker
Subject: Re: Problem with smooth heightfield
Date: 10 Oct 2001 11:21:56
Message: <slrn9s8psm.9q8.ron.parker@fwi.com>
On Wed, 10 Oct 2001 17:09:28 +0200, Christoph Hormann wrote:
>
>
>Ron Parker wrote:
>> 
>> Actually, the PNG output is fine.  It's the PNG input that's broken.
>> 
>
>No, i have always (including last betas) used my 16 bit png's in Povray
>heightfields without problems.  

16-bit greyscale PNGs?

-- 
#local R=rgb 99;#local P=R-R;#local F=pigment{gradient x}box{0,1pigment{gradient
y pigment_map{[.5F pigment_map{[.3R][.3F color_map{[.15red 99][.15P]}rotate z*45
translate x]}]#local H=pigment{gradient y color_map{[.5P][.5R]}scale 1/3}[.5F
pigment_map{[.3R][.3H][.7H][.7R]}]}}}camera{location.5-3*z}//only my opinions


Post a reply to this message

From: Christoph Hormann
Subject: Re: Problem with smooth heightfield
Date: 10 Oct 2001 12:20:31
Message: <3BC4754F.51931A2D@gmx.de>
Ron Parker wrote:
> 
> 16-bit greyscale PNGs?
> 

Yes! (should i post one?)

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

From: Ron Parker
Subject: Re: Problem with smooth heightfield
Date: 10 Oct 2001 13:42:05
Message: <slrn9s923f.9sh.ron.parker@fwi.com>
On Wed, 10 Oct 2001 18:20:31 +0200, Christoph Hormann wrote:
>
>
>Ron Parker wrote:
>> 
>> 16-bit greyscale PNGs?
>> 
>
>Yes! (should i post one?)

By all means.  I'd like to see what the difference is, since I haven't
seen any problems with the PNGs POV outputs.

-- 
#macro R(L P)sphere{L F}cylinder{L P F}#end#macro P(V)merge{R(z+a z)R(-z a-z)R(a
-z-z-z a+z)torus{1F clipped_by{plane{a 0}}}translate V}#end#macro Z(a F T)merge{
P(z+a)P(z-a)R(-z-z-x a)pigment{rgbf 1}hollow interior{media{emission 3-T}}}#end 
Z(-x-x.2x)camera{location z*-10rotate x*90normal{bumps.02scale.05}}


Post a reply to this message

From: Christoph Hormann
Subject: Re: Problem with smooth heightfield
Date: 10 Oct 2001 15:11:10
Message: <3BC49D3F.5D87E8EB@gmx.de>
Ron Parker wrote:
> 
> By all means.  I'd like to see what the difference is, since I haven't
> seen any problems with the PNGs POV outputs.
> 

Here are three 128x128 16 bit png's:

hf_pov35_16.png      generated with POV 3.5 beta 6 
hf_pov31_16.png      generated with POV 3.1
hf_xxx_16.png        generated with other program

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message


Attachments:
Download 'hf_pov35_16.png' (25 KB) Download 'hf_pov31_16.png' (25 KB) Download 'hf_xxx_16.png' (29 KB)

Preview of image 'hf_pov35_16.png'
hf_pov35_16.png

Preview of image 'hf_pov31_16.png'
hf_pov31_16.png

Preview of image 'hf_xxx_16.png'
hf_xxx_16.png


 

From: JRG
Subject: Re: Problem with smooth heightfield
Date: 10 Oct 2001 16:20:17
Message: <3bc4ad81@news.povray.org>
"Christoph Hormann" <chr### [at] gmxde> ha scritto nel messaggio
news:3BC49D3F.5D87E8EB@gmx.de...
> Here are three 128x128 16 bit png's:
>
> hf_xxx_16.png        generated with other program

Uh? Something like Ategeros? ;)
Remember that there are people who are waiting for that.

--
Jonathan.


Post a reply to this message

From: Hugo
Subject: Re: Problem with smooth heightfield
Date: 10 Oct 2001 16:44:01
Message: <3bc4b311@news.povray.org>
Hi,

Thanks for the suggestion. I figured out myself that the 8 bit resolution
was the problem. However, wouldn't it be possible to make an "interpolate"
feature that make them appear as smooth as 16 bit?  For the user, it would
be easier to stick with 8 bit bitmaps because many paintprograms don't
support 16 bit greys.. I don't have one, that do.

I could also try another approch to store heightfields. To use the "trace"
command and make a grid of triangles myself.. I could get away with much
fewer triangles, if I am lucky to implement a triangle decimation algoritm.
This has proved hard in the past.

I tried to output a PNG 16 bit, and put "hf_gray_16" in global settings.. I
used POV 3.5 beta 5 and the result looks cool, as you can see.. I tried to
render the heightfield both in MegaPOV and POV 3.5 beta5, with same result.

Regards,
Hugo


Post a reply to this message


Attachments:
Download 'Problem_Heightfield2.JPG' (53 KB)

Preview of image 'Problem_Heightfield2.JPG'
Problem_Heightfield2.JPG


 

Goto Latest 10 Messages Next 10 Messages >>>

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