![](/i/fill.gif) |
![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> ...to make use of more advanced raytracing techniques such as media -
> and may have to content myself for the rest of my life with beginner's
> scenes!
>
> I'm still not able to produce planetary rings through which light is
> scattered also to the unlit side... here is the code (no, it's just a
> test scene, not a real Saturn!), and below two scenes showing the lit
> and unlit side of the rings!
>
> // beginning of code
>
> global_settings
> {
> max_trace_level 10
> }
>
> union
> {
> sphere
> {
> 0, 1
> texture
> {
> pigment { color rgb <0.6, 0.4, 0> }
> finish { ambient 0.02 diffuse 1 brilliance 0.8 }
> }
> }
> difference
> {
> cylinder
> {
> <0, -0.001, 0>, <0, 0.005, 0>, 3.68
> }
> cylinder
> {
> <0, -0.0011, 0>, <0, 0.0011, 0>, 1.75
> }
> hollow
> pigment { rgbt 1 }
> interior
> {
> media
> {
> emission 1/36800
Remove that emission. The rings have NO intrinsic glow, they ONLY react
to incomming light.
As long as you keep this emissive media, you'll have problems.
> scattering
> {
> 1, 1
Tune that way down. Start value: 1/10000
You probably need something more like: 1/36800
> // eccentricity -0.4
> extinction 1
> }
> density
> {
> cylindrical
> color_map
> {
> [0 rgbf <1, 0.8, 0.7, 0.2> ]
> [0.1 rgbf <1, 0.8, 0.7, 0.2> ]
> [0.1 rgbf <0.1, 0.3, 0.1, 0.5>]
> [0.17 rgbf <0.1, 0.3, 0.1, 0.5>]
> [0.17 rgbf <0.85, 0.89, 0.94, 0.3>]
> [0.18 rgbf <0.85, 0.89, 0.94, 0.3>]
> [0.18 rgbf <0.99, 0.93, 0.45, 0.4>]
> [0.26 rgbf <0.99, 0.93, 0.45, 0.4>]
> [0.26 rgbf <0.5, 0.23, 0.61, 0.5, 0.4>]
> [0.36 rgbf <0.5, 0.23, 0.61, 0.5, 0.4>]
> [0.36 rgbf <1, 0.92, 0.93, 0.3>]
> [0.45 rgbf <1, 0.92, 0.93, 0.3>]
> [0.45 rgbf <0, 0, 0, 1>]
>
> }
> scale 3.68
> }
> }
> }
> }
> rotate <2, 7, 0>
> scale 10000
> translate z*50000
> }
>
>
> light_source
> {
> <500000, 2500, 5000>
> color rgb 1
> }
>
> camera
> {
> location <1.5, 1.5, 0.12>
> look_at 1.5
> angle 60
> }
>
> // end of code
>
> See you in Khyberspace! (learning Pashto seems to be easier than using
> media!)
>
> Yadgar
>
Bad:
I don't know why you keep that emissive media.
Good:
You scaled it's density down correctly.
Bad:
You forgot to scale down the density of the scattering media by an
aquivalent amount.
Alain
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> With me, it didn't work at all... still the unlit side is completely
> dark! And when I tried the same combination of scattering and absorption
> on the real Saturn scene, where the rings are about 11 units wide (then
> respectively 1/11 for scattering and absorption strength), the entire
> ring (when viewed upon from the lit side) remains invisible, although
> its shadow is visible on the planet's body!
>
> What a pathetic retarded oaf I am - I probably better should take to
> watching TV shows instead of overburdening my feeble chicken brain with
> such monstrous tasks like raytracing...
>
> "Life is like a chocolate box" (Forrest Gump)
You have TWO (2) medias. An emissive one and a scattering one.
You reduced the density of the emissive media that should not be used in
this case.
I realy don't know why you added that emissive media. I don't know why
you keep it as it's not needed at all.
You did NOT reduce the density of your scattering media, and that is
your problem.
Alain
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Jörg 'Yadgar' Bleimann
Subject: Re: Probably I'm just in fact too stupid...
Date: 26 Nov 2009 17:38:40
Message: <4b0f0370@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
High!
Alain wrote:
> You have TWO (2) medias. An emissive one and a scattering one.
Now I removed the emissive media...
> You did NOT reduce the density of your scattering media, and that is
> your problem.
After I adapted the scattering media density reciprocally to the scale
(i. e. 1/36800) I got extremely faint transparent rings - both with and
without absorption 1/36800, see first two images.
When I increased scattering density to 1/368, the rings became more
visible - but still almost black on the unlit side, with some bizarre
geometry showing up on the planet's night side (see third image)!
Could this be an effect of using filter in the color_map?
Here is the code for the last image:
global_settings
{
max_trace_level 10
}
union
{
sphere
{
0, 1
texture
{
pigment { color rgb <0.6, 0.4, 0> }
finish { ambient 0.02 diffuse 1 brilliance 0.8 }
}
}
difference
{
cylinder
{
<0, -0.001, 0>, <0, 0.005, 0>, 3.68
}
cylinder
{
<0, -0.0011, 0>, <0, 0.0011, 0>, 1.75
}
hollow
pigment { rgbt 1 }
interior
{
media
{
// emission 1/36800
scattering
{
5, 1/368
// eccentricity -0.4
// extinction 1
}
// absorption 1/36800
density
{
cylindrical
color_map
{
[0 rgbf <1, 0.8, 0.7, 0.2> ]
[0.1 rgbf <1, 0.8, 0.7, 0.2> ]
[0.1 rgbf <0.1, 0.3, 0.1, 0.5>]
[0.17 rgbf <0.1, 0.3, 0.1, 0.5>]
[0.17 rgbf <0.85, 0.89, 0.94, 0.3>]
[0.18 rgbf <0.85, 0.89, 0.94, 0.3>]
[0.18 rgbf <0.99, 0.93, 0.45, 0.4>]
[0.26 rgbf <0.99, 0.93, 0.45, 0.4>]
[0.26 rgbf <0.5, 0.23, 0.61, 0.5, 0.4>]
[0.36 rgbf <0.5, 0.23, 0.61, 0.5, 0.4>]
[0.36 rgbf <1, 0.92, 0.93, 0.3>]
[0.45 rgbf <1, 0.92, 0.93, 0.3>]
[0.45 rgbf <0, 0, 0, 1>]
}
scale 3.68
}
}
}
}
rotate <2, 7, 0>
scale 10000
translate z*50000
}
light_source
{
<500000, 2500, 5000>
color rgb 1
}
camera
{
location <1.5, 1.5, 0.12>
look_at 1.5
angle 60
}
See you in Khyberspace!
Yadgar
Post a reply to this message
Attachments:
Download '2009-11-25 media test, take 44.jpg' (8 KB)
Download '2009-11-25 media test, take 45.jpg' (8 KB)
Download '2009-11-25 media test, take 46.jpg' (10 KB)
Preview of image '2009-11-25 media test, take 44.jpg'
![2009-11-25 media test, take 44.jpg](/povray.binaries.images/attachment/%3C4b0f0370%40news.povray.org%3E/2009-11-25%20media%20test%2C%20take%2044.jpg?preview=1)
Preview of image '2009-11-25 media test, take 45.jpg'
![2009-11-25 media test, take 45.jpg](/povray.binaries.images/attachment/%3C4b0f0370%40news.povray.org%3E/2009-11-25%20media%20test%2C%20take%2045.jpg?preview=1)
Preview of image '2009-11-25 media test, take 46.jpg'
![2009-11-25 media test, take 46.jpg](/povray.binaries.images/attachment/%3C4b0f0370%40news.povray.org%3E/2009-11-25%20media%20test%2C%20take%2046.jpg?preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Jaime Vives Piqueres
Subject: Re: Probably I'm just in fact too stupid...
Date: 26 Nov 2009 18:15:39
Message: <4b0f0c1b@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> High!
>
> Jaime Vives Piqueres wrote:
>> If you scale UP the container, you have to scale DOWN the media
>> strength! Just try .05 instead 1338181 and you will see the effect...
>> I just tried it and works.
>
> With me, it didn't work at all... still the unlit side is completely
> dark! And when I tried the same combination of scattering and absorption
> on the real Saturn scene, where the rings are about 11 units wide (then
> respectively 1/11 for scattering and absorption strength), the entire
> ring (when viewed upon from the lit side) remains invisible, although
> its shadow is visible on the planet's body!
>
Sorry, I did a poor reading, and for the images I assumed too quickly your
problem was just the ultra-bright media... trying with your code on the last
message, I see that using extinction 0 gives the effect you are looking for.
But I still don't know very well why it doesn't works with the default,
teorically realistic, value of 1.
> watching TV shows instead of overburdening my feeble chicken brain with
> such monstrous tasks like raytracing...
I've a poor brain too, but I discovered it doesn't matters if you have the
power of unlimited "trial&error" at your disposal... ;)
P.S.: You still have the rgbf on the media, which doesn't works as you
think... and you even supplied some of the entries with 5 components colors!
(although it really doesn't matters for your problem).
--
Jaime Vives Piqueres
http://www.ignorancia.org
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Jörg 'Yadgar' Bleimann
Subject: Re: Probably I'm just in fact too stupid...
Date: 26 Nov 2009 19:11:58
Message: <4b0f194e@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
High!
Jaime Vives Piqueres wrote:
> Sorry, I did a poor reading, and for the images I assumed too
quickly your
> problem was just the ultra-bright media... trying with your code on
the last
> message, I see that using extinction 0 gives the effect you are
looking for.
Yes, that's quite logical... I tried it, and it at least yielded roughly
the result I want to achieve in the long run! Thank you for the tip...
perhaps I'll up the extinction value to, let's say, 0.1 or 0.15, as the
unlit side is of course somewhat darker than the lit side, irrespective
of light filtering through...
...but I also found out, that with an exactly reciprocal scattering
strength, the rings become too faint - so I instead made it ten times
stronger (i. e. 1/3680 rather than 1/36800) - see attached images (first
image: unlit side, second image: lit side)!
But, to bring my problem to a "meta level": although I now work more or
less frequently since early 1996 with POV-Ray, I never got much beyond
beginners' skills - since 2000 I keep track of this group, and I've seen
thousands of incredibly sophisticated works (@Jaime Vives Piqueres: for
example your autobahn scene!), and when I compare them to my puny
primitive scenes, I'm close to cry for an euthanasia injection, as I'm
obviously virtually unable to learn from my mistakes... and I HATE
myself for being so dysfunctional!
And I'm really not sure whether having more hobbies than just POV-Ray
(i. e. astronomy, electronic music, Afghanistan...) is the reason... to
me it appears that not so few people who regularly contribute pictures
here have access to, hmmm, time-compressing drugs which allow them to
learn and work 72 hours a day...
See you in Khyberspace!
Yadgar
Post a reply to this message
Attachments:
Download '2009-11-26 media test, take 47.jpg' (13 KB)
Download '2009-11-26 media test, take 48.jpg' (13 KB)
Preview of image '2009-11-26 media test, take 47.jpg'
![2009-11-26 media test, take 47.jpg](/povray.binaries.images/attachment/%3C4b0f194e%40news.povray.org%3E/2009-11-26%20media%20test%2C%20take%2047.jpg?preview=1)
Preview of image '2009-11-26 media test, take 48.jpg'
![2009-11-26 media test, take 48.jpg](/povray.binaries.images/attachment/%3C4b0f194e%40news.povray.org%3E/2009-11-26%20media%20test%2C%20take%2048.jpg?preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
> After I adapted the scattering media density reciprocally to the scale
> (i. e. 1/36800) I got extremely faint transparent rings - both with and
> without absorption 1/36800, see first two images.
>
> When I increased scattering density to 1/368, the rings became more
> visible - but still almost black on the unlit side, with some bizarre
> geometry showing up on the planet's night side (see third image)!
>
> Could this be an effect of using filter in the color_map?
>
Some of the artifacts you are seeing is probably a result of self-shadowing. To
test this, try varying the angle between the rings and sun a little bit, then
test a different extinction value, probably 0.5
You should consider removing the filtering component also, as scattering media
is inherently filtering, and the thickness or brightness comes from the color's
distance from black. Also note that close color control is more easily done by
splitting the single scattering media into a scattering media with no
extinction, and an absorption media that has a different color_map.
The reason for this is that the color scattered is also the color absorbed, and
it can be easier to control the color closely if you scatter the color you wish,
but absorb all colors equally. This can also be done in reverse - scatter all
light (white), but absorb the color opposite of the color you want the media to
be (this may be closer to what happens in real life).
Anyway, here is some code I made from yours. It uses a simple macro to createa
a more complex density that gives the rings from "grain" (that probably wouldn't
be visible from this distance, but looks neat IMHO).
//--------------- beginning of code
global_settings
{
max_trace_level 10
}
#macro wrink(SomeColor, Thickness, ScaleV)
// SomeColor is the color scattered (and absorbed!)
// Thickness defines the ratio of the color supplied as compared to empty
(black)
// ScaleV determines the size of the wrinkle pattern, and therefore the grain
size.
wrinkles
scale ScaleV
color_map{
[0.00 color rgb SomeColor ]
[Thickness color rgb <0,0,0> ]
[1.00 color rgb <0,0,0> ]
}
#end
#declare ShowRings = on;
union
{
sphere
{
0, 1
texture
{
pigment { color rgb <0.6, 0.4, 0> }
finish { ambient 0.00 diffuse 1 brilliance 1 }
}
}
#if( ShowRings )
difference
{
cylinder
{
<0, -0.001, 0>, <0, 0.005, 0>, 3.68
}
cylinder
{
<0, -0.0011, 0>, <0, 0.0011, 0>, 1.75
}
hollow
pigment { rgbt 1 }
interior
{
media
{
//emission 1/500
scattering
{
1, 1/200
extinction 0.5 // 1.00 is also ok
}
density
{
cylindrical
density_map
{
/*
[0.00 rgbf <1.00, 0.80, 0.70, 0.20> ]
[0.10 rgbf <1.00, 0.80, 0.70, 0.20> ]
[0.10 rgbf <0.10, 0.30, 0.10, 0.50> ]
[0.17 rgbf <0.10, 0.30, 0.10, 0.50> ]
[0.17 rgbf <0.85, 0.89, 0.94, 0.30> ]
[0.18 rgbf <0.85, 0.89, 0.94, 0.30> ]
[0.18 rgbf <0.99, 0.93, 0.45, 0.40> ]
[0.26 rgbf <0.99, 0.93, 0.45, 0.40> ]
[0.26 rgbf <0.50, 0.23, 0.61, 0.50> ]
[0.36 rgbf <0.50, 0.23, 0.61, 0.50> ]
[0.36 rgbf <1.00, 0.92, 0.93, 0.30> ]
[0.45 rgbf <1.00, 0.92, 0.93, 0.30> ]
[0.45 rgbf <0.00, 0.00, 0.00, 1.00> ]
*/
[0.00 wrink( <0.00, 0.00, 0.00> * 0.00, 0.5, 10/10000) ]
#local I = 0;
#local MaxI = 200;
#local rs1 = seed(3240);
#while( I < MaxI )
// add bands of lighter and darker rings
#if( !mod(I,12) ) #local RandTrend = rand(rs1); #end
[0.00 + 0.45*I/MaxI
wrink(
<1.00 - 0.20*rand(rs1), 1.00 - 0.10*rand(rs1), 1.00 -
0.05*rand(rs1)> * (0.5 * rand(rs1) + 0.5) * RandTrend,
(0.25 * rand(rs1) + 0.5), (2+rand(rs1)*18)/10000
)
]
#local I = I + 1;
#end
[0.45 wrink( <0.00, 0.00, 0.00> * 0.00, 0, 4/10000) ]
}
scale 3.68
}
}
}
}
#end
rotate <15, 7, 1>
scale 10000
translate z*50000
translate y*-2500
}
light_source
{
<500000, 2500, 5000>
color rgb 1
}
camera
{
location <1.5, 1.5, 0.12>
look_at 1.5
angle 60
}
//--------------- end of code
HTH
-Reactor
P.S. Please be aware that this was rendered using the default gamma settings
under 3.7, and the brightness may vary, necessitating different scattering
settings.
Post a reply to this message
Attachments:
Download 'yagdar_news.bmp.dat' (2305 KB)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
Oops! I just realized I posted the bmp, not the png as I'd intended:
-Reactor
Post a reply to this message
Attachments:
Download 'yagdar_news.png' (420 KB)
Preview of image 'yagdar_news.png'
![yagdar_news.png](/povray.binaries.images/attachment/%3Cweb.4b0f20269422158050814e370%40news.povray.org%3E/yagdar_news.png?preview=1)
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Jörg 'Yadgar' Bleimann
Subject: Re: Probably I'm just in fact too stupid...
Date: 26 Nov 2009 19:57:32
Message: <4b0f23fc$1@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
High!
Now as I got at least the planet's shadow on the unlit side of the rings
correctly, I wonder how I could have different degrees of transparency
within the rings - like it is with the real Saturn. I tried adding a
second density, now with a density_map instead of a color_map - but the
only thing I observed were different colors, while the transparency
remained uniform across all ring bands.
What is the difference between a color_map and a density_map within a
density statement?
Could I achieve different transparencies by adding an absorption media
with its own density_map? What values of that density map would affect
transparency?
See you in Khyberspace!
Yadgar
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
=?ISO-8859-1?Q?J=F6rg_=27Yadgar=27_Bleimann?= <yaz### [at] gmx de> wrote:
> High!
>
> Now as I got at least the planet's shadow on the unlit side of the rings
> correctly, I wonder how I could have different degrees of transparency
> within the rings - like it is with the real Saturn. I tried adding a
> second density, now with a density_map instead of a color_map - but the
> only thing I observed were different colors, while the transparency
> remained uniform across all ring bands.
>
> What is the difference between a color_map and a density_map within a
> density statement?
>
> Could I achieve different transparencies by adding an absorption media
> with its own density_map? What values of that density map would affect
> transparency?
>
> See you in Khyberspace!
>
> Yadgar
The second density is very different from a second media - Read the
documentation section on multiple density V.S multiple media.
A density_map is comparable to a pigment_map - it allows density entries within
the map.
The level of transparency is more or less a combination between the distance
from black of the color vector and also the initial color vector for the media
type statement.
example:
emission color rgb <1,1,1>
density{ color rgb 0.01 }
is visually identical to this:
emission color rgb <1,1,1> * 0.01
density{ color rgb 1 }
HTH
-Reactor
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
From: Jörg 'Yadgar' Bleimann
Subject: Re: Probably I'm just in fact too stupid...
Date: 26 Nov 2009 20:33:27
Message: <4b0f2c67$1@news.povray.org>
|
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
High!
Jaime Vives Piqueres wrote:
> Sorry, I did a poor reading, and for the images I assumed too quickly
> your
> problem was just the ultra-bright media... trying with your code on the
> last
> message, I see that using extinction 0 gives the effect you are looking
> for.
> But I still don't know very well why it doesn't works with the default,
> teorically realistic, value of 1.
Yes, it did - but only with the test scene, not with the Saturn scene!
With the latter, when using extinction 0, not even the ring shadow is
visible, let alone the rings, at extinction 0.1 I can at least see the
shadow, but still no rings...
The code? Too long and complicated to be posted here, I fear...
See you in Khyberspace!
Yadgar
Post a reply to this message
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |
|
![](/i/fill.gif) |
| ![](/i/fill.gif) |
|
![](/i/fill.gif) |