New object class: diffuse

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: 22 years 9 months
Location: Seattle, Washington, USA

New object class: diffuse

Post #1by chris » 05.04.2008, 22:36

Cham reported a bug with the new planetshine code that I think is best resolved by introducing a new object class. The problem occurs in add-ons with objects like accretion disks and dust clouds. Celestia has no way to tell that these things aren't really planets, and thus tries to compute the effect of planetshine from them. Since these objects tend to be extremely large and surround stars and other planets, the simplified lighting calculations that Celestia uses for planetshine will not work for them. Thus, I propose a new object class called 'diffuse' for accretion disks, dust clouds, volcanic and geyser plumes, etc.

In order to run in real-time, Celestia has to use simplified equations that work well for physically plausible solar systems, but not necessarily for an arbitrary arrangement of geometry. Celestia isn't expecting to see 'planets' that are several AU across and intersecting other planets. The diffuse object class would give add-on creators a way to tell Celestia that these big clouds aren't in fact planets and that they should be disregarded when computing planetshine (and probably also for shadowing, when shadows for non-ellipsoidal objects are implemented.)

--Chris

Avatar
Cham M
Posts: 4324
Joined: 14.01.2004
Age: 60
With us: 20 years 10 months
Location: Montreal

Re: New object class: diffuse

Post #2by Cham » 05.04.2008, 22:45

Just to tell everybody that I agree totally with this proposition ! :D :wink:

Can we agree that a magnetic field is also a "diffuse" object ?
"Well! I've often seen a cat without a grin", thought Alice; "but a grin without a cat! It's the most curious thing I ever saw in all my life!"

buggs_moran
Posts: 835
Joined: 27.09.2004
With us: 20 years 1 month
Location: Massachusetts, USA

Re: New object class: diffuse

Post #3by buggs_moran » 06.04.2008, 02:48

Sounds good but should you use a different word? Or even, perhaps a boolean since we may have other objects that are not "diffuse" that we may not want to receive planetshine. For instance adding a boolean to the ssc like,

Planetshine True

or something always false so we aren't changing every object in every ssc.

NoPlanetshine True

I would think specularity and diffusion are material properties more than whole object properties. And since one cmod can contain many "materials" you might want some of those parts to receive the planetshine and some not. In a cmod I have the option to turn down/off specularity, thereby making a part more reflectively diffuse... I could be getting this all wrong though...
Homebrew:
WinXP Pro SP2
Asus A7N8X-E Deluxe
AMD Athlon XP 3000/333 2.16 GHz
1 GB Crucial RAM
80 GB WD SATA drive
ATI AIW 9600XT 128M

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

Re: New object class: diffuse

Post #4by chris » 06.04.2008, 16:49

buggs_moran wrote:Sounds good but should you use a different word? Or even, perhaps a boolean since we may have other objects that are not "diffuse" that we may not want to receive planetshine. For instance adding a boolean to the ssc like,

Planetshine True

or something always false so we aren't changing every object in every ssc.

NoPlanetshine True

I would think specularity and diffusion are material properties more than whole object properties. And since one cmod can contain many "materials" you might want some of those parts to receive the planetshine and some not. In a cmod I have the option to turn down/off specularity, thereby making a part more reflectively diffuse... I could be getting this all wrong though...

Regarding the name confusion: I was using the word diffuse to refer not to diffuse (i.e. non view dependent) lighting, but rather to a state of matter: gaseous and spread out. That confusion is an argument against using diffuse as the name for the new object classification. Perhaps 'gaseous'? Personally, I still favor diffuse.

Planetshine could still be a separate property; setting the class to diffuse just affects the default value of the property. There's precedent for this already: invisible objects aren't clickable by default, component and surface feature aren't visible as point by default, etc. Here's the table, including the proposed diffuse class:

Code: Select all

               Planet  Moon  Spacecraft  Component  Invisible  Diffuse
Visible         yes     Yes    Yes         Yes        No         Yes
VisibleAsPoint  yes     Yes    Yes         No         No         No
Clickable       yes     Yes    Yes         Yes        No         No(?)
Planetshine     yes     Yes    No          No         No         No


The idea of these object class defaults is to free add-on creators from having to think about the different flags. The add-on author chooses the class that matches the type of object they're creating and doesn't need to understand what 'VisibleAsPoint' means. But, experienced authors could still override the default if they saw need to.

To slightly simplify the use of classes, we could even add some new SSC syntax that would allow definitions like this:

Code: Select all

"Solar Panel" "Sol/Earth/ISS"
{
    Class "component"
    Mesh "panel.cmod"
    ...
}


to be written as:

Code: Select all

Component "Solar Panel" "Sol/Earth/ISS"
{
    Mesh "panel.cmod"
    ...
}


This is consistent with how ReferencePoint works now, and is also more in line with dsc file syntax.

--Chris

Avatar
Chuft-Captain
Posts: 1779
Joined: 18.12.2005
With us: 18 years 11 months

Re: New object class: diffuse

Post #5by Chuft-Captain » 07.04.2008, 12:58

Chris,

As you're discussing new Classes and Properties here, is it still your intention to extend the Clickable property to add the ClickTranslucent behaviour discussed a while ago.
The Clickable property would need to be ternary valued rather than binary (true,false).

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

CATALOG SYNTAX HIGHLIGHTING TOOLS LAGRANGE POINTS

buggs_moran
Posts: 835
Joined: 27.09.2004
With us: 20 years 1 month
Location: Massachusetts, USA

Re: New object class: diffuse

Post #6by buggs_moran » 07.04.2008, 16:03

Diffuse as in gaseous makes perfect sense...
Homebrew:

WinXP Pro SP2

Asus A7N8X-E Deluxe

AMD Athlon XP 3000/333 2.16 GHz

1 GB Crucial RAM

80 GB WD SATA drive

ATI AIW 9600XT 128M

duds26
Posts: 328
Joined: 05.02.2007
Age: 34
With us: 17 years 9 months
Location: Europe

Re: New object class: diffuse

Post #7by duds26 » 10.04.2008, 16:36

Will nebulae and nebulae billboards also be diffuse?

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

Re: New object class: diffuse

Post #8by chris » 10.04.2008, 16:40

duds26 wrote:Will nebulae and nebulae billboards also be diffuse?

This change isn't relevant for nebula; it only affects ssc objects.

--Chris

duds26
Posts: 328
Joined: 05.02.2007
Age: 34
With us: 17 years 9 months
Location: Europe

Re: New object class: diffuse

Post #9by duds26 » 12.04.2008, 10:07

OK

Mayby dusty is a good name because of the confusion that might occur with diffuse.

happywoman50
Posts: 1
Joined: 31.07.2008
With us: 16 years 3 months

Re: New object class: diffuse

Post #10by happywoman50 » 01.08.2008, 10:45

duds26 said
Mayby dusty is a good name because of the confusion that might occur with diffuse.
I think there is a sense to use the name “dusty” for the new object class.
Ann, you can visit my home page here


Return to “Ideas & News”