|
|
> I'm now working hard on my assignment for my CG class at college, in which I'm
> trying to make a realistic earth animation.
> I used "difference" to create something like atmosphere right outside earth, and
> in which I also used emission for making the atmosphere glow. And this is where
> I'm facing a problem.
>
> When I set a light_source from a distance, there is no shadow cast on earth.
> Here I paste the source code:
>
> light_source {
> <100, 0, 50>
> color White
> spotlight
> fade_distance 100
> fade_power 10
> point_at <0, 0, 0>
> }
Why use a spotlight?
Why use fading?
Given the distance from the Sun to the Earth, you are better using a
parallel light without any fading. Think about it, the Sun-Earth
distance is over 10000000 times the Earth's radius.
The difference in the illumination over the moon's orbit 's diameter is
effectively negligible.
fade_power ONLY realistic value is 2.
fade_sidtance should be about the appearent diameter of a light's diameter.
If the light becomes to dark, you can increase it's intensity
arbitrarily by as much as you need.
Try this one:
light_source{<100, 0, 50>*10 rgb 2 parallel}
>
> // earth
> sphere {
> <0, 0, 0>, 3.5
> texture {
> pigment {
> image_map {
> jpeg "textures/earth.jpg"
> map_type 1
> }
> scale 3.5
This scalling is useless.
> }
>
> finish {
> ambient 1
> diffuse 3
Beter use ambient 0, diffuse 0.6 here.
ambient 1 mean that your earth is actualy glowing.
diffuse 3 mean that it give off 3 times as much light as it receive from
the Sun.
> }
>
> rotate y*-135
> rotate x*35
> }
> // rotation
> rotate <0, 360*clock, 0>
> }
>
> // atmosphere emission
> difference {
> sphere { <0, 0, 0>, 3.54 }
> sphere { <0, 0, 0>, 3.0 }
>
> material {
> texture{
> pigment { rgbt 1 }
> }
>
> interior {
> media {
> emission 0.5
A GLOWING atmosphere? Last time I checked, Earth's atmosphere scatters
the light and don't emit any.
> //scattering { 5 color rgb 0.01 eccentricity 0.56 }
The proper model is scattering{4 rgb 0.01}
> density {
> spherical density_map {
> [ 0.0 rgb 0.0 ]
> [ 0.5294*0.25e-6 rgb <0.02, 0.05, 0.2>*0.07 ]
> [ 0.5294*0.4e-6 rgb <0.02, 0.07, 0.3>*0.32 ]
> [ 0.5294*0.5e-6 rgb <0.08, 0.18, 0.4>*0.5 ]
> [ 0.5412*0.6e-6 rgb <0.08, 0.18, 0.4>*0.9 ]
> [ 0.5471*0.65e-6 rgb <0.08, 0.18, 0.4>*1.5 ]
> [ 0.5471*0.675e-6 rgb <0.08, 0.18, 0.4>*4.5 ]
> [ 0.5471*0.71e-6 rgb <0.08, 0.18, 0.4>*12 ]
> }
> scale 100
> }
> }
> }
> }
>
> hollow on
> }
>
> And below I attach the rendered result for now.
>
> How can I solve this problem? I'd appreciate it if someone could help.
> I'm not a native English speaker, so I'm very sorry for my poor English... I
> really wish I didn't use impolite expressions!
>
> Thanks.
>
Alain
Post a reply to this message
|
|