|
|
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'
Preview of image '2006-06-21_michatopia_moon_.jpg'
Preview of image '2006-06-22_michatopia_moon_.jpg'
Preview of image '20000317.jpg'
|
|