|  |  | I'm currently trying my hand at spherical heightfields, but I'm running into
strange problems.
I put a height map (DEM) of the moon around a sphere, based on these forum
posts:
https://news.povray.org/povray.binaries.images/thread/%3C38a2dc5b%40news.povray.org%3E
https://news.povray.org/povray.text.scene-files/thread/%3C38A037EB.504C1A6%40inapg.inra.fr%3E/?ttop=444549&toff=750
Everything looks good in the global view, but when I zoom in closer, radial
errors appear at the day-night boundary.
A higher resolution of the DEM does not change anything, and it works fine when
using bump_map.
But the larger the sphere (contained_by), the finer the disturbances?!
Unfortunately, I have no idea what the functions in the script do.
This one in particular puzzles me:
x*x+y*y+z*z + 0.1 - hftext(x,y,z).y * 0.03
Can someone help me with that?
Is there a reasonable tutorial that explains the working of user-defined
functions well?
Or does anyone find the bug in the script that causes the glitches?
doesnt helps me to understand the stuff:
https://www.povray.org/documentation/view/3.6.2/231/
My code used, greatly simplified:
 #declare hftext = function {
  pigment {
   image_map {
    png "moon_dem.png"
    map_type 1
   }
  }
 }
 #local mResult = isosurface {
  function {
   x*x+y*y+z*z + 0.1 -
   hftext(x,y,z).y * 0.03
  }
  contained_by {
   sphere {0,1}
  }
  max_gradient 10
  threshold 0.95
  //threshold 2
  texture {
    pigment {
     color rgb <0.3, 0.3, 0.3>
    }
  }
 }
Thanks,
Martin
Post a reply to this message
 Attachments:
 Download 'ma_po_error_02_without_sf_small.png' (457 KB)
 
 
 Preview of image 'ma_po_error_02_without_sf_small.png'
  
 |  |