POV-Ray : Newsgroups : povray.binaries.images : Re: Height Field from map Comparison Server Time
15 Nov 2024 00:20:18 EST (-0500)
  Re: Height Field from map Comparison (Message 1 to 6 of 6)  
From: Mike Williams
Subject: Re: Height Field from map Comparison
Date: 10 Sep 2003 13:26:23
Message: <3f5f5ebf@news.povray.org>
Shay wrote:

> If anyone else has a technique which might help, I would like to see
>your results as well. The point is to make a large height field from
>this small image map, so enlarging and smoothing the map is not allowed.

Just for fun, here are some images generated by using the source image as an
isosurface pigment function. The texture, lighting and camera are exactly
the same as your original full_resolution_hf image, so they are directly
comparable.

The "Interp4.jpg" image simply uses image_map interpolation 4.
(Interpolation 2 and no interpolation gives results which are almost
identical to smoothed and unsmoothed height_fields respectively).

#declare F=function{pigment{
  image_map { jpeg "hf_map.jpg" interpolate 4}
  }
}
#declare my_heightfield =
    isosurface {
        function { y-F(x,z,0).red }
        max_gradient 5.5
        contained_by{box{0,1}}
        open
}
object {
  my_heightfield
  pigment {rgb 1}
  translate <-.5, -.5, -.5>
  rotate y*135
}
background { rgb <1,1,1> }
camera { location <0.1,1,-1> look_at <0,0,-.08> }
light_source { <-40,180,2.5> color rgb 1 }

The "Interp2smooth.jpg" and "Interp4smooth.jpg" perform a smoothing
operation in the isosurface function as well as image_map interpolation 2
and 4 respectively. But that might be a bit of a cheat because it's
mathematically very similar to performing a Blur operation on the source
image before processing (except that the result has full floating point
precision instead of 256 bits)


Post a reply to this message


Attachments:
Download 'Interp2Smooth.jpg' (42 KB) Download 'Interp4.jpg' (64 KB) Download 'Interp4Smooth.jpg' (60 KB)

Preview of image 'Interp2Smooth.jpg'
Interp2Smooth.jpg

Preview of image 'Interp4.jpg'
Interp4.jpg

Preview of image 'Interp4Smooth.jpg'
Interp4Smooth.jpg


 

From: Shay
Subject: Re: Height Field from map Comparison
Date: 10 Sep 2003 13:36:24
Message: <3f5f6118$1@news.povray.org>
"Mike Williams" <mik### [at] econymdemoncouk> wrote in message
news:3f5f5ebf@news.povray.org...

Not bad, but Hogo's mesh is smoother. Even with the blurring, the
isosurface is not able to "fudge" the bad spots as well as a mesh it
seems. The iso is simply too accurate. I should get a chance to render
mine here in a bit.

What where your render times?

 -Shay


Post a reply to this message

From: Mike Williams
Subject: Re: Height Field from map Comparison
Date: 10 Sep 2003 20:03:18
Message: <R9VYBDA0t7X$EwtJ@econym.demon.co.uk>
Wasn't it Shay who wrote:
>
>"Mike Williams" <mik### [at] econymdemoncouk> wrote in message
>news:3f5f5ebf@news.povray.org...
>
>Not bad, but Hogo's mesh is smoother. Even with the blurring, the
>isosurface is not able to "fudge" the bad spots as well as a mesh it
>seems. The iso is simply too accurate. I should get a chance to render
>mine here in a bit.
>
>What where your render times?

Very slow. The ones I posted here took 4 minutes 44 seconds each,
compared with 10 seconds for a height field. However, POV suggests a
considerably higher max_gradient than I used, but if I use the higher
max_gradient it suggests one that's considerably higher than that. At
the edges of the source image pixels the gradient is theoretically
infinite. The speed is very dependent on the value of max_gradient
chosen.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Lutz-Peter Hooge
Subject: Re: Height Field from map Comparison - hf_bicubic_05.jpg [1/1]
Date: 13 Sep 2003 14:20:29
Message: <3f635fed$1@news.povray.org>
Mike Williams <mik### [at] econymdemoncouk> wrote:

> Just for fun, here are some images generated by using the source image as an
> isosurface pigment function.

Here are 3 isos with bicubic interpolation.
They use different coefficients for the interpolation:

image_map
{
  png "hf_map.png" 
  interpolate 3
  #local s=2;
  #local A=.5; // other two images: A=.7 / A = 1.0 (default)
  matrix <(-1-s*A+s)/s, (-s+3*s*A-1)/s, (1-3*s*A+s)/s, (-s+1+s*A)/s,
        -1/2/s*(-4-3*s*A+3*s), -1/2/s*(-3*s+9*s*A-2), -1/2/s*(-9*s*A+4+3*s),
-1/2/s*(-3*s+2+3*s*A),
        -1/s, 0, 1/s, 0,
        1/2-1/2*A, A, 1/2-1/2*A, 0>
}

This code needs my bicubic interpolation patch to work.

Lutz-Peter


Post a reply to this message


Attachments:
Download 'hf_bicubic_05.jpg' (20 KB)

Preview of image 'hf_bicubic_05.jpg'
hf_bicubic_05.jpg


 

From: Lutz-Peter Hooge
Subject: Re: Height Field from map Comparison - hf_bicubic_07.jpg [1/1]
Date: 13 Sep 2003 14:20:30
Message: <3f635fee$1@news.povray.org>


Post a reply to this message


Attachments:
Download 'hf_bicubic_05.jpg' (0 KB) Download 'hf_bicubic_07.jpg' (22 KB)

Preview of image 'hf_bicubic_07.jpg'
hf_bicubic_07.jpg


 

From: Lutz-Peter Hooge
Subject: Re: Height Field from map Comparison - hf_bicubic_10.jpg [1/1]
Date: 13 Sep 2003 14:20:31
Message: <3f635fef@news.povray.org>


Post a reply to this message


Attachments:
Download 'hf_bicubic_07.jpg' (0 KB) Download 'hf_bicubic_10.jpg' (28 KB)

Preview of image 'hf_bicubic_10.jpg'
hf_bicubic_10.jpg


 

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