POV-Ray : Newsgroups : povray.binaries.images : Shadow on Earth? Server Time
26 Apr 2024 03:38:39 EDT (-0400)
  Shadow on Earth? (Message 1 to 10 of 14)  
Goto Latest 10 Messages Next 4 Messages >>>
From: Kuangy
Subject: Shadow on Earth?
Date: 20 Jul 2016 10:55:01
Message: <web.578f8f9966cab3a2e6aba5420@news.povray.org>
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>
}

// earth
sphere {
    <0, 0, 0>, 3.5
    texture {
        pigment {
      image_map {
                jpeg "textures/earth.jpg"
                map_type 1
            }
            scale 3.5
        }

        finish {
            ambient 1
            diffuse 3
        }

        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
       //scattering { 5 color rgb 0.01 eccentricity 0.56 }
       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.


Post a reply to this message


Attachments:
Download 'earth.png' (584 KB)

Preview of image 'earth.png'
earth.png


 

From: Bald Eagle
Subject: Re: Shadow on Earth?
Date: 20 Jul 2016 11:35:01
Message: <web.578f9a1080911a1eb488d9aa0@news.povray.org>
If your atmosphere is emissive - where would the shadow come from?

You've essentially made a hollow spherical light source surrounding your earth.


Post a reply to this message

From: clipka
Subject: Re: Shadow on Earth?
Date: 20 Jul 2016 11:56:31
Message: <578f9f2f$1@news.povray.org>
Am 20.07.2016 um 16:50 schrieb Kuangy:
> 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.

Since there is no object to cast any shadows in the scene, I presume
you're referring to the darkening of the night side.

> 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 a spotlight? Also, if you must use a spotlight, you probably want
to override the default settings for the `radius` and `falloff` parameters.

- `fade_power 10` is hopelessly unrealistic; use 2 instead.

- `fade_distance 100` is unrealistic; use the hypothetical radius of the
sun for this parameter instead, and increase the light source's nominal
brightness to counteract the resulting reduction in effective brightness
(using e.g. `color White * 100`).

> // earth
> sphere {
>     <0, 0, 0>, 3.5
>     texture {
>         pigment {
>             image_map {
>                 jpeg "textures/earth.jpg"
>                 map_type 1
>             }
>             scale 3.5

- No need to scale map_type 1 pigments -- in POV-Ray, image maps work
kind of like a projector, extending the pattern into 3D space to
infinity. With map_type 1 being a projection from the coordinate origin,
it is therefore invariant to scaling.

>         finish {
>             ambient 1
>             diffuse 3
>         }

- Presuming you're using POV-Ray 3.7, don't use `ambient`; use
`emission` instead.

- Actually, don't use `emission` -- you don't want the earth's surface
to glow, you want it to (diffusely) reflect sunlight.

- `diffuse 3` is hopelessly unrealistic. Presuming your image map uses
realistic brightness levels, anything above `diffuse 1` is physical
nonsense. Use `diffuse 1` if your texture only has a diffuse component;
otherwise (e.g. if you also add highlights and specular reflection for
any reason) use a value below 1.

> // atmosphere emission
...

>    interior {
>      media {
>        emission 0.5
>        //scattering { 5 color rgb 0.01 eccentricity 0.56 }

- Don't use `emission` -- you don't actually want the earth to glow, you
want it to scatter sunlight, so use `scattering`.

>        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

- I suspect that scaling factor could be wrong. Hard to tell though with
the comparatively complicated values in the density map.

> How can I solve this problem? I'd appreciate it if someone could help.

Your problem is most likely that your earth glows by itself, while your
sun's effective brightness at the given distance is too low to make any
significant difference.


> I'm not a native English speaker, so I'm very sorry for my poor English...

Doesn't sound poor at all.


Post a reply to this message

From: Stephen
Subject: Re: Shadow on Earth?
Date: 20 Jul 2016 12:02:08
Message: <578fa080$1@news.povray.org>
On 7/20/2016 3:50 PM, Kuangy wrote:
> 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.
>

[Snip]

> }
>
> 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!
>

Welcome and your English is fine.

You want to use scattering for your atmosphere.

Besides using an image map. You can add a normal map to give some depth 
and a spectacular map for the seas. You can find some here
http://planetpixelemporium.com/earth.html

The atmosphere is always tricky to do and I generally cheat and use a 
cone behind the planet in line with the camera.


Regards
     Stephen


Post a reply to this message

From: clipka
Subject: Re: Shadow on Earth?
Date: 20 Jul 2016 12:27:34
Message: <578fa676$1@news.povray.org>
Am 20.07.2016 um 18:02 schrieb Stephen:

> Besides using an image map. You can add a normal map to give some depth
> and a spectacular map for the seas. You can find some here
> http://planetpixelemporium.com/earth.html

You mean specular, right? ;)

> The atmosphere is always tricky to do and I generally cheat and use a
> cone behind the planet in line with the camera.

I find atmosphere comparatively easy -- as long as I don't try to add
clouds.


Post a reply to this message

From: Stephen
Subject: Re: Shadow on Earth?
Date: 20 Jul 2016 13:06:07
Message: <578faf7f$1@news.povray.org>
On 7/20/2016 5:27 PM, clipka wrote:
> Am 20.07.2016 um 18:02 schrieb Stephen:
>
>> Besides using an image map. You can add a normal map to give some depth
>> and a spectacular map for the seas. You can find some here
>> http://planetpixelemporium.com/earth.html
>
> You mean specular, right? ;)
>

Who rattled your cage? :P

>> The atmosphere is always tricky to do and I generally cheat and use a
>> cone behind the planet in line with the camera.
>
> I find atmosphere comparatively easy --

Yes you do, don't you. :(

> as long as I don't try to add
> clouds.
>

Clouds are problematic especially in an animation. The simplest way 
would be to use an image map.


-- 

Regards
     Stephen


Post a reply to this message

From: Kuangy
Subject: Re: Shadow on Earth?
Date: 20 Jul 2016 13:15:01
Message: <web.578fb05180911a1ee6aba5420@news.povray.org>
Mr. clipka,

Thank you for your detailed and useful advice.
Here's the new code I rewrote:

// sunlight
light_source {
 <100, 0, 40>
 color White*100
 parallel
 fade_distance 10
 fade_power 2
 point_at <0, 0, 0>
}

// Earth
sphere {
    <0, 0, 0>, 3.5
    texture {
        pigment {
      image_map {
                jpeg "textures/earth.jpg"
                map_type 1
            }
        }

        finish {
            emission 0.001
            diffuse 0.5
        }

        rotate y*-135
        rotate x*35
    }
    // rotation
    rotate <0, 360*clock, 0>
}

// Earth clouds
difference {
 sphere { <0, 0, 0>, 3.51 }
 sphere { <0, 0, 0>, 3.5 }

 material {
  texture {
   pigment {
    image_map{
     png "textures/earth_cloud.png"
     map_type 1
    }
   }
  }
 }

 hollow on
}

// Earth scattering
difference {
  sphere { <0, 0, 0>, 3.54 }
  sphere { <0, 0, 0>, 3.5 }

  material {
   texture{
   pigment { rgbt 1 }
   }

   interior {
        media {
             scattering {
        5
        color White
        eccentricity 0.56
             }

          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 3.54
          }
      }
   }
  }

  hollow on
}


And here I attach the brand new rendered image, with clouds added on the
surface.
Thank you very much for your advice.


Post a reply to this message


Attachments:
Download 'earth.png' (663 KB)

Preview of image 'earth.png'
earth.png


 

From: clipka
Subject: Re: Shadow on Earth?
Date: 20 Jul 2016 13:18:54
Message: <578fb27e$1@news.povray.org>
Am 20.07.2016 um 19:06 schrieb Stephen:
> On 7/20/2016 5:27 PM, clipka wrote:
>> Am 20.07.2016 um 18:02 schrieb Stephen:
>>
>>> Besides using an image map. You can add a normal map to give some depth
>>> and a spectacular map for the seas. You can find some here
>>> http://planetpixelemporium.com/earth.html
>>
>> You mean specular, right? ;)
>>
> 
> Who rattled your cage? :P

OOoooh -- careful! This Code Monkey could accidently type a few lines of
code that make POV-Ray crash specifically on /your/ computer. So stop
talking, human, and hand over the bananas! ;)

>>> The atmosphere is always tricky to do and I generally cheat and use a
>>> cone behind the planet in line with the camera.
>>
>> I find atmosphere comparatively easy --
> 
> Yes you do, don't you. :(
> 
>> as long as I don't try to add
>> clouds.
>>
> 
> Clouds are problematic especially in an animation. The simplest way
> would be to use an image map.

Tried that, and found it looking unconvincing. The best thing I've
managed to come up with so far was a combination of an image map and a
spherical function to create media with a cloud-ish density distribution.

It would be cool if we had a set of cloud image maps epresenting cloud
densities at different altitudes, but I guess such a thing doesn't exist
(yet).


Post a reply to this message

From: Doctor John
Subject: Re: Shadow on Earth?
Date: 20 Jul 2016 13:20:13
Message: <578fb2cd@news.povray.org>
On 20/07/16 18:09, Kuangy wrote:
> Mr. clipka,
> 
> Thank you for your detailed and useful advice.
> Here's the new code I rewrote:
> 
<snip>
> 
> And here I attach the brand new rendered image, with clouds added on the
> surface.
> Thank you very much for your advice.
> 
 Looking good, Kuangy. If you intend to use this as an animation, don't
forget to rotate the clouds (possibly at a slightly different rate to
the earth).

John
-- 
It's not about bravery.
It's about doing what I need to do to win


Post a reply to this message

From: clipka
Subject: Re: Shadow on Earth?
Date: 20 Jul 2016 13:21:54
Message: <578fb332$1@news.povray.org>
Am 20.07.2016 um 19:09 schrieb Kuangy:

> And here I attach the brand new rendered image, with clouds added on the
> surface.

Hey, wow -- that actually looks really good.


Post a reply to this message

Goto Latest 10 Messages Next 4 Messages >>>

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.