|
![](/i/fill.gif) |
Am 07.09.2010 15:41, schrieb D103:
> light_source { LiPo White }
>
> disc { 0, y, 100 pigment { cylindrical pigment_map { [ 0 rgb 1 ] [ 0.5 rgb<1,
> 1, 0.5> ] [ 1 rgbt 1 ] }
> } finish { ambient 1 } rotate z*90 translate LiPo }
Some things to note here:
* rgb<1,1,0.5> is not saturated yellow; you do have blue within this.
* The finish sets ambient to 1, but does not explicitly force the other
components to 0, so as a result they will be left to their defaults.
As a result, in the region where yellow colour should show, the disc
gets rgb<1,1,0.5> /plus/ a (guesstimated) rgb<1,1,0.5>*0.6 diffuse
illumination from the light source, /plus/ some radiosity illumination
coming back from the scene, maybe another rgb<1,1,0.5>*0.3, /plus/
possibly some specular highlight from the light source, /plus/ some
light scattered from the atmosphere (which, by the way, is mainly
blue!), giving a total of maybe rgb<1,1,0.5>*2 + blue 0.5 =
rgb<2,2,1.5>. As the color is clipped to a maximum of 1.0 by most output
formats (namely by all except HDR and EXR), you get a value of around
rgb<1,1,1>, which is white as white can be.
* At the rim, the disc fades to fully-transparent white, rather than
fully-transparent yellow. As a result, the colours further off the
center will be more pale than you'll probably expect.
* You got the cylindrical pattern wrong way round: 0.0 (where you placed
white) is at a distance of 1.0, while 1.0 (where you placed full
transparency) is at the very center.
* You use a 100-unit-radius disc, yet the pattern already yields 0.0 at
a distance of 1 unit or more.
So to fix this up, you should...
* set up a disc of 1 unit radius, apply a pigment, /then/ scale it to
the desired size and position it; e.g.:
disc { 0, y, 1
pigment { ... } finish { ... }
scale 100
rotate ...
translate ...
}
* fix the pigment_map indices:
pigment_map {
[ 0 ...(transparent)... ]
[ 0.5 ...(yellow)... ]
[ 1.0 ...(white)... ]
}
* Change your yellow and transparent colors:
- If you're using scattering media for the atmosphere, theoretically the
scattering media should take care of giving your sun a yellowish hue
(that's what the "extinction" parameter is for; set it to 1.0), so your
sun should fade from opaque white to transparent white:
pigment_map {
[ 0 rgb 1 transmit 1 ]
[ 0.5 rgb 1 ]
[ 1.0 rgb 1 ]
}
- If you're using a sky sphere for the atmosphere, you will need to toy
around with your yellow a bit, but make sure you use the same colour,
except with added transparency, to fade to, e.g.:
pigment_map {
[ 0 rgb <1,1,0.5> transmit 1 ]
[ 0.5 rgb <1,1,0.5> ]
[ 1.0 rgb 1 ]
}
* explicitly specify finish components you don't want:
finish {
ambient 1 // (use "ambient 0 emission 1" for current 3.7 betas)
diffuse 0
specular 0
}
I think that should get you back on the tracks with the disc approach.
> sphere { LiPo, 100 hollow pigment { Clear } interior { media { scattering { 1, 1
> } density { spherical density_map { [ 0 rgb 1 ] [ 0.25 rgbt<1, 1, 0.5, 0.5> ] [
> 1 rgbt 1 ] } } } } }
Your media approach suffers from similar issues as stated above (plus
it's more difficult to control even when it works).
Post a reply to this message
|
![](/i/fill.gif) |