|
|
|
|
|
|
| |
| |
|
|
From: Jörg 'Yadgar' Bleimann
Subject: Finally, the rings are visible, but...
Date: 28 Nov 2009 19:33:29
Message: <4b11c159@news.povray.org>
|
|
|
| |
| |
|
|
High!
After removing the absorption media, setting the extinction of the
scattering media to 0 and increasing the density_map's values by a
factor of 3000 (!), I at least got visible rings with a stark planet's
shadow on the lit side as well as on the unlit side, but they are both
too faint and too blue - and they cast no shadow on the planet!
The only way make them cast a shadow is to increase extinction and/or
adding an absorption medium - but whenever I try this, I got a shadow
cast by invisible rings!
HELP!!!
See you in Khyberspace!
Yadgar
Post a reply to this message
Attachments:
Download '2009-11-29 saturn, take 10.jpg' (16 KB)
Download '2009-11-29 saturn, take 11.jpg' (15 KB)
Preview of image '2009-11-29 saturn, take 10.jpg'
Preview of image '2009-11-29 saturn, take 11.jpg'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
=?ISO-8859-1?Q?J=F6rg_=27Yadgar=27_Bleimann?= <yaz### [at] gmxde> wrote:
> High!
>
> After removing the absorption media, setting the extinction of the
> scattering media to 0 and increasing the density_map's values by a
> factor of 3000 (!), I at least got visible rings with a stark planet's
> shadow on the lit side as well as on the unlit side, but they are both
> too faint and too blue - and they cast no shadow on the planet!
>
> The only way make them cast a shadow is to increase extinction and/or
> adding an absorption medium - but whenever I try this, I got a shadow
> cast by invisible rings!
>
> HELP!!!
>
> See you in Khyberspace!
>
> Yadgar
They cannot cast a shadow, if they do not absorb light (since the extinction is
zero and there is no absorption). You can either fake a shadow, by placing
another ring with the no_image keyword and allow it to cast a shadow, or you
could adjust the media to make it do both.
I am not sure what you mean by invisible rings that cast a shadow - they don't
show up against the planet or space in lit areas, but the shadow does? Also,
increasing all of the density_maps values is equivalent to increasing the
scattering color (second parameter). Can you post some of the code?
-Reactor
Post a reply to this message
|
|
| |
| |
|
|
From: Jörg 'Yadgar' Bleimann
Subject: Re: Finally, the rings are visible, but...
Date: 29 Nov 2009 18:13:07
Message: <4b130003@news.povray.org>
|
|
|
| |
| |
|
|
High!
Reactor wrote:
> They cannot cast a shadow, if they do not absorb light (since the extinction is
> zero and there is no absorption). You can either fake a shadow, by placing
> another ring with the no_image keyword and allow it to cast a shadow, or you
> could adjust the media to make it do both.
>
> I am not sure what you mean by invisible rings that cast a shadow - they don't
> show up against the planet or space in lit areas, but the shadow does? Also,
> increasing all of the density_maps values is equivalent to increasing the
> scattering color (second parameter). Can you post some of the code?
Whenever I add even the slightest absorption media and/or extinction,
the rings simply disappear - but strangely, only now cast a shadow on
the planet!
Here is the code:
difference // rings
{
cylinder
{
<0, -0.11, 0>/sc, <0, 0.1, 0>/sc, 140390/sc
}
cylinder
{
<0, -0.12, 0>/sc, <0, 0.11, 0>/sc, 74510/sc
}
/* cylinder // unlit side!
{
<0, -0.15, 0>/sc, <0, -0.1, 0>/sc, 150000/sc
texture
{
cylindrical
texture_map
{
[0 Ring_UnlitSide_Map_1_to_255 ]
[255*(((140390-74510)/140390)/1500) Ring_UnlitSide_Map_256_to_510]
[510*(((140390-74510)/140390)/1500)
Ring_UnlitSide_Map_511_to_765]
[765*(((140390-74510)/140390)/1500)
Ring_UnlitSide_Map_766_to_1020]
[1020*(((140390-74510)/140390)/1500)
Ring_UnlitSide_Map_1021_to_1275]
[1275*(((140390-74510)/140390)/1500)
Ring_UnlitSide_Map_1276_to_1500]
}
scale 140390/sc
}
} */
#if (lores)
texture // low resolution texture: 255 entries in ring color map
{
pigment
{
cylindrical
color_map
{
#declare a=0;
#while (a<255)
#declare c=eval_pigment(Saturn_Rings_Colors,
<509/510-a/255, 0.5, 0>);
#declare f=eval_pigment(Saturn_Rings_Transparency,
<509/510-a/255, 0.5, 0>);
[a*(((140390-74510)/140390)/255) rgb c filter f.gray]
#declare a=a+1;
#end
}
scale 140390/sc
}
finish { F_Saturn_Rings }
}
#else
hollow
pigment { rgbt 1 }
interior
{
media
{
scattering
{
5, 1
eccentricity -0.4
extinction 0
}
// absorption 0.
density
{
cylindrical
/* density_map
{
[0 Ring_Color_Map_1_to_255]
[255*(((140390-74510)/140390)/1500) Ring_Color_Map_256_to_510]
[510*(((140390-74510)/140390)/1500)
Ring_Color_Map_511_to_765]
[765*(((140390-74510)/140390)/1500)
Ring_Color_Map_766_to_1020]
[1020*(((140390-74510)/140390)/1500)
Ring_Color_Map_1021_to_1275]
[1275*(((140390-74510)/140390)/1500)
Ring_Color_Map_1276_to_1500]
} */
density_map // preliminary low-res version
{
#declare a=0;
#while (a<255)
#declare c=eval_pigment(Saturn_Rings_Colors,
<509/510-a/255, 0.5, 0>);
#declare f=eval_pigment(Saturn_Rings_Transparency,
<509/510-a/255, 0.5, 0>);
[a*(((140390-74510)/140390)/255) rgb c*3000 /* filter
f.gray */ ]
#declare a=a+1;
#end
}
scale 140390/sc
}
}
}
#end
}
SetAxis(bodies[72][10], bodies[72][11])
translate Pos_Saturn/sc
}
See you in Khyberspace!
Yadgar
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
=?ISO-8859-1?Q?J=F6rg_=27Yadgar=27_Bleimann?= <yaz### [at] gmxde> wrote:
> High!
>
> Whenever I add even the slightest absorption media and/or extinction,
> the rings simply disappear - but strangely, only now cast a shadow on
> the planet!
>
> Here is the code:
That code really wasn't quite what I'd expected. It lacked the various
declarations required to actually make it work, and contained a lot of
extraneous code. I do understand if there are some things you do not wish to
share, but could you provide a minimal scene with only the relevant parts? This
should be just the ring object, a basic media declaration (this doesn't have to
include the special color_map, but it should be similar in color), and a
light_source placed similarly to the real scene.
-Reactor
Post a reply to this message
|
|
| |
| |
|
|
From: Jörg 'Yadgar' Bleimann
Subject: Re: Finally, the rings are visible, but...
Date: 30 Nov 2009 11:45:02
Message: <4b13f68e@news.povray.org>
|
|
|
| |
| |
|
|
High!
Reactor wrote:
> That code really wasn't quite what I'd expected. It lacked the various
> declarations required to actually make it work, and contained a lot of
> extraneous code. I do understand if there are some things you do not wish to
> share, but could you provide a minimal scene with only the relevant parts? This
> should be just the ring object, a basic media declaration (this doesn't have to
> include the special color_map, but it should be similar in color), and a
> light_source placed similarly to the real scene.
O.k., once more:
[...]
#include "starry_sky.inc" // self-programmed macro to generate a starry
sky sphere according to real astronomical data, 900 stars, configurable
according to camera angle and image resolution
#include "functions.inc" // for eval_pigment()
[...]
#declare sc=13347; // 1 POV unit = 13347 kilometres
[...]
#declare rs=0; // radiosity flag, 0 = radiosity off
#declare lores=0; // flag for low resolution Saturnian rings (dependent
on camera distance in the future)
[...]
#declare F_Standard_Planetary_Surface =
finish
{
#if (!rs)
ambient 0.0001
#end
diffuse 1
brilliance 0.8
}
#declare F_Saturn_Rings =
finish
{
#if (!rs)
ambient 0.01
#end
diffuse 1
brilliance 0.05
}
#declare F_Saturn_Rings_UnlitSide =
finish
{
#if (!rs)
ambient 0.3
#end
diffuse 5
brilliance 0.05
}
#declare cam = 7; // camera mode
// CELESTIAL BODIES OF THE SOLAR SYSTEM DATA
// Column 0: orbital semi-major axis (to the Sun or the respective
planet) in kilometres
// Column 1: radius in x dimension, in kilometres
// Column 2: radius in y dimension, in kilometres (if oblateness is
given then stated as -1)
// Column 3: radius in z dimension, in kilometres (if oblateness is
given then stated as -1)
// Column 4: axial tilt in degrees (planets: relative to orbit around
the Sun, moons: relative to planet's equatorial plane)
// Column 5: orbital inclination in degrees (planets: relative to
ecliptic, moons: relative to planet's equatorial plane)
// Column 6: orbital eccentricity
// Column 7: perihelion argument (degrees; if variable (Earth's Moon)
then stated als -1)
// Column 8: longitude of ascending node (degrees; if variable (Earth's
Moon) then stated als -1)
// Column 9: oblateness (not taken into account if different radii
explicitly stated)
// Column 10: declination of north pole (degrees)
// Column 11: right ascension of north pole (degrees!)
// Column 12: albedo (if irrelevant (Sun) stated as -1)
#declare bodies = array [74][12]
{
{ 0, 696000, -1, -1, 7.25, 0,
0, 0, 0, 0.000009, 63.87, 286.125 }, //
0 - Sun
[...]
{ 1433449370, 60268, 54364, 60268, 26.73, 2.484,
0.055723219, 336.013862,113.642811,-1, 83.537, 40.589 } // 72
- Saturn
[...]
}
// PROVISIONAL PLANETARY POSITIONS (to be replaced later according to
astronomically accurate orbital data)
[...]
#declare Pos_Saturn = bodies[72][0]*<sin(radians(157.4)), 0,
cos(radians(157.4))>;
[...]
// CAMERA DATA
#switch(cam)
[...]
#case (7) // centered on Saturn, rings oblique view
#declare camPos = Pos_Saturn + 350000 * <sin(radians(64)), 0,
cos(radians(64))>;
#declare camLook = Pos_Saturn;
#declare camAng = 40;
#break
#case (7.01) // view through Saturn's D ring
#declare camPos = Pos_Saturn + 350000 * <sin(radians(64)), 0,
cos(radians(64))>;
#declare camLook = Pos_Saturn+<10000, -32000, 0>;
#declare camAng = 5;
#break
#case (7.02) // centered on Saturn, view of unlit ring side
#declare camPos = Pos_Saturn + 350000 * <sin(radians(244)), 0,
cos(radians(244))>;
#declare camLook = Pos_Saturn;
#declare camAng = 40;
#break
#end
// CELESTIAL SPHERE
Stars(6, image_width, camAng, 1.5) // invocation of starry sky sphere macro
#macro SetAxis(dec, ras) // macro for orienting planets
rotate <bodies[3][4]-(90-dec), 0, 0>
rotate <0, 90-ras, 0>
#end
light_source // Sun
{
0
color rgb 1
looks_like
{
sphere
{
0, 1
texture
{
pigment { color rgb <1, 1, 0.85> }
finish { ambient 1 diffuse 0 }
}
scale bodies[0][1]/sc
SetAxis(bodies[0][10], bodies[0][11])
}
}
}
[...]
// the following three image files can be obtained at
http://www.mmedia.is/~bjj/data/s_rings/index.html
#declare Saturn_Rings_Colors =
pigment
{
image_map
{
png "solarsys/sat_ring_color_bjoernjonsson.png"
}
}
#declare Saturn_Rings_Transparency =
pigment
{
image_map
{
png "solarsys/transparency_bjoernjonsson.png"
}
}
#declare Saturn_Rings_UnlitSide =
pigment
{
image_map
{
png "solarsys/unlitside_bjoernjonsson.png"
}
}
currently not yet working with media! (but that would be another thread
here!)
#declare Ring_Color_Map_1_to_255 =
color_map
{
#declare a=0;
#while (a<255)
#declare c=eval_pigment(Saturn_Rings_Colors, <2999/3000-a/1500,
0.5, 0>);
#declare f=eval_pigment(Saturn_Rings_Transparency,
<2999/3000-a/1500, 0.5, 0>);
[a*(((140390-74510)/140390)/1500) rgb c filter f.gray]
#declare a=a+1;
#end
}
#declare Ring_Color_Map_256_to_510 =
texture
{
pigment
{
cylindrical
color_map
{
#declare a=255;
#while (a<510)
#declare c=eval_pigment(Saturn_Rings_Colors, <2999/3000-a/1500,
0.5, 0>);
#declare f=eval_pigment(Saturn_Rings_Transparency,
<2999/3000-a/1500, 0.5, 0>);
[a*(((140390-74510)/140390)/1500) rgb c filter f.gray]
#declare a=a+1;
#end
}
}
finish { F_Saturn_Rings }
}
#declare Ring_Color_Map_511_to_765 =
texture
{
pigment
{
cylindrical
color_map
{
#declare a=510;
#while (a<765)
#declare c=eval_pigment(Saturn_Rings_Colors, <2999/3000-a/1500,
0.5, 0>);
#declare f=eval_pigment(Saturn_Rings_Transparency,
<2999/3000-a/1500, 0.5, 0>);
[a*(((140390-74510)/140390)/1500) rgb c filter f.gray]
#declare a=a+1;
#end
}
}
finish { F_Saturn_Rings }
}
#declare Ring_Color_Map_766_to_1020 =
texture
{
pigment
{
cylindrical
color_map
{
#declare a=765;
#while (a<1020)
#declare c=eval_pigment(Saturn_Rings_Colors, <2999/3000-a/1500,
0.5, 0>);
#declare f=eval_pigment(Saturn_Rings_Transparency,
<2999/3000-a/1500, 0.5, 0>);
[a*(((140390-74510)/140390)/1500) rgb c filter f.gray]
#declare a=a+1;
#end
}
}
finish { F_Saturn_Rings }
}
#declare Ring_Color_Map_1021_to_1275 =
texture
{
pigment
{
cylindrical
color_map
{
#declare a=1020;
#while (a<1275)
#declare c=eval_pigment(Saturn_Rings_Colors, <2999/3000-a/1500,
0.5, 0>);
#declare f=eval_pigment(Saturn_Rings_Transparency,
<2999/3000-a/1500, 0.5, 0>);
[a*(((140390-74510)/140390)/1500) rgb c filter f.gray]
#declare a=a+1;
#end
}
}
finish { F_Saturn_Rings }
}
#declare Ring_Color_Map_1276_to_1500 =
texture
{
pigment
{
cylindrical
color_map
{
#declare a=1275;
#while (a<1500)
#declare c=eval_pigment(Saturn_Rings_Colors, <2999/3000-a/1500,
0.5, 0>);
#declare f=eval_pigment(Saturn_Rings_Transparency,
<2999/3000-a/1500, 0.5, 0>);
[a*(((140390-74510)/140390)/1500) rgb c filter f.gray]
#declare a=a+1;
#end
}
}
finish { F_Saturn_Rings }
}
#declare Ring_UnlitSide_Map_1_to_255 =
texture
{
pigment
{
cylindrical
color_map
{
#declare a=0;
#while (a<255)
#declare c=eval_pigment(Saturn_Rings_UnlitSide,
<2999/3000-a/1500, 0.5, 0>);
#declare f=eval_pigment(Saturn_Rings_Transparency,
<2999/3000-a/1500, 0.5, 0>);
[a*(((140390-74510)/140390)/1500) rgb c filter f.gray]
#declare a=a+1;
#end
}
}
finish { F_Saturn_Rings_UnlitSide }
}
#declare Ring_UnlitSide_Map_256_to_510 =
texture
{
pigment
{
cylindrical
color_map
{
#declare a=255;
#while (a<510)
#declare c=eval_pigment(Saturn_Rings_UnlitSide,
<2999/3000-a/1500, 0.5, 0>);
#declare f=eval_pigment(Saturn_Rings_Transparency,
<2999/3000-a/1500, 0.5, 0>);
[a*(((140390-74510)/140390)/1500) rgb c filter f.gray]
#declare a=a+1;
#end
}
}
finish { F_Saturn_Rings_UnlitSide }
}
#declare Ring_UnlitSide_Map_511_to_765 =
texture
{
pigment
{
cylindrical
color_map
{
#declare a=510;
#while (a<765)
#declare c=eval_pigment(Saturn_Rings_UnlitSide,
<2999/3000-a/1500, 0.5, 0>);
#declare f=eval_pigment(Saturn_Rings_Transparency,
<2999/3000-a/1500, 0.5, 0>);
[a*(((140390-74510)/140390)/1500) rgb c filter f.gray]
#declare a=a+1;
#end
}
}
finish { F_Saturn_Rings_UnlitSide }
}
#declare Ring_UnlitSide_Map_766_to_1020 =
texture
{
pigment
{
cylindrical
color_map
{
#declare a=765;
#while (a<1020)
#declare c=eval_pigment(Saturn_Rings_UnlitSide,
<2999/3000-a/1500, 0.5, 0>);
#declare f=eval_pigment(Saturn_Rings_Transparency,
<2999/3000-a/1500, 0.5, 0>);
[a*(((140390-74510)/140390)/1500) rgb c filter f.gray]
#declare a=a+1;
#end
}
}
finish { F_Saturn_Rings_UnlitSide }
}
#declare Ring_UnlitSide_Map_1021_to_1275 =
texture
{
pigment
{
cylindrical
color_map
{
#declare a=1020;
#while (a<1275)
#declare c=eval_pigment(Saturn_Rings_UnlitSide,
<2999/3000-a/1500, 0.5, 0>);
#declare f=eval_pigment(Saturn_Rings_Transparency,
<2999/3000-a/1500, 0.5, 0>);
[a*(((140390-74510)/140390)/1500) rgb c filter f.gray]
#declare a=a+1;
#end
}
}
finish { F_Saturn_Rings_UnlitSide }
}
#declare Ring_UnlitSide_Map_1276_to_1500 =
texture
{
pigment
{
cylindrical
color_map
{
#declare a=1275;
#while (a<1500)
#declare c=eval_pigment(Saturn_Rings_UnlitSide,
<2999/3000-a/1500, 0.5, 0>);
#declare f=eval_pigment(Saturn_Rings_Transparency,
<2999/3000-a/1500, 0.5, 0>);
[a*(((140390-74510)/140390)/1500) rgb c filter f.gray]
#declare a=a+1;
#end
}
}
finish { F_Saturn_Rings_UnlitSide }
}
// the actual planet and rings objects
union
{
sphere // Saturn
{
0, 1
texture
{
pigment
{
image_map
{
jpeg "solarsys/saturn_bjoernjonsson.jpg" // also from
http://www.mmedia.is/~bjj/data/saturn/index.html
map_type 1
interpolate 2
}
}
finish { F_Standard_Planetary_Surface }
}
scale <bodies[72][1], bodies[72][2], bodies[72][3]>/sc
}
difference // rings
{
cylinder
{
<0, -0.11, 0>/sc, <0, 0.1, 0>/sc, 140390/sc
}
cylinder
{
<0, -0.12, 0>/sc, <0, 0.11, 0>/sc, 74510/sc
}
// originally used with the no-media hi-res version of the rings -
I'm currently not sure whether I will able to make use of it also with
media!
/* cylinder // unlit side!
{
<0, -0.15, 0>/sc, <0, -0.1, 0>/sc, 150000/sc
texture
{
cylindrical
texture_map
{
[0 Ring_UnlitSide_Map_1_to_255 ]
[255*(((140390-74510)/140390)/1500) Ring_UnlitSide_Map_256_to_510]
[510*(((140390-74510)/140390)/1500) Ring_UnlitSide_Map_511_to_765]
[765*(((140390-74510)/140390)/1500) Ring_UnlitSide_Map_766_to_1020]
[1020*(((140390-74510)/140390)/1500)
Ring_UnlitSide_Map_1021_to_1275]
[1275*(((140390-74510)/140390)/1500)
Ring_UnlitSide_Map_1276_to_1500]
}
scale 140390/sc
}
} */
// ultra-cheap no media version of the rings
#if (lores)
texture // low resolution texture: 255 entries in ring color map
{
pigment
{
cylindrical
color_map
{
#declare a=0;
#while (a<255)
#declare c=eval_pigment(Saturn_Rings_Colors,
<509/510-a/255, 0.5, 0>);
#declare f=eval_pigment(Saturn_Rings_Transparency,
<509/510-a/255, 0.5, 0>);
[a*(((140390-74510)/140390)/255) rgb c filter f.gray]
#declare a=a+1;
#end
}
scale 140390/sc
}
finish { F_Saturn_Rings }
}
#else // current media problem!
hollow
pigment { rgbt 1 }
interior
{
media
{
scattering
{
5, 1
eccentricity -0.4
extinction 0
}
density
{
cylindrical
// hi-res version (1500 color and transparency levels),
currently not usable with media (but please let's discuss this later on!)
/* density_map
{
[0 Ring_Color_Map_1_to_255]
[255*(((140390-74510)/140390)/1500) Ring_Color_Map_256_to_510]
[510*(((140390-74510)/140390)/1500) Ring_Color_Map_511_to_765]
[765*(((140390-74510)/140390)/1500) Ring_Color_Map_766_to_1020]
[1020*(((140390-74510)/140390)/1500)
Ring_Color_Map_1021_to_1275]
[1275*(((140390-74510)/140390)/1500)
Ring_Color_Map_1276_to_1500]
} */
// current media version
density_map // preliminary low-res version
{
#declare a=0;
#while (a<255)
#declare c=eval_pigment(Saturn_Rings_Colors,
<509/510-a/255, 0.5, 0>);
#declare f=eval_pigment(Saturn_Rings_Transparency,
<509/510-a/255, 0.5, 0>);
[a*(((140390-74510)/140390)/255) rgb c*3000 /* filter
f.gray*/]
#declare a=a+1;
#end
}
scale 11
}
}
}
#end
}
SetAxis(bodies[72][10], bodies[72][11])
translate Pos_Saturn/sc
}
camera
{
[...]
location camPos/sc
look_at camLook/sc
angle camAng
}
// end of code
Ring color and transparency maps are at
http://www.mmedia.is/~bjj/data/s_rings/index.html
See you in Khyberspace!
Yadgar
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
=?ISO-8859-1?Q?J=F6rg_=27Yadgar=27_Bleimann?= <yaz### [at] gmxde> wrote:
> High!
> O.k., once more:
I would like to help, but I cannot wade through that and make it work. I wasn't
requesting more code in my last post, I was requesting working code. Even after
tinkering with the code quite a bit, I could not really make it work. As such,
I could not try to fix the problems.
Please note that by minimal scene, I meant the absolute minimum code
required to duplicate the problem. This code should be self contained as best
as possible, and should simply work upon copy and paste. The image maps,
textures, starry skies, and a lot of other stuff is not required to troubleshoot
the parameters of your media. If it is not possible to easily separate out the
components, consider posting an archive under the binaries group.
What I did notice is that, as best as I can tell, you are viewing the rings edge
on. Does the media container show up when it isn't transparent?
The variable names are a little ambiguous, as such I could not tell the relative
thickness of the rings. However, it seems like they are very thin. Did you
already try increasing the scattering amount proportionally?
good luck,
-Reactor
Post a reply to this message
|
|
| |
| |
|
|
From: Jörg 'Yadgar' Bleimann
Subject: Re: Finally, the rings are visible, but...
Date: 1 Dec 2009 13:02:26
Message: <4b155a32@news.povray.org>
|
|
|
| |
| |
|
|
High!
Reactor wrote:
> What I did notice is that, as best as I can tell, you are viewing the rings edge
> on. Does the media container show up when it isn't transparent?
I didn't try yet... but will do so later this night (CET)!
> The variable names are a little ambiguous, as such I could not tell the relative
> thickness of the rings.
Relative thickness is 200 metres!
> Did you
> already try increasing the scattering amount proportionally?
Yes, I just tried this, by setting the scattering amount to 10 - and I
got blazingly bright rings close to white-out, but still no shadow on
the planet! As general scattering amount and rgb values in the density
map are equivalent, there seems to be no point in trying the lower the
density values there instead...
And, yes, later this evening I will come up with a self-containing
Saturn scene to test for you! But first I have to do my daily Afghan
bodycount...
See you in Khyberspace!
Yadgar
Post a reply to this message
|
|
| |
| |
|
|
From: Jörg 'Yadgar' Bleimann
Subject: Re: Finally, the rings are visible, but...
Date: 1 Dec 2009 16:53:49
Message: <4b15906d$1@news.povray.org>
|
|
|
| |
| |
|
|
High!
> And, yes, later this evening I will come up with a self-containing
> Saturn scene to test for you! But first I have to do my daily Afghan
> bodycount...
Here it is:
// beginning of code
// INCLUDES
#include "functions.inc"
// VARIABLES
#declare sc=13347; // 13347; // 1 POV unit = 13347 kilometres
global_settings
{
max_trace_level 20
assumed_gamma 1.5
}
// FINISHES
#declare F_Standard_Planetary_Surface =
finish
{
ambient 0.0001
diffuse 1
brilliance 0.8
}
#declare F_Saturn_Rings =
finish
{
ambient 0.01
diffuse 1
brilliance 0.05
}
#declare bodies = array [2][12]
{
{ 0, 696000, -1, -1, 7.25, 0,
0, 0, 0, 0.000009, 63.87, 286.125 },
// 0 - Sun
{ 1433449370, 60268, 54364, 60268, 26.73, 2.484,
0.055723219, 336.013862,113.642811,-1, 83.537, 40.589 } //
1 - Saturn
}
#declare Pos_Saturn = bodies[1][0]*<sin(radians(157.4)), 0,
cos(radians(157.4))>;
#declare cam = 1; // camera mode
#switch (cam)
#case (0) // centered on Saturn, view of lit ring ride
#declare camPos = Pos_Saturn + 350000 * <sin(radians(64)), 0,
cos(radians(64))>;
#declare camLook = Pos_Saturn;
#declare camAng = 40;
#break
#case (1) // centered on Saturn, view of unlit ring side
#declare camPos = Pos_Saturn + 350000 * <sin(radians(244)), 0,
cos(radians(244))>;
#declare camLook = Pos_Saturn;
#declare camAng = 40;
#break
#end
#macro SetAxis(dec, ras)
rotate <23.439281-(90-dec), 0, 0>
rotate <0, 90-ras, 0>
#end
light_source // Sun
{
0
color rgb 1
looks_like
{
sphere
{
0, 1
texture
{
pigment { color rgb <1, 1, 0.85> }
finish { ambient 1 diffuse 0 }
}
scale bodies[0][1]/sc
SetAxis(bodies[0][10], bodies[0][11])
}
}
}
#declare Saturn_Rings_Colors =
pigment
{
image_map
{
png "solarsys/sat_ring_color_bjoernjonsson.png"
}
}
#declare Saturn_Rings_Transparency =
pigment
{
image_map
{
png "solarsys/transparency_bjoernjonsson.png"
}
}
union
{
sphere // Saturn
{
0, 1
texture
{
pigment
{
image_map
{
jpeg "solarsys/saturn_bjoernjonsson.jpg"
map_type 1
interpolate 2
}
}
finish { F_Standard_Planetary_Surface }
}
scale <bodies[1][1], bodies[1][2], bodies[1][3]>/sc
}
difference // rings
{
cylinder
{
<0, -0.11, 0>/sc, <0, 0.1, 0>/sc, 140390/sc
}
cylinder
{
<0, -0.12, 0>/sc, <0, 0.11, 0>/sc, 74510/sc
}
hollow
pigment { rgbt 1 }
interior
{
media
{
scattering
{
5, 10
eccentricity -0.4
extinction 0
}
// absorption 0.
density
{
cylindrical
density_map // preliminary low-res version
{
#declare a=0;
#while (a<255)
#declare c=eval_pigment(Saturn_Rings_Colors,
<509/510-a/255, 0.5, 0>);
#declare f=eval_pigment(Saturn_Rings_Transparency,
<509/510-a/255, 0.5, 0>);
[a*(((140390-74510)/140390)/255) rgb c*3000 /* filter
f.gray */ ]
#declare a=a+1;
#end
}
scale 140390/sc
}
}
}
}
SetAxis(bodies[1][10], bodies[1][11])
translate Pos_Saturn/sc
}
camera
{
location camPos/sc
look_at camLook/sc
angle camAng
}
// end of code
See you in Khyberspace!
Yadgar
Post a reply to this message
|
|
| |
| |
|
|
From: Jörg 'Yadgar' Bleimann
Subject: Re: Finally, the rings are visible, but...
Date: 1 Dec 2009 17:23:44
Message: <4b159770@news.povray.org>
|
|
|
| |
| |
|
|
...also ring color and transparency maps!
Post a reply to this message
Attachments:
Download 'sat_ring_color_bjoernjonsson.png' (4 KB)
Download 'saturn_bjoernjonsson.jpg' (1013 KB)
Download 'transparency_bjoernjonsson.png' (2 KB)
Preview of image 'sat_ring_color_bjoernjonsson.png'
Preview of image 'saturn_bjoernjonsson.jpg'
Preview of image 'transparency_bjoernjonsson.png'
|
|
| |
| |
|
|
|
|
| |
| |
|
|
=?ISO-8859-1?Q?J=F6rg_=27Yadgar=27_Bleimann?= <yaz### [at] gmxde> wrote:
> High!
> Here it is:
>
The problem has to do with floating point accuracy limitations in the media
container. This part here:
> #declare sc=13347; // 13347; // 1 POV unit = 13347 kilometres
does NOT go well with this part down here:
> difference // rings
> {
> cylinder
> {
> <0, -0.11, 0>/sc, <0, 0.1, 0>/sc, 140390/sc
> }
> cylinder
> {
> <0, -0.12, 0>/sc, <0, 0.11, 0>/sc, 74510/sc
> }
The thickness of the rings is too small with respect to the rest of the scene.
I am sure it is the scientifically correct value, but there is a problem with
mixing such small and large values in a scene. Interestingly enough, you should
be able to render the container shape with those dimensions without any
problems. If you did that, you could use double_illuminate to make it look like
the media would.
If you want to use media, you will have to make the rings thicker and change
some of the sampling parameters. This is the media block I used with visually
ok results. I am not sure if the ring color and thickness is correct, but it
should be easy to tune at this point by changing the scattering extinction and
color values.
Ring code:
//-------------------------
#local sc2 = 25; // new scale value for thickness only, as old
// scale value was too small.
difference // media rings
{
cylinder
{
<0, -0.11, 0>/sc2, <0, 0.1, 0>/sc2, 140390/sc
}
cylinder
{
<0, -0.12, 0>/sc2, <0, 0.11, 0>/sc2, 74510/sc
}
hollow
no_radiosity
pigment { rgbt 1 }
interior
{
media
{
samples 30
scattering
{
5, 150
eccentricity -0.4
extinction 0.4
}
density
{
cylindrical
density_map // preliminary low-res version
{
#declare a=0;
#while (a<255)
#declare c=eval_pigment(Saturn_Rings_Colors, <509/510-a/255, 0.5,
0>);
#declare f=eval_pigment(Saturn_Rings_Transparency,
<509/510-a/255, 0.5, 0>);
[a*(((140390-74510)/140390)/255) rgb
<c.red,c.green,c.blue>*f.gray ]
/* you should be multiplying by f.gray, as it returns a transparency
value from [0..1].
Note that scattering media is inherently filtering, and the filter
component of a color needn't be used.
*/
#declare a=a+1;
#end
}
scale 140390/sc
}
}
}
}
//--------------------
You can also test scaling the entire scene up by 100 units or so. Consider this
thread here (web view)
http://news.povray.org/povray.general/thread/%3C47fa4f1b%241%40news.povray.org%3E/)
Anyway, hope that helps. I rendered with those settings and got some ok
results, but the rings look rather different from camera 0 compared to camera 1.
I think part of this is the media type, which has direction dependent
scattering, but this might mean you'll have to change sampling parameters
between angles if you want a certain look.
-Reactor
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|