POV-Ray : Newsgroups : povray.binaries.images : Cratered asteroid - how to improve? Server Time
17 Nov 2024 08:20:17 EST (-0500)
  Cratered asteroid - how to improve? (Message 1 to 5 of 5)  
From: Jörg 'Yadgar' Bleimann
Subject: Cratered asteroid - how to improve?
Date: 22 Jun 2006 21:11:16
Message: <449b3fb4@news.povray.org>
High!

Together with a friend who is re-discovering PoV-Ray after several years 
with Blender, I'm programming a fictitious (but at least halfway 
scientifically accurate) extrasolar planetary system. Currently, I'm 
trying to model asteroid-like small moons; as we want their surfaces to 
be realistic (and keep the memory used low), we turned to isosurfaces 
rather than meshes.

The first image attached shows a moon before applying any craters, it's 
a standard ellipsoid function with added large-scale noise:
f_ellipsoid (x, y, z, 1, 1/(9/20), 1/(14/20))+f_noise3d(x, y, z)/1.7-1

In the second image I added a "craters" function consisting of four 
crackle (form <n, 0, 0>, the x component is varied to get different 
crater densities) functions multiplied together, each representing a 
"layer" of craters of different sizes:

f_ellipsoid (x, y, z, 1, 1/(9/20), 1/(14/20))+f_noise3d(x, y, 
z)/1.7-1-craters(x*2,y*2,z*2)

(the intended radii of the asteroidal moon are 20 by 9 by 14 kilometres)

with "craters" being

#declare craters=
function { crater_layer_1(x, y, z).gray*crater_layer_2(x, y, 
z).gray*crater_layer_3(x,y,z).gray*crater_layer_4(x,y,z).gray*crater_layer_5(x, 
y, z).gray }

Strangely, the subtracted craters function not only added craters, but 
also doubled the overall size of the asteroid...

So I decided to cut the scale factor by half, and as the craters 
appeared to be bottomless dark holes, I made them much shallower by 
setting the darkest part of the crackle color_maps to 0.95 instead of 0 
or 0.5. Finally, I added a fifth layer of many very small craters, so 
that the whole isosurface formula complex is now:

#include "functions.inc"

#declare crater_layer_1=
function
{
   pigment
     {
     crackle
     form <1.5, 0, 0>
     color_map
     {
       [0.05  rgb <0, 0, 0.95>]
       [0.2  rgb <1, 1, 0>]
     }
   }
}

#declare crater_layer_2=function
{
   pigment
   {
     crackle form <1.5, 0, 0>
     color_map
     {
       [0.05 rgb 0.95]
       [0.2  rgb 1]
     }
     translate y*2
   }
}

#declare crater_layer_3=function
{
   pigment
   {
     crackle form <1.2, 0, 0>
     color_map
     {
       [0.05 rgb 0.95]
       [0.2  rgb 1]
     }
     translate <4, 51, 4>
     scale 0.4
   }
}

#declare crater_layer_4=function
{
   pigment
   {
     crackle form <1.8, 0, 0>
     color_map
     {
       [0.05 rgb 0.95]
       [0.2  rgb 1]
     }
     translate <4, 51, 4>
     scale 1.6
   }
}

#declare crater_layer_5=function
{
   pigment
   {
     crackle form <1.45, 0, 0>
     color_map
     {
       [0.05 rgb 0.95]
       [0.2  rgb 1]
     }
     rotate x*20
     scale 0.1
   }
}


#declare craters=
function { crater_layer_1(x, y, z).gray*crater_layer_2(x, y, 
z).gray*crater_layer_3(x,y,z).gray*crater_layer_4(x,y,z).gray*crater_layer_5(x, 
y, z).gray }

isosurface  // Moon #4j; irregularly shaped asteroidal body
{
   function { f_ellipsoid (x, y, z, 1, 1/(9/20), 1/(14/20))+f_noise3d(x, 
y, z)/1.7-1-craters(x*2,y*2,z*2) }
   threshold 1
   contained_by { box { -100, 100 } }
   accuracy 0.0001
   max_gradient 20
   texture
   {
     pigment { color rgb <0.6, 0.6, 0.6> }
     finish { Standard }
   }
   scale 10
   translate Pos_4j
}

But the resulting scene is still pretty far from a real asteroid, I 
think... for comparison, I added an image from the 2000/01 NASA NEAR 
mission to asteroid Eros.

On a real asteroid, you find crater formations in all stages of 
degradation by micro-impact erosion, with younger craters obliterating 
the older ones. And when looked upon close, even young craters don't 
have razor-sharp rims, but are softened.

I doubt whether simply adding small- to medium-scale noise will do the 
trick... is there a way to modify the crackle function itself (which, 
unfortunately, is not documented in the PoV-Ray on-screen manual) to 
produce less sharp-rimmed craters? And how do I get the craters really 
obliterating older ones instead of just adding up to the existing relief?

See you in Khyberspace!

Yadgar

Now playing: Whipping Boy (Elton John)


Post a reply to this message


Attachments:
Download '4j_flight000.png' (25 KB) Download '2006-06-21_michatopia_moon_.jpg' (14 KB) Download '2006-06-22_michatopia_moon_.jpg' (9 KB) Download '20000317.jpg' (93 KB)

Preview of image '4j_flight000.png'
4j_flight000.png

Preview of image '2006-06-21_michatopia_moon_.jpg'
2006-06-21_michatopia_moon_.jpg

Preview of image '2006-06-22_michatopia_moon_.jpg'
2006-06-22_michatopia_moon_.jpg

Preview of image '20000317.jpg'
20000317.jpg


 

From: EagleSun
Subject: Re: Cratered asteroid - how to improve?
Date: 22 Jun 2006 22:45:00
Message: <web.449b54794a84f22cd50a96210@news.povray.org>
=?ISO-8859-1?Q?J=F6rg_=27Yadgar=27_Bleimann?= <yaz### [at] gmxde> wrote:


> But the resulting scene is still pretty far from a real asteroid, I
> think... for comparison, I added an image from the 2000/01 NASA NEAR
> mission to asteroid Eros.
>
> On a real asteroid, you find crater formations in all stages of
> degradation by micro-impact erosion, with younger craters obliterating
> the older ones. And when looked upon close, even young craters don't
> have razor-sharp rims, but are softened.
>
> I doubt whether simply adding small- to medium-scale noise will do the
> trick... is there a way to modify the crackle function itself (which,
> unfortunately, is not documented in the PoV-Ray on-screen manual) to
> produce less sharp-rimmed craters? And how do I get the craters really
> obliterating older ones instead of just adding up to the existing relief?
>
> See you in Khyberspace!
>
> Yadgar
>
> Now playing: Whipping Boy (Elton John)


I suggest you find (or render) height data of craters, then apply the image
as a map to your iso-ellipsoid.

Here's my macro for rendering planets using height data.... Although it
applies to spheres, I think some modifications to it can be applied to
ellipsoids.

#macro LandSurface(_radius, _hirelief, _lorelief, _albedo,
_landmapimagetype, _landmap, _landbumpimagetype, _landbump)
 #local _planetradius=_radius*unitscale;
 #local _planethirelief=_hirelief*unitscale;
 #local _planetlorelief=_lorelief*unitscale;
 #local _planetdelta=_planethirelief-_planetlorelief;
 #local fn_PlanetBump=function{
  pigment{
   image_map{
    map_image(_landbumpimagetype, _landbump)
    map_type 1
    //once
    interpolate 2
   }
  }
 }
 isosurface
 {
  function {
   f_sphere(x, y, z, (_planetradius+_planetlorelief))-(fn_PlanetBump(x, y,
z).red*_planetdelta)
  }
  contained_by {
   sphere{
    0,(_planetradius+_planethirelief)
   }
  }
  accuracy surface_accuracy*unitscale
  evaluate 0.6 5 0.7
  texture
  {
   pigment
   {
    image_map
    {
     map_image(_landmapimagetype, _landmap)
     map_type 1
    }
   }
   finish
   {
    ambient 0
    brilliance land_brilliance
    albedo(_albedo)
   }
  }
 }
#end

#declare jpeg_type = 100;
#declare png_type = 200;
#declare gif_type = 300;
#macro map_image(image_type, image_name)
 #switch (image_type)
 #case (jpeg_type)
  jpeg image_name
  #break
 #case (png_type)
  png image_name
  #break
 #case (gif_type)
  gif image_name
  #break
 #end
#end


Post a reply to this message

From: Jörg 'Yadgar' Bleimann
Subject: Re: Cratered asteroid - how to improve?
Date: 22 Jun 2006 23:41:33
Message: <449b62ed@news.povray.org>
High!

EagleSun wrote:

> I suggest you find (or render) height data of craters, then apply the image
> as a map to your iso-ellipsoid.

That would be difficult to achieve... first I would have to find a way 
to generate *realistc* crater heightfields (and the cratering function 
provided by John Beale's HF-Lab does not produce such craters!)... so I 
instead would continue trying it somehow only with isosurfaces!

See you in Khyberspace!

Yadgar

Now playing Don't Go (Yazoo)


Post a reply to this message

From: EagleSun
Subject: Re: Cratered asteroid - how to improve?
Date: 23 Jun 2006 13:00:01
Message: <web.449c1d324a84f22c841337530@news.povray.org>
=?ISO-8859-1?Q?J=F6rg_=27Yadgar=27_Bleimann?= <yaz### [at] gmxde> wrote:
> High!
>
> EagleSun wrote:
>
> > I suggest you find (or render) height data of craters, then apply the image
> > as a map to your iso-ellipsoid.
>
> That would be difficult to achieve... first I would have to find a way
> to generate *realistc* crater heightfields (and the cratering function
> provided by John Beale's HF-Lab does not produce such craters!)... so I
> instead would continue trying it somehow only with isosurfaces!
>
> See you in Khyberspace!
>
> Yadgar
>
> Now playing Don't Go (Yazoo)

Yeah.... which is why I (for me) would hunt around for crater data.  I have
a huge crater data file... of 21 MB.... I would like to send it to you.
However the catch is to find me a site I can upload it to.  The data is
4000 x 4000 16-bit data.


Post a reply to this message

From: Jörg 'Yadgar' Bleimann
Subject: Re: Cratered asteroid - how to improve?
Date: 24 Jun 2006 05:31:24
Message: <449d066c$1@news.povray.org>
High!

EagleSun wrote:

> Yeah.... which is why I (for me) would hunt around for crater data.  I have
> a huge crater data file... of 21 MB.... 

One single crater? On Earth or somewhere else in the Solar System? Which 
format is it?

See you in Khyberspace!

Yadgar

Now playing: A Matter of Feeling (Duran Duran)


Post a reply to this message

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