Lighting question - and lighting anomally(?)

Software: Away3D 3.x

csighence, Newbie
Posted: 01 August 2011 04:49 PM   Total Posts: 2

Hi, I am fairly new to Flash, and 3D and very new to away3D.  I am tasked with creating a simulation to be used in a course that allows a student to view the Earth in various parts of the orbit and how sunlight falling on the Earth varies throughout the year (so they can see how we get our seasons). I started with the great tutorials on the flashmagazine site to create a fairly good simulation.  But, using PointLight3D it seems that my Earth sphere is not being illuminated exactly half as it would in reality.  Instead it is being illuminated somewhat less than half.

I developed the project in Flash CS5.5 I would be happy to share the fla if anyone would like to review.  Here is a link to the simulation. 

Earth Sun Relationships

From the default view the illumination issue is apparent. It becomes more apparent if you set the Earth orbit to one of the equinoxes, and adjust Tilt to +90 and -90.  At the equinox the terminator (boundary between illuminated half and night side of Earth) should go exactly thru both poles but it does not.

I have played with angles, lighting, tilts, and a variety of other variables but have not succeeded.

The source is at
Earth Sun Source

Thanks in advance for any pointers, ideas, or suggestions!

   

Stephen Hopkins, Sr. Member
Posted: 02 August 2011 12:32 AM   Total Posts: 110   [ # 1 ]

The lighting looks fine - the sphere half lit with equinox and 90 tilt. I guess I’m not seeing the problem?

 Signature 

http://www-scf.usc.edu/~shopkins

   

Avatar
Alexander Seifert, Moderator
Posted: 02 August 2011 08:50 AM   Total Posts: 129   [ # 2 ]

csighence,

there are two things that come to mind.

1. If you are using PointLight3D, then the you’d need an infinite distance of the earth to the sun to have the terminator run exactly through both poles. This is since the light source is a point, and if you drew tangents to earth from that point, you’d always have a triangle with the angle alpha between those tangents never reaching 0, thus never having the tangents touch the actual poles of earth.
(Do I make sense? I have no idea how to express math in English wink)

The only reason why this isn’t the case in reality is, so I imagine, that the sun is much bigger than earth, which results in the tangents going from the surface of the sun to the surface of the earth touch earth even beyond the poles. See, http://upload.wikimedia.org/wikipedia/commons/thumb/2/2e/Diagram_of_umbra,_penumbra_&_antumbra.png/800px-Diagram_of_umbra,_penumbra_&_antumbra.png

Therefore, wouldn’t a simple DirectionalLight3D (with parallel light rays) be more accurate?

2. Are you using Away3D Broomstick (v4) or Awa3D 3.6?

Cheers!
Alex

 Signature 
signature_image

http://www.deltastrike.org

   

csighence, Newbie
Posted: 02 August 2011 03:56 PM   Total Posts: 2   [ # 3 ]

Appreciate the replies.  Alex, I am using Away3d v3.6.  I will try your suggestion and use the directional light.  Your explanation makes perfect sense.  In the real world the Sun is not a point source and the Sun/Earth distance is so vast compared to the size of the Earth that both poles can be illuminated at the Spring and Autumn equinox.  I hope the directional light will allow me to emulate that as no matter what I do with PointLight I cannot seem to get it close enough.  It may cause a student to answer a question incorrectly based on the lighting in the current version.

My hats off to the Away3D team for an amazing library. 

Thank you!

   

csighence, Newbie
Posted: 05 August 2011 07:01 PM   Total Posts: 2   [ # 4 ]

Hi All,
I was able to get back to this project and per Alex’s suggestion tried the DirectionalLight3D and it made the difference.  I think the simulation is more realistic now.

I just need to fix the clock, work on the lighting for the DirectionalLight (it is to dim), and also finish up the user interface.

Thanks for all who took the time to read, and the replies.

   

Gralcio, Newbie
Posted: 08 August 2011 03:35 AM   Total Posts: 6   [ # 5 ]

You can also cheat a bit and use multiple point lights to form your star (spread them on its surface).

   

Avatar
Alexander Seifert, Moderator
Posted: 08 August 2011 08:55 AM   Total Posts: 129   [ # 6 ]

Spam bot?

Great work, csighence!

Cheers!
Alex

 Signature 
signature_image

http://www.deltastrike.org

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X