Page 1 of 1

Alternate photometric functions

Posted: 29.07.2006, 20:50
by chris
One of the irritating shortcomings of Celestia has been it's use of the Lambert model to calculate the illumination for the surfaces of all planets. This simple function gives fraction of reflected light at a point on a surface as:

f(w_i, w_o) = cos(theta_i)

where w_i is the direction of the incoming light and the outgoing direction, and theta_i is the angle between the surface normal and incoming light. The function doesn't depend upon the outgoing light direction. Very few surfaces are purely Lambertian. One obviously non-Lambertian surface is the Moon--even though it's nearly spherical, it appears as a flat disc in the sky. The function above says that if the Moon is Lambertian, the apparent brightness of the Moon should fall off near the edges--although this is how Celestia currently draws the Moon, a quick look at a full Moon will show that it's not correct.

The Lommel-Seeliger model is frequently used in planetary photometry. It's slightly more complex than the Lambert model:

f(w_i, w_o) = cos(theta_i) / (cos(theta_o) + (cos(theta_i))

And here's a series of images from Celestia to demonstrate the difference. There are two sets of three images showing the moon at phases of 0, 90, and 140 degrees.

Lambert model:
Image

Lommel-Seeliger model:
Image

Note that the full Moon looks (incorrectly) like a ball with the Lambert model, but like a flat disc with Lommel-Seeliger. Also notice how the crescent Lambertian moon almost disappears, but the Lommel-Seeliger model produces a beautiful, bright sliver.

The Lambertian model is more accurate for the gas giants, where limb darkening is apparent in telescope and spacecraft images. But, the dustiness of the surface of the Moon gives it strong non-Lambertian characteristics. I'm not sure yet how to expose alternate photometric models in Celestia, or exactly which ones to use. Other candidates for lunar-type surfaces are the Oren-Nayar and Hapke models. I've already experimented with Oren-Nayar; the Hapke model seems the most realistic model, but it's complex enough that using it in Celestia might hurt performance even on high-end graphics card.

--Chris

Posted: 29.07.2006, 21:18
by buggs_moran
Chris,

Couldn't it be something you define and called in an ssc, having numbers for each possibility...

i.e.

Code: Select all

AltSurface "8kalbjpg" "Sol/Saturn/Enceladus"

{
Texture "enceladus8kalb.jpg"
SurfaceIllumination 2  # Lommel-Seeliger
}


Posted: 30.07.2006, 01:28
by ElChristou
Is there any datas out there on the reflectivity of the most important bodies of the Solar System (planets, moons, asteroids)? it would be nice to adapt the model depending on a constant for each bodies defined in the ssc...

Posted: 30.07.2006, 01:34
by bdm
Another way to express this would be to define the surface characteristics of the planet in the SSC file, and then the actual modelling to use is stored in celestia.cfg.

Here is an example setting:

Code: Select all

"Planet" "Star"
{
    Radius 4500
    Surface Solid # can also be Liquid or Gas
    ... etc ...
}


Then the celestia.cfg file would have settings that look like this:

Code: Select all

#------------------------------------------------------------------------
# Surface modelling settings
# This defines how Celestia models the illumination.
# Allowed values are:
# * Lambert (best for gas giants)
# * Lommel-Seeliger (best for solid bodies)
# * Oren-Nayar
# * Hapke (more accurate but slower)
#------------------------------------------------------------------------
SolidSurface Lommel-Seeliger
LiquidSurface Lommel-Seeliger
GasSurface Lambert

I can see the benefit in offering several different rendering models. If someone wants to use Celestia in real time with lots of frames per second, the models that generate better performance can be employed. If someone wants to use Celestia as a rendering engine without regard for performance, they could use the more accurate models.

Controlling them in the celestia.cfg file will provide one location for the settings, and the user doesn't need to change these settings in every SSC file.

Posted: 30.07.2006, 02:58
by chris
ElChristou wrote:Is there any datas out there on the reflectivity of the most important bodies of the Solar System (planets, moons, asteroids)? it would be nice to adapt the model depending on a constant for each bodies defined in the ssc...


I don't know of any such data . . . The literature on planetary photometry seems to have some models for the Moon, and some general statements about which models are appropriate for other bodies, but that's about it.

It seems there's some use of a 'lunar-Lambert' model, which is a weighted sum of Lambert and Lommel-Seeliger:

f(w_i, w_o) = (1 - k) * cos(theta_i) + 2 * k * cos(theta_i) / (cos(theta_o) + cos(theta_i))

So, k = 0 gives a purely Lambertian surface (appropriate for gas giants or a smooth-surfaced body) and k = 1 gives the normal Lommel-Seeliger function (appropriate for the Moon and other very dusty bodies.) I have yet to experiment with it, but I like the idea of being able to specify the parameter k in an ssc file. But, before settling on this, I'd like to find out what objects have surfaces that actually fit this model, particularly the intermediate values.

--Chris

Re: Alternate photometric functions

Posted: 30.07.2006, 03:03
by PlutonianEmpire
chris wrote:The Lambertian model is more accurate for the gas giants, where limb darkening is apparent in telescope and spacecraft images. But, the dustiness of the surface of the Moon gives it strong non-Lambertian characteristics.

my 2 cents:

use the Lommel-Seeliger model for celestia; apply black haze settings for the gas giants to simulate the lambertian model. see if that works. :)

Posted: 30.07.2006, 17:17
by Malenfant
Well, *this* will bring me back, at least for this (I spent a couple of years doing photomety stuff in my PhD) :). About freakin' time, is all I can say- Lommel-Seeliger is a must for the Moon!

As for literature, look for stuff by Bonnie Buratti (she did a lot of work on outer planet satellite photometry), Paul Helfenstein (his thesis is a must), and ... damn, there's another guy. I want to say Richard Greenberg but I don't think it's him. Did a lot of work on Io. Argh, I can't remember his name... I'll see if I can dig up the paper because it was really rather good for photometric functions of the planets and moons. You may also want to talk to Bjorn Jonnson (another 3D program author), he's done a lot of work on implementing correct photometry (see http://www.mmedia.is/~bjj/3dtest/index.html ).

I've never heard of "oren-nayar" in planetary circles - I know of Lambert, Minnaert (neither of which are particularly realistic), Buratti (the combined LS-Lambert one), Lommel-Seeliger (for the moon) and Hapke (which is the whole shebang).

You got any plans to put atmospheric scattering in too? So maybe we can get Ashen Light effects around Venus or Titan?

Posted: 30.07.2006, 17:25
by Malenfant
Aha! Al McEwen! That's who I was thinking of! I found the paper, grab it from here if you want it! (and let me know when you get it so I can remove it from the website).

McEwen photometry paper (1 MB PDF)

Posted: 31.07.2006, 06:53
by chris
Malenfant wrote:Aha! Al McEwen! That's who I was thinking of! I found the paper, grab it from here if you want it! (and let me know when you get it so I can remove it from the website).

McEwen photometry paper (1 MB PDF)


I was hoping that this discussion might draw you back again :) Thanks for the links . . . I've seen Bjorn Jonsson's work with different photometric functions, and I ended up making some of the same adjustments he did to make them look right on a computer monitor, namely normalization and gamma correction. You'll notice that in the Lommel-Seeliger images I showed, I omitted the the normalization and thus the Moon at 0 degrees phase appears rather dim.

The Oren-Nayar model comes from the field of computer graphics, not planetary photometry. It models rough surfaces as a distribution of v-shaped grooves (one of a number of 'microfacet' models used in computer graphics.) The model has been experimentally checked against actual rough surfaces such as clay and plaster. As with Lommel-Seeliger, Hapke, etc., objects rendered with the Oren-Nayar model don't exhibit any limb darkening. Here's the original paper, if you're interested:

http://www1.cs.columbia.edu/CAVE/public ... RAPH94.pdf

I am also working on implementing a model of atmospheric sampling. I should have some images here soon . . . Since Celestia must render planets in real time, I will have to make some compromises, however. For one thing, I will only consider direct scattering. The scattering integrals can't be computed analytically for non-constant density functions. And, I'll be forced to use a low number of samples when approximating with a summation of discrete samples. I still expect to visually good results however.

--Chris


--Chris

Posted: 31.07.2006, 06:56
by chris
Malenfant wrote:Aha! Al McEwen! That's who I was thinking of! I found the paper, grab it from here if you want it! (and let me know when you get it so I can remove it from the website).

McEwen photometry paper (1 MB PDF)


Got it! Thanks.

--Chris

Posted: 31.07.2006, 07:41
by Malenfant
chris wrote:
Malenfant wrote:Aha! Al McEwen! That's who I was thinking of! I found the paper, grab it from here if you want it! (and let me know when you get it so I can remove it from the website).

McEwen photometry paper (1 MB PDF)

Got it! Thanks.

--Chris


I'll leave it up for another 24 hours in case anyone else wants it...

Posted: 02.08.2006, 04:46
by MKruer
Chris, cant you implement the different illumination based upon plant size. I think we can safely assume that planets above say 4 earth radii would be sub jahovian.

Posted: 02.08.2006, 15:05
by Malenfant
MKruer wrote:Chris, cant you implement the different illumination based upon plant size. I think we can safely assume that planets above say 4 earth radii would be sub jahovian.


It's nothing to do with size, it's to do with the properties of the surface material. Atmospheres will have their own photometric functions, depending on what's in them (and if there's things like haze, aerosols etc).

Posted: 02.08.2006, 17:18
by ajtribick
Out of interest, what would be better out of Lambert and Lommel-Seeliger for Earth?

Posted: 02.08.2006, 17:54
by chris
chaos syndrome wrote:Out of interest, what would be better out of Lambert and Lommel-Seeliger for Earth?


Planets with significant atmosphere's exhibit limb darkening, which means that Lambert would be a better model than Lommel-Seeliger, but still not adequate. I'm working on a much better model of atmospheric scattering now--see the topic 'Beautiful accident' for an early example (albeit with the Mie term way too high.)

Ignoring the atmosphere, my sense is that the Earth's surface is so varied that no single model would work that well. Parts are probably better modeled with Lommel-Seeliger, other parts with Lambert, and the oceans of course have a strong specular term.

Currently I'm leaning toward use using the Buratti (lunar-Lambert) model which is essentially a linear combination of the Lambert and Lommel-Seeliger models. It can be calculated quickly (compared to Hapke) and provides a single fairly intuitive parameter to adjust the appearance of the planet. Consty: in the McEwen paper, there's a table of Hapke parameters for various solar system bodies. I was trying to figure out how to translate these to the weighting term in the Buratti model. Is there a meaningful correspondence with one of the Hapke parameters?

--Chris

Posted: 02.08.2006, 21:52
by Malenfant
It probably is more sensible to use the Buratti function (ie combined lambert/LS) for Celestia, it's a nice, elegant, easy to calculate little thing. Unlike Hapke, the equation of which which takes up about three lines on a portrait-oriented letter-size paper in 12 point font :). I don't think there's a direct correspondence between Buratti and Hapke though, the former is basically a blunt approximation of the latter.

Posted: 03.08.2006, 01:59
by MKruer
Malenfant wrote:
MKruer wrote:Chris, cant you implement the different illumination based upon plant size. I think we can safely assume that planets above say 4 earth radii would be sub jahovian.

It's nothing to do with size, it's to do with the properties of the surface material. Atmospheres will have their own photometric functions, depending on what's in them (and if there's things like haze, aerosols etc).


I know that, what I was getting at was that you can assume that planets above a certain size should only be gas giants will think atmospheres. But this is probably irrelevant now anyway