The next step...

The place to discuss creating, porting and modifying Celestia's source code.
chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 10 months
Location: Seattle, Washington, USA

Post #21by chris » 14.12.2005, 18:11

Cham wrote:Oh, and if only there was bumpmap on asteroids too ! Is this too hard to implement ?


No, it's not too hard. Most of the code is in place already in fact--tangent generation for cmod files, bump mapping shaders. Another item on my todo list.

--Chris

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

Post #22by chris » 14.12.2005, 18:36

Malenfant wrote:One more thing I just remembered: a more efficient way to render asteroids. It'd be nice to be able to show all 200,000 or so asteroids that are known but right now doing that using a huge ssc file grinds Celestia to a halt.

Efficiently rendering 200,000 asteroids is a tougher problem than rendering stars. Most stars in Celestia don't move at all, and the ones that do move are confined to orbits that are very small relative to the average distance between stars. These characteristics make the octree an effective structure for fast O(log N) culling of stars that aren't visible.

A conventional spatial subdivision octree is poorly suited for culling solar system object. Right now, Celestia computes from orbital parameters the position of every single object in a solar system. There's a fair amount of computation even for simple Keplerian orbits. We could add some simpler tests to check whether we need to bother with calculating the orbit. Checking the distance of the camera from the orbital plane is very fast and would allow avoiding orbit calculations for most asteroids. An additional test could check the projected position in the orbital plane against the aphelion and perihelion distances. Still, neither of these extra checks really solve the problem--we're still stucking checking every single object in the solar system. It might be possible to use an octree (or some other subdivision method) to efficiently search some sort of orbit parameter space for potentially visible objects.

If you want to display markers or labels or some other indicator for all the asteroids, you're pretty much stuck doing all the orbital calculations. Is this what you're interested in doing?

Malenfant wrote:If Fridger can import thousands of galaxies and binaries in to Celestia there must surely be a way to import the asteroids too, maybe as a binary-format file?


It's easy to get the data from the Minor Planet Center. If you want all 200,000 asteroids, a binary version of the ssc format is quite important. The memory footprint of the object that Celestia uses for a solar system body might be too large for such a massive catalog though.

--Chris

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

Post #23by Cham » 14.12.2005, 18:39

Chris,

there's another thing that could be very usefull : Orbit precession.
"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!"

Malenfant
Posts: 1412
Joined: 24.08.2005
With us: 19 years 3 months

Post #24by Malenfant » 14.12.2005, 18:56

chris wrote:A conventional spatial subdivision octree is poorly suited for culling solar system object. Right now, Celestia computes from orbital parameters the position of every single object in a solar system.

Really? That seems a little excessive. Is there not a way to have Celestia compute just the objects that are selected or are actually visible from the observer location? I mean, if you're in orbit around Neptune and have no other objects selected then all you're going to want to calculate are the orbits for Neptune and its entourage, and the planets that are visible from Neptune. You wouldn't need to calculate Jupiter's moons unless you zoom in to Jupiter so they become visible, or unless you set the View Options to show moon orbits. I don't see why we need to calculate EVERYTHING if we're not even looking at it - just calculate the orbits of the things that are selected. Or is there a reason why this wouldn't work?

It might be possible to use an octree (or some other subdivision method) to efficiently search some sort of orbit parameter space for potentially visible objects.

I guess this is what I just suggested then :).


If you want to display markers or labels or some other indicator for all the asteroids, you're pretty much stuck doing all the orbital calculations. Is this what you're interested in doing?


Well what I was suggesting was to be able to see all the asteroids, I guess with the labels on, so yes... I suppose what we need to to is streamline the orbit calculations as much as possible somehow?
My Celestia page: Spica system, planetary magnitudes script, updated demo.cel, Quad system

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

Post #25by Cham » 14.12.2005, 19:30

Oh, Chris, one more thing that could be improved a lot : shadows of planet on its moon. It's crude ! The planet's shadow doesn't match the opposite side of the moon, if ambient light isn't set to pitch black.
"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!"

ajtribick
Developer
Posts: 1855
Joined: 11.08.2003
With us: 21 years 3 months

Post #26by ajtribick » 14.12.2005, 19:40

Allowing catalogue references in .stc files would be nice, both to be able to define a star with a catalogue reference, and to be able to use catalogue references in the OrbitBarycenter field, neither of which work at the moment.

BlindedByTheLight
Posts: 485
Joined: 19.03.2005
With us: 19 years 8 months
Location: Los Angeles, CA

Post #27by BlindedByTheLight » 14.12.2005, 20:07

dirkpitt wrote:I've updated the version number for the OS X Celestia to 1.4.0pre8, so the OS X version should be good to go straight from CVS. Compiling takes ages on my G3 iMac - give me back my PowerBook!


Yep, worked like a charm! I even was able to apply that GOTO spaceship start-time patch. Is this the "real" pre8... or should I wait for a few more CVS changes that seem to be trickling in since 8 was declared?

Steven
Steven Binder, Mac OS X 10.4.10

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

Post #28by chris » 14.12.2005, 20:20

Cham wrote:Oh, Chris, one more thing that could be improved a lot : shadows of planet on its moon. It's crude ! The planet's shadow doesn't match the opposite side of the moon, if ambient light isn't set to pitch black.


They look right if you use the OpenGL 2.0 render path. I don't know that I'll bother to fix it for legacy render paths.

--Chris

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

Post #29by Cham » 14.12.2005, 20:23

chris wrote:
Cham wrote:Oh, Chris, one more thing that could be improved a lot : shadows of planet on its moon. It's crude ! The planet's shadow doesn't match the opposite side of the moon, if ambient light isn't set to pitch black.

They look right if you use the OpenGL 2.0 render path. I don't know that I'll bother to fix it for legacy render paths.

--Chris


Many systems can't run OGL 2.0. In my opinion, it should be fixed.
"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!"

Avatar
dirkpitt
Developer
Posts: 674
Joined: 24.10.2004
With us: 20 years 1 month

Post #30by dirkpitt » 14.12.2005, 21:29

BlindedByTheLight wrote:Yep, worked like a charm! I even was able to apply that GOTO spaceship start-time patch. Is this the "real" pre8... or should I wait for a few more CVS changes that seem to be trickling in since 8 was declared?


I'm still hoping the goto patch will make it's way into 1.4.0 (Chris seems to think it's ok), but in the mean time CVS = pre8.

Incidentally the OS X version includes ElChristou's French localization. As there was some disagreement I chose not to include ElChristou's new splash screen yet. There seems to be a consensus at least that the splash screen ought to be a borderless window but I haven't gotten around to coding that yet.

Avatar
dirkpitt
Developer
Posts: 674
Joined: 24.10.2004
With us: 20 years 1 month

Post #31by dirkpitt » 14.12.2005, 21:34

Cham wrote:Many systems can't run OGL 2.0. In my opinion, it should be fixed.


This is unfortunately true even for recent OS X systems running Tiger 10.4.3. The GL 2.0 render path is now selectable in many cases, but the rendering may be incorrect. I've already filed a bug report with Apple.

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

Post #32by chris » 14.12.2005, 22:13

dirkpitt wrote:
Cham wrote:Many systems can't run OGL 2.0. In my opinion, it should be fixed.

This is unfortunately true even for recent OS X systems running Tiger 10.4.3. The GL 2.0 render path is now selectable in many cases, but the rendering may be incorrect. I've already filed a bug report with Apple.


I'm interested in doing whatever it takes to get the GL 2.0 render path working on OS X and Linux. If there are bugs in Celestia's shaders, I'll fix them, and if there are bugs in the OpenGL implementation, I'll try and find workarounds.

Unfortunately, I haven't the time or the interest to try and make eclipse shadows work properly with ambient lighting on the other render paths. Once you've used a high level shading language on DX9 class hardware, it's hard to go back. I'm not saying that I'll abandon the old render paths, but a fair amount of my effort to improve the graphics on Celestia will require full vertex and pixel shader support--Geforce FX, GeForce 6xxx, GeForce 7xxx, Radeon 9500+, or Radeon X700+.

--Chris

BlindedByTheLight
Posts: 485
Joined: 19.03.2005
With us: 19 years 8 months
Location: Los Angeles, CA

Post #33by BlindedByTheLight » 14.12.2005, 22:26

chris wrote:Once you've used a high level shading language on DX9 class hardware, it's hard to go back


Isn' there an unwritten rule that statements like that are supposed to rhyme? :)

But I'm really posting because I was thinking of buying a new graphics card (I have a Mac, dual 2.0, OS 10.4.3). Any recommendations in light of this Open GL 2.0 support issue? Or are those two conversations apples and oranges?

Steven "I Try But I Really Have No F**king Idea What You're All Talking About" Binder
Steven Binder, Mac OS X 10.4.10

Topic author
ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 9 months

Post #34by ElChristou » 15.12.2005, 01:19

dirkpitt wrote:...As there was some disagreement I chose not to include ElChristou's new splash screen yet. There seems to be a consensus at least that the splash screen ought to be a borderless window but I haven't gotten around to coding that yet...


If needed I do new spash (bigger/smaller), even a simplefy version of the Control panel/goto/time without background if necessary...
Image

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

Post #35by Cham » 15.12.2005, 02:41

Chris,

there's another very important thing to add in the next version of Celestia : a fixed orientation of spacecraft relative to a defined object. Also, a model should keep its orientation relative to its elliptical trajectory. Currently, models cannot have a good orientation along an elliptical orbit.
"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!"

Avatar
t00fri
Developer
Posts: 8772
Joined: 29.03.2002
Age: 22
With us: 22 years 8 months
Location: Hamburg, Germany

Post #36by t00fri » 15.12.2005, 09:39

chris wrote:
Malenfant wrote:One more thing I just remembered: a more efficient way to render asteroids. It'd be nice to be able to show all 200,000 or so asteroids that are known but right now doing that using a huge ssc file grinds Celestia to a halt.

Efficiently rendering 200,000 asteroids is a tougher problem than rendering stars.

....

Definitely
A conventional spatial subdivision octree is poorly suited for culling solar system object.
...

It might be possible to use an octree (or some other subdivision method) to efficiently search some sort of orbit parameter space for potentially visible objects.
...
--Chris


I have been thinking precisely along these lines for a while: to devise a map for octree subdivision, where regular orbits would appear as ~ stationary "points"...

There are a few respective possibilities that appear familiar to a theoretical physicist's mind... ;-)

Bye Fridger

JamesFox

Some minor things i'd like.

Post #37by JamesFox » 16.12.2005, 02:46

Besides user-definable perihelion precession (already mentioned), one thing I would like to see would be the ability to define new categories of objects, or failing that, the ability to specify the color of an object's orbit (in the ssc file). Also, currently it not straightforward to set the internal date to a date outside a fairly narrow range.

BlindedByTheLight
Posts: 485
Joined: 19.03.2005
With us: 19 years 8 months
Location: Los Angeles, CA

Post #38by BlindedByTheLight » 16.12.2005, 02:52

ElC? I have lost count... is this a feature request thread or not?

If so, I got an easy one... how about hard-coding Selden's awesome graticules into Celestia for a quick-toggle reference.

We really don't have enough keyboard short-cuts... :)
Steven Binder, Mac OS X 10.4.10

Topic author
ElChristou
Developer
Posts: 3776
Joined: 04.02.2005
With us: 19 years 9 months

Post #39by ElChristou » 16.12.2005, 11:21

BlindedByTheLight wrote:ElC? I have lost count... is this a feature request thread or not?...


...seems it become one...
(yes the Selden's graticules or other reference system would be nice)
Image

Avatar
fsgregs
Posts: 1307
Joined: 07.10.2002
With us: 22 years 1 month
Location: Manassas, VA

Post #40by fsgregs » 16.12.2005, 13:49

Hi Chris. I envy your climb up the glacier. I am a glacier enthusiast myself.

If this is a features thread of sorts, I would like to see shadows apply to spacecraft, so that when they pass through the terminator and enter planet shadow, no sunlight will strike them.

:)

Also, since the code is already written and is in use in some versions of 1.4.0, is it possible to finally add the ability to reload textures or models on the fly, without having to close and reopen Celestia?

Frank


Return to “Development”