|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi,
Please help me with this annoying problem.
I have created a union of a sphere ( at origin, radius 1,textured mainly
Red, but with Clear patches), a light_source, (also at origin
media_attenuation on), and a final sphere ( also at origin, radius 2}.
How do I add media to the larger sphere, so that the shafts of light
coming from within the smaller sphere are visible? I've tried following the
documentation, but the outer sphere is invisible.
Here's my code ( it's messy, I know).
Thanks in advance.
Andy C.
// ==== Standard POV-Ray Includes ====
#include "colors.inc" // Standard Color definitions
#include "textures.inc" // Standard Texture definitions
camera
{
location <0.0 , 4.0 ,-8.0>
look_at <0.0 , 0.0 , 0.0>
}
light_source
{
0*x
color red 1.0 green 1.0 blue 1.0
translate <-20, 40, -20>
media_attenuation off
}
union {
sphere {<0,0,0>,1 texture
pigment
spotted color_map {
[0 Red][.6 Red][.61 Clear][.9 Clear][.91 Red][1 Red]}
}
scale .2}
}
light_source
{ 0*x color red 1.0 green 1.0 blue 1.0
translate <0, 0, 0>
media_attenuation on}
// Add media
sphere {<0,0,0>,2 pigment {rgbf<1,1,1,1>}
interior {
media {
intervals 40
scattering {1, rgb 0.02}
samples 1, 10
confidence 0.9999
variance 1/1000
ratio 0.9
}
}
}
}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Only hollow objects can contain a media, i.e. you must add the "hollow"
keyword to the larger sphere. Check the manual for info about hollow and
solid objects.
Margus
Andrew Cocker wrote:
>
> Hi,
> Please help me with this annoying problem.
> I have created a union of a sphere ( at origin, radius 1,textured mainly
> Red, but with Clear patches), a light_source, (also at origin
> media_attenuation on), and a final sphere ( also at origin, radius 2}.
> How do I add media to the larger sphere, so that the shafts of light
> coming from within the smaller sphere are visible? I've tried following the
> documentation, but the outer sphere is invisible.
> Here's my code ( it's messy, I know).
>
> Thanks in advance.
>
> Andy C.
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Here's a revamped script:
/* Smoothness factor [1=grainy, 2=rough, 3=default, 4=smooth */
#declare G = 2;
#switch (G)
#case (1)
#declare Granularity = 2;
#break
#case (2)
#declare Granularity = 5;
#break
#case (3)
#declare Granularity = 10;
#break
#case (4)
#declare Granularity = 20;
#break
#end
camera
{
location <0.0 , 4.0 ,-8.0>
look_at <0.0 , 0.0 , 0.0>
}
light_source { 0*x
color red 1.0 green 1.0 blue 1.0
translate <-20, 40, -20>
media_attenuation off
}
#declare Red=color red 1;
#declare Clear=color rgbf 1;
union {
sphere {<0,0,0>,1
texture {
pigment {
spotted color_map {
[0 Red][.6 Red][.61 Clear][.9 Clear][.91 Red][1 Red]}
}
scale .2}
finish {ambient 0 diffuse .5} //tweaked the sphere
} //inner sphere
light_source
{ 0*x color rgb<3,2,1> //intense reddish light
fade_distance 1 fade_power 2 //cause falloff of light
//neither of these media_ statements are needed unless turning off
// media_attenuation on media_interaction on
}
// Add media
sphere {<0,0,0>,2
hollow on //always use this remember (things do not default to this!)
pigment {rgbf<1,1,1,1>}
interior {
media {
absorption <0,.5,1> //filter out all blue, half green
intervals Granularity //smoothness of media
samples 5, 10 //fair amount of sampling
confidence 0.95 //better than default 0.9
variance 1/150 //better than default 1/128
ratio 1 //ratio of spotlight lit to unlit region for
intervals/samples to calculate
scattering {1, rgb .1 extinction 0} //lower extinction brightens
}
}
} //outer sphere
} //union
Don't know why, but your texture and pigment statements were missing their
leading braces. Other than that, only real thing wrong was the hollow keyword
and a need for larger scattering color.
Message <3662ef6d.0@news.povray.org>, Andrew Cocker typed...
>
>Hi,
> Please help me with this annoying problem.
> I have created a union of a sphere ( at origin, radius 1,textured mainly
>Red, but with Clear patches), a light_source, (also at origin
>media_attenuation on), and a final sphere ( also at origin, radius 2}.
> How do I add media to the larger sphere, so that the shafts of light
>coming from within the smaller sphere are visible? I've tried following the
>documentation, but the outer sphere is invisible.
> Here's my code ( it's messy, I know).
>
>Thanks in advance.
>
>Andy C.
>
>// ==== Standard POV-Ray Includes ====
>#include "colors.inc" // Standard Color definitions
>#include "textures.inc" // Standard Texture definitions
>
>camera
>{
> location <0.0 , 4.0 ,-8.0>
> look_at <0.0 , 0.0 , 0.0>
>}
>
>light_source
>{
> 0*x
> color red 1.0 green 1.0 blue 1.0
> translate <-20, 40, -20>
>media_attenuation off
>}
>
>union {
>sphere {<0,0,0>,1 texture
>
> pigment
>
> spotted color_map {
> [0 Red][.6 Red][.61 Clear][.9 Clear][.91 Red][1 Red]}
> }
> scale .2}
>}
>
>light_source
>{ 0*x color red 1.0 green 1.0 blue 1.0
> translate <0, 0, 0>
>media_attenuation on}
>
>// Add media
>sphere {<0,0,0>,2 pigment {rgbf<1,1,1,1>}
> interior {
> media {
> intervals 40
> scattering {1, rgb 0.02}
> samples 1, 10
> confidence 0.9999
> variance 1/1000
> ratio 0.9
>}
> }
>}
>
>}
>
>
>
>
--
omniVERSE: beyond the universe
http://members.aol.com/inversez/POVring.html
=Bob
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Thanks Bob and Margus, I've got the hang of it now.
Andy C.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In article <3662ef6d.0@news.povray.org>, and### [at] acockerfreeservecouk
says...
>
>Hi,
> Please help me with this annoying problem.
>
... snip....
> spotted color_map {
> [0 Red][.6 Red][.61 Clear][.9 Clear][.91 Red][1 Red]}
> }
It's seems that your problem has been solved allready, but here's another
(of topic) little hint : To get a abrubt change (of color) in a colormap, or
any other mapping (texture_map, slope_map, etc) you may replace the above
piece of code with :
spotted
color_map {
[0.0 Red]
[0.6 Red]
[0.6 Clear]
[0.9 Clear]
[0.9 Red]
[1.0 Red]
}
assuming you don't want those small bands of smooth transitions.
Hope this helps somewhere,
Rick.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Thanks Rick. I've been using Pov 2.2 until recently, then I got online and
downloaded 3.1. I'm still trying to adjust, but I'm getting there.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I just happened to realize a slight mistake in a comment added to the example
scene I posted earlier, shown in part below.
media_interaction is on by default alright; however not so for
media_attenuation, which is needed for light falloff caused by fogs or
atmospheric effects, else it defaults to off.
Message <36646202.0@news.povray.org>, =Bob typed...
>
>
>light_source
>{ 0*x color rgb<3,2,1> //intense reddish light
> fade_distance 1 fade_power 2 //cause falloff of light
> //neither of these media_ statements are needed unless turning off
>// media_attenuation on media_interaction on
>}
>
--
omniVERSE: beyond the universe
http://members.aol.com/inversez/POVring.html
=Bob
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|