|
|
On 28.11.2017 17:22, Alain wrote:
>> I have started to work on your scene, to adapt it even more.
>>
>> Yes, you are right - changing the atmospheric colors does not lead to
>> straight, expected results, but to unexpectable new colors. I believe
>> (but I have no clue about media and density), that the reason for this
>> color problem lays with the fact, that you specify the colors within the
>> density map. I wonder, if there is a way to use neutral shades for the
>> density map, and move the color map into the pigment statement right
>> below the coordinates of the cloud layer.
>
> Yes.
> Some of the medias in your sample code have neutral colour_map.
> If the media have a global colour, and a non-neutral colour_map, then
> the rgb values are multiplied together : media rgb<1, 0.5, 0.2> and
> colour_map entry rgb<0.3, 1, 0.1> give rgb<0.3, 0.5, 0.02>
>
> It should be noted that with scattering and absorbing media, you get
> shadows. That imply some amount of self shadowing. If the media is not
> of a neutral tint, that mean that the remaining get illuminated by a
> tinted light of the complimentary colour.
> A blue scattering or absorbing media's shadow will be yellow.
> It can get really complicated when you have multiple scattering and
> absorbing medias as each one will cause some shadowing on all the others.
> You don't want the container to have any colour as it will make it visible.
>
>
>> I wonder, if I can use these two suns as light sources instead of a
>> traditional light_source, when filling them with media?
>
> Yes. Use looks_like as follow :
> // Big red Sun
> light_source{
> // translate < 80.0, -0.0, 35.0 >*33.0
> }
> // Small blue Sun
> light_source{
> }
>
> Remove the other light.
> You now have two coloured shadows with fuzzy edged.
> Adjust the brightness ot the lights as needed. The may be way to bright
> as they are now.
>
>>
>> ------------------
>>
>>
>>
>> ---
>> http://www.avg.com
>>
> Those anti-virus tags mean nothing as some virus imitate them.
>
> When you have multiple medias:
> Work on one untill it's correct.
> Comment it out.
> Work on the next one.
> Repeat untill you have set all medias.
> Activate two medias.
> Tweak them a little if needed.
> Add the others one by one making some small adjustments as needed.
I actually tried this morning on my own some versions, but with these
look-alike suns I did not get a satisfying result (though I got nice
colors): the suns were almost not visible anymore.
I therefore decided to continue to use the traditional light_source. I
however try to make the suns getting a glow (seems to be the same like
"looks-alike"), but still failing with that.
I want, that the small sun is light blue or white inside but emitts a
purple-blue glow around it. The large sun is dim red and supposed to
have a red glow around it, too. I just fail currently.
Glow Example:
http://www.joshuarenglish.com/cyclopedia/lookslike.html
Here is my current scene code, please see also the 2nd attached image.
---------------------
#version 3.8;
#declare MyRadiosity = off;
global_settings
{
assumed_gamma 1.4
#if(MyRadiosity=on)
radiosity { media on }
#end
}
#default
{
finish { ambient 0.0 diffuse 1.0 }
}
//------------------------------------------------------------------------
#include "colors.inc"
#include "textures.inc"
#include "glass.inc"
#include "metals.inc"
#include "golds.inc"
//------------------------------------------------------------------------
camera
{
/*ultra_wide_angle*/ //angle 20
location < -35.0 , 11.0 , 0.0 >
//right x*image_width/image_height // not needed for v3.8
look_at < 0.0 , 5.0 , 0.0 >
}
// sky -------------------------------------------------------------------
background { color rgb 0.0 }
disc
{
0.0, y, 1.0, 0.0
hollow on
no_shadow
pigment { rgb < 0.5, 0.75, 1.0 > }
scale 100.0
translate y*100.0
}
// ground -----------------------------------------------------------------
box
{
< -1.0, -1.0, -1.0 > < 1.0, 1.0, 1.0 >
pigment { color rgb 1.0 }
scale < 555.0, 497.0, 555.0 >
translate -y*494.0
}
//--------------------------------------------------------------------------
// Clouds
#local Scale = 5.0;
#declare Clouds = density
{
ripples // controls the cloud formation
color_map
{
[ 0.33 rgb 10.0 ]
[ 0.67 rgb 100.0 ]
}
scale < 3.0, 1.0, 10.0 >*0.5
warp { turbulence < 2.5, 1.0, 1.6 > }
rotate 45.0*y
}
//cloud layer:
box
{
< -1.0, -1.0, -1.0 > < 1.0, 1.0, 1.0 >
pigment { rgbt 1.0 }
hollow
interior
{
media
{
samples 20
absorption < 3.0, 4.0, 0.5 >*1.0/(Scale*100.0)
emission < 1.0, 1.0, 1.0 >*0.5/(Scale*100.0)
scattering
{
1
< 0.5, 0.75, 1.5 >*3.0/(Scale*100.0)
extinction 0.5
}
density
{
boxed
density_map
{
[ 0.000 rgb 0.0 ]
[ 0.001 Clouds scale 1.0/100.0 ]
}
}
}
}
scale Scale*100.0
translate -y*494.0
}
//-------------------------------------------------------------
//atmosphere:
sphere
{
< 0.0, 0.0, 0.0 >, 1.0
pigment { rgbt 1.0 }
hollow
interior
{
media
{
samples 20
absorption 0.5
scattering
{
5
< 1.25, 1.0, 1.5 >*2.0/Scale
extinction 0.67
eccentricity 0.2
}
density
{
gradient y
color_map
{
/*
[ 0.00 rgb 1.0 ] //base ground fog
[ 0.10 rgb < 9.0, 0.3, 0.10 > ] //top ground fog
[ 0.30 rgb < 0.9, 0.3, 0.10 > ] //top ground fog
[ 0.50 rgb < 0.5, 0.1, 0.09 >*0.100 ] //base atmospheric haze
[ 0.67 rgb < 0.1, 0.2, 0.90 >*0.100 ] //top atmospheric haze
[ 1.00 rgb < 0.1, 0.3, 0.90 >*0.001 ] //top atmospheric haze
*/
[ 0.00 rgb < 1.0, 1.0, 1.00 >*1.000 ] //base ground fog
[ 0.10 rgb < 3.0, 0.3, 0.10 >*1.000 ] //top ground fog
[ 0.30 rgb < 0.3, 0.3, 0.10 >*1.000 ] //top ground fog
[ 0.50 rgb < 0.5, 0.1, 0.09 >*0.100 ] //base atmospheric haze
[ 0.67 rgb < 0.3, 0.7, 1.00 >*0.100 ] //top atmospheric haze
[ 1.00 rgb < 0.3, 0.7, 1.00 >*0.001 ] //top atmospheric haze
}
rotate -x*15.0
warp { spherical }
scale Scale*2.0*y
}
}
}
scale Scale*111.0
translate -y*535.0
}
//-------------------------------------------------------------
// Planet:
union
{
sphere
{
< 0.0, 0.0, 0.0 > 7.0
pigment
{
gradient y
color_map
{
[ 0.00 rgb < 1.0, 1.0, 1.0 >*0.05 ]
[ 0.10 rgb < 1.0, 1.0, 1.0 >*0.05 ]
[ 0.12 rgb < 1.0, 1.0, 1.0 >*0.05 ]
[ 0.15 rgb < 0.80392, 0.66275, 0.47059 >*0.05 ]
[ 0.20 rgb < 0.80392, 0.66275, 0.47059 >*0.05 ]
[ 0.22 rgb < 0.63922, 0.55686, 0.31373 >*0.05 ]
[ 0.27 rgb < 0.63922, 0.55686, 0.31373 >*0.05 ]
[ 0.40 rgb < 0.47451, 0.30980, 0.14118 >*0.05 ]
[ 0.43 rgb < 0.47451, 0.30980, 0.14118 >*0.05 ]
[ 0.45 rgb < 0.20392, 0.24314, 0.41176 >*0.05 ]
[ 0.55 rgb < 0.20392, 0.24314, 0.41176 >*0.05 ]
[ 0.57 rgb < 0.47451, 0.30980, 0.14118 >*0.05 ]
[ 0.60 rgb < 0.47451, 0.30980, 0.14118 >*0.05 ]
[ 0.73 rgb < 0.63922, 0.55686, 0.31373 >*0.05 ]
[ 0.78 rgb < 0.63922, 0.55686, 0.31373 >*0.05 ]
[ 0.80 rgb < 0.80392, 0.66275, 0.47059 >*0.05 ]
[ 0.85 rgb < 0.80392, 0.66275, 0.47059 >*0.05 ]
[ 0.88 rgb < 1.0, 1.0, 1.0 >*0.05 ]
[ 0.90 rgb < 1.0, 1.0, 1.0 >*0.05 ]
[ 1.00 rgb < 1.0, 1.0, 1.0 >*0.05 ]
}
turbulence 0.3
translate < 0.0, -7.0, 0.0 >
scale 14.0
}
}
difference
{
cylinder { < 0.0, -0.00001, 0.0 > < 0.0, 0.00001, 0.0 > 16.0 }
cylinder { < 0.0, -0.00002, 0.0 > < 0.0, 0.00002, 0.0 > 10.0 }
pigment
{
onion
color_map
{
[ 0.00 rgbt < 0.47451, 0.30980, 0.14118, 0.7 > ]
[ 0.60 rgbt < 0.47451, 0.30980, 0.14118, 0.7 > ]
[ 0.62 rgbt < 0.47451, 0.30980, 0.14118, 0.7 > ]
[ 0.63 rgbt < 0.80392, 0.66275, 0.47059, 0.7 > ]
[ 0.66 rgbt < 0.80392, 0.66275, 0.47059, 0.7 > ]
[ 0.67 rgbt < 0.63922, 0.55686, 0.31373, 0.7 > ]
[ 0.71 rgbt < 0.63922, 0.55686, 0.31373, 0.7 > ]
[ 0.73 rgbt < 0.47451, 0.30980, 0.14118, 0.7 > ]
[ 0.76 rgbt < 0.47451, 0.30980, 0.14118, 0.7 > ]
[ 0.80 rgbt < 0.63922, 0.55686, 0.31373, 0.7 > ]
[ 0.81 rgbt < 0.63922, 0.55686, 0.31373, 0.7 > ]
[ 0.82 rgbt < 0.47451, 0.30980, 0.14118, 0.7 > ]
[ 0.83 rgbt < 0.47451, 0.30980, 0.14118, 0.7 > ]
[ 0.86 rgbt < 0.63922, 0.55686, 0.31373, 0.7 > ]
[ 0.88 rgbt < 0.63922, 0.55686, 0.31373, 0.7 > ]
[ 0.89 rgbt < 0.80392, 0.66275, 0.47059, 0.7 > ]
[ 0.91 rgbt < 0.80392, 0.66275, 0.47059, 0.7 > ]
[ 0.97 rgbt < 0.63922, 0.55686, 0.31373, 0.7 > ]
[ 0.99 rgbt < 0.63922, 0.55686, 0.31373, 0.7 > ]
[ 1.00 rgbt < 0.63922, 0.55686, 0.31373, 0.7 > ]
}
scale 16.0
}
finish { crand 0.01 emission 0.1 }
}
scale 250.0
rotate < -10.0, -20.0, 50.0 >
translate < 160.0, 50.0, -100.0 >*33.0
}
// Big Sun
#declare SunLarge = union
{
/*sphere
{
< 0.0, 0.0, 0.0 > 1.0
pigment
{
gradient y
color_map
{
[ 0.00 rgb < 0.0, 0.0, 0.0 > ]
[ 0.50 rgb < 1.5, 0.0, 0.1 > ]
[ 1.00 rgb < 3.0, 0.0, 0.1 >*5.0 ]
}
translate < 0.0, -0.5, 0.0 >
scale 2.0
}
finish { emission 1.0 }
scale 12.0
} */
sphere
{
< 0.0, 0.0, 0.0 > 1.0
hollow
no_shadow
pigment { rgbt 1 }
interior
{
media
{
emission 1/12.0
density
{
spherical
density_map
{
[ 0.0 rgb < 0.0, 0.0, 0.0 >*1.0 ]
[ 0.5 rgb < 3.0, 0.0, 0.1 >*0.5 ]
[ 1.0 rgb < 1.0, 1.0, 1.0 >*1.0 ]
}
}
samples 1,1
intervals 1
confidence .1 // quite fast settings
method 3
}
}
scale 12.0
}
scale 66.0
translate < 160.0, 0.0, 78.0 >*33.0
}
// Small Sun
#declare SunSmall = union
{ /*
sphere
{
< 0.0, 0.0, 0.0 > 1.0
pigment { color rgb < 0.23529, 0.11373, 0.46275 >*1.0 }
finish { emission 0.0 }
} */
sphere
{
< 0.0, 0.0, 0.0 > 1.0
hollow
no_shadow
pigment { rgbt 1 }
interior
{
media
{
emission 1/1.0
density
{
spherical
density_map
{
[ 0.0 rgb 0.0 ]
[ 0.5 rgb < 0.23529, 0.11373, 0.46275 >*0.5 ]
[ 1.0 rgb < 0.23529, 0.11373, 0.46275 >*0.5 ]
}
}
samples 1,1
intervals 1
confidence .1 // quite fast settings
method 3
}
}
scale 1.0
}
scale 66.0
translate < 160.0, 25.0, 112.0 >*33.0
}
object { SunLarge }
//object { SunSmall }
light_source
{
-z*9999.0//< 50, 100, -250 >*10e4
color 1.0 * 1.4//< 1.0, 0.62353, 0.46667 >*2
rotate < 20.0, 240.0, 0.0 > // altitude, azimuth, tilt
}
#declare light_object = sphere
{
< 160.0, 25.0, 112.0 >*33.0 100.0
pigment { rgbf < 0,0,1,1 >*2 }
finish { specular 5 metallic}
}
light_source
{
< 160.0, 25.0, 112.0 >*33.0
color rgb < 0,0,1> *2
looks_like { light_object }
}
/*
light_source
{
0,
color 0.5 *< 2.0, 7.0, 9.0 > // comment color out?
// area_light <12*33,0,0>,<0,12*33,0>,4,4 circular orient adaptive 0
looks_like { SunLarge }
translate < 160.0, 30.0, 98.0 >*33.0
}
light_source
{
0,
color 0.5 *< 0.9, 0.6, 1.0 > // comment color out?
// area_light <33,0,0>,<0,33,0>,3,3 circular orient adaptive 0
looks_like { SunSmall }
translate < 160.0, 45.0, 132.0 >*33.0
}
*/
//-------------------------------------------------------------
//artefact:
#local S=seed(4132);
union
{
#for (It,1.0,8.0,1.0)
#local xR=rand(S);
#local yR=rand(S);
#local zR=rand(S);
#local xR2=rand(S);
#local yR2=rand(S);
#local zR2=rand(S);
box
{
0.0, 1.0
scale < 1.0+xR, 8.0+yR*4, 1.0+zR >/2.0
pigment
{
checker
color rgb 0.1 color rgb 0.9 scale 0.5
}
translate (-< xR*20.0,0.0,zR*20.0 > + <xR2*40.0, 0.0, zR2*40.0 >)/2.0
}
#end
rotate y*90.0
translate < -20.0, 2.0, 5.0 >
}
Post a reply to this message
Attachments:
Download 'sl - cloud cities - omniverse - 2 look_alike suns.jpg' (138 KB)
Download 'sl - cloud cities - omniverse - glow.jpg' (92 KB)
Preview of image 'sl - cloud cities - omniverse - 2 look_alike suns.jpg'
Preview of image 'sl - cloud cities - omniverse - glow.jpg'
|
|