POV-Ray : Newsgroups : povray.binaries.images : The back of the Moon : Re: The back of the Moon Server Time
31 Jul 2024 04:20:29 EDT (-0400)
  Re: The back of the Moon  
From: geep999
Date: 27 Apr 2010 16:15:01
Message: <web.4bd744ecf8049eb1380f8080@news.povray.org>
"Rarius" <rar### [at] rariuscouk> wrote:
> "geep999" <nomail@nomail> wrote in message
> news:web.4bd5f848f8049eb1380f8080@news.povray.org...
> > "Rarius" <rar### [at] rariuscouk> wrote:
> >> I did a similar image of Mars a year or so back, but rather than creat a
> >> mesh, I used the image to create a pigment function and from that an
> >> isosurface. Effectively I created a spherical heightfield. It renders
> >> quite
> >> fast and doesn't use that much memory. It also has the added benefit that
> >> I
> >> can exagerate the relief in code without rebuilding the mesh.
> >>
> >> Rarius
> > That's interesting. I did experiment a bit with heightfields, but couldn't
> > figure out how to wrap it onto a sphere. I'll have to read up about
> > isosurfaces.
> > My original aim was to create a high resolution image and make an
> > animation
> > of an orbit around the moon. But this needs too much memory, I reckon
> > nearly
> > 64Gb. Effectively I split the DEM data of the moon into about 14 strips
> > North to
> > South, rendered each separately and combined the resulting images
> > together. Each
> > strip used about 3.5Gb RAM, so I guess the whole moon would need 14 x 3.5
> > =
> > 49Gb. If using an isosurface will let me get everything into my 4Gb I'd be
> > pleased.
> > Cheers,
> > Peter
>
> Peter,
>
> You are welcome to my source code if it can be any help.
>
> #local pl_radius = 3396;
> #local min_alt = -8.208;
> #local max_alt = 21.249;
> #local alt_fct = max_alt - min_alt;
>
> #local f_relief =
> function
> {
>   pigment
>   {
>     image_map { gif "mars_topo.gif" once interpolate 2}
>     warp { spherical }
>     scale<-1, 1, 1>
>     rotate<90, 0, 0>
>   }
> }
> isosurface
> {
>   function { f_sphere(x,y,z,pl_radius+min_alt) -
> alt_fct*f_relief(x,y,z).gray }
>   contained_by { box { -4000,4000 } }
>   accuracy 0.002
>   max_gradient 2
> }
>
> Rarius

Rarius - thanks.
I will try some experiments. I have yet to get the hang of isosurfaces. If I
create anything interesting I'll come back here with the results.
Might also try with some Earth (ASTER or SRTM) and Mars (MOLA) DEM data too,
like Yadgar was wondering about. I have previously looked at some tiles from
those datasets with Grass.
Cheers,
Peter


Post a reply to this message

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