Shadows and reflections

Discussion forum for Celestia developers; topics may only be started by members of the developers group, but anyone can post replies.
Topic author
chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 17 years 8 months
Location: Seattle, Washington, USA

Shadows and reflections

Post #1by chris » 20.08.2010, 06:50

Jason-1 oceanography mission shown with shadows and reflections. The model is from the NASA 3D resources site:

http://www.nasa.gov/multimedia/3d_resources/models.html
(converted used Autodesk's FBX Converter)

jason1.jpg


--Chris

Avatar
Chuft-Captain
Posts: 1771
Joined: 18.12.2005
With us: 13 years 9 months

Re: Post your Celestia pictures!

Post #2by Chuft-Captain » 20.08.2010, 07:51

chris wrote:Jason-1 oceanography mission shown with shadows and reflections. The model is from the NASA 3D resources site:

http://www.nasa.gov/multimedia/3d_resources/models.html
(converted used Autodesk's FBX Converter)

jason1.jpg


--Chris
Reflections as well as shadows! That's a nice surprise! Is this in SVN? :)
"Is a planetary surface the right place for an expanding technological civilization?"
-- Gerard K. O'Neill (1969)

CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS

Avatar
Hungry4info
Posts: 1133
Joined: 11.09.2005
With us: 14 years 1 month
Location: Indiana, United States

Re: Post your Celestia pictures!

Post #3by Hungry4info » 20.08.2010, 09:28

That is beyond WOW.!! 8O
Current Setup:
Windows 7 64 bit. Celestia 1.6.0.
AMD Athlon Processor, 1.6 Ghz, 3 Gb RAM
ATI Radeon HD 3200 Graphics

Avatar
selden
Developer
Posts: 10069
Joined: 04.09.2002
With us: 17 years 1 month
Location: NY, USA

Re: Post your Celestia pictures!

Post #4by selden » 20.08.2010, 11:15

Chris,

Could you provide the same sceen drawn by Celestia v1.6.0 to show just how much better the new algorithms look?
Selden

Topic author
chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 17 years 8 months
Location: Seattle, Washington, USA

Re: Post your Celestia pictures!

Post #5by chris » 20.08.2010, 16:46

selden wrote:Chris,

Could you provide the same sceen drawn by Celestia v1.6.0 to show just how much better the new algorithms look?

Here are some comparisons with ordinary rendering, shadows only, and finally with both shadows and reflections:

jason-normal.png

jason-shadow.png

jason-reflect.png


There's nothing too cutting edge here: the code just renders the scene six times into the faces of a 512x512 cube map, and that cube map is used for per-pixel reflections. It's a brute force way of doing reflections, but the results are fairly high quality. Note that there are no reflections of the spacecraft geometry. Only background objects are drawn into the cube map. This both saves rendering time and prevents artifacts. If you want a complex object to show reflections of its own geometry, then you need something like proper ray tracing.

This code is not ready to go into the Celestia SVN repository right now, unfortunately.

--Chris

Avatar
Chuft-Captain
Posts: 1771
Joined: 18.12.2005
With us: 13 years 9 months

Re: Shadows and reflections

Post #6by Chuft-Captain » 21.08.2010, 13:46

Q1: How do you determine what's a "background" object? Is a background object defined as "any object other than the object the reflections fall on"?
ie. If the solar panels were to implemented as a separate mesh and positioned in SSC, would they then reflect the "background" spacecraft body? (and visa-versa)

Q2: How are you determining how reflective each object is? I'm assuming this is determined by the surface properties defined in the modeling tool...eg. Animator

CC
"Is a planetary surface the right place for an expanding technological civilization?"
-- Gerard K. O'Neill (1969)

CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS

Reiko
Posts: 1119
Joined: 05.10.2006
Age: 36
With us: 13 years
Location: Out there...

Re: Shadows and reflections

Post #7by Reiko » 21.08.2010, 18:23

So this means meshes will now be able to cast shadows? :D

Topic author
chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 17 years 8 months
Location: Seattle, Washington, USA

Re: Shadows and reflections

Post #8by chris » 22.08.2010, 17:08

Chuft-Captain wrote:Q1: How do you determine what's a "background" object? Is a background object defined as "any object other than the object the reflections fall on"?
ie. If the solar panels were to implemented as a separate mesh and positioned in SSC, would they then reflect the "background" spacecraft body? (and visa-versa)

Background objects are those located at a distance which is large relative to the size of the reflecting object(s). The background must appear very similar as seen from any reflecting point, otherwise the reflection effect won't look right. So for a spacecraft, the solar panels don't meet this requirement. But a spacecraft like ISS could be the background for a smaller object such as an astronaut's helmet:
http://cache.boston.com/universal/site_ ... 44-011.jpg
There would be slight inaccuracies since the scale difference isn't huge, but it would certainly be good enough to fool the eye.

Q2: How are you determining how reflective each object is? I'm assuming this is determined by the surface properties defined in the modeling tool...eg. Animator

I'm loading Wavefront OBJ files. The material definitions for OBJ files allow specifying whether or not a material is reflective (illumination model 3)
http://local.wasp.uwa.edu.au/~pbourke/dataformats/mtl/
I've actually changed the illumination model from the one described in the linked spec: the reflected color is modulated by the specular color and/or texture, which is key to making the gold foil look metallic instead of like glossy plastic.

--Chris

Avatar
Chuft-Captain
Posts: 1771
Joined: 18.12.2005
With us: 13 years 9 months

Re: Shadows and reflections

Post #9by Chuft-Captain » 23.08.2010, 08:25

chris wrote:
Chuft-Captain wrote:Q1: How do you determine what's a "background" object? Is a background object defined as "any object other than the object the reflections fall on"?
ie. If the solar panels were to implemented as a separate mesh and positioned in SSC, would they then reflect the "background" spacecraft body? (and visa-versa)
Background objects are those located at a distance which is large relative to the size of the reflecting object(s). The background must appear very similar as seen from any reflecting point, otherwise the reflection effect won't look right. So for a spacecraft, the solar panels don't meet this requirement.
.. but would they still reflect? ... (even if not very accurately) ... or are you hard-coding in some distance limits?

chris wrote:But a spacecraft like ISS could be the background for a smaller object such as an astronaut's helmet:
http://cache.boston.com/universal/site_ ... 44-011.jpg
Nice pic!
How about a 27km long cylinder as the background for 3 x 20km mirrors! (in close proximity) :wink:
... I think I'd be willing to put up with a few distorted reflections in this circumstance. :)

chris wrote:
Q2: How are you determining how reflective each object is? I'm assuming this is determined by the surface properties defined in the modeling tool...eg. Animator
I'm loading Wavefront OBJ files. The material definitions for OBJ files allow specifying whether or not a material is reflective (illumination model 3)
http://local.wasp.uwa.edu.au/~pbourke/dataformats/mtl/
I've actually changed the illumination model from the one described in the linked spec: the reflected color is modulated by the specular color and/or texture, which is key to making the gold foil look metallic instead of like glossy plastic.
Does this mean we'll have to convert our 3DS's and CMOD's to OBJ files in order to implement reflections?
"Is a planetary surface the right place for an expanding technological civilization?"
-- Gerard K. O'Neill (1969)

CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS


Return to “Ideas & News”

Who is online

Users browsing this forum: 10 guests