making stars invisible

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
BillC
Posts: 19
Joined: 09.07.2003
With us: 21 years 4 months
Location: Woonsocket RI

making stars invisible

Post #1by BillC » 11.07.2003, 13:31

Hi!

I was fooling around with the idea of making a star "invisible" so I could use it as a barycenter for a larger system. I edited stars.dat and changed the magnitude of a star so it became effectively invisible. This worked fine (except when you "go to" - the star's radius is based on its luminosity, so you end up parked about 1 meter from the location!) Planets continued to orbit and be lit by the star, which I expected. Here's my question: one of the planets has a moon, and the moon just disappeared when I made the star invisible. The orbit was still there, I could select and mark the moon, follow its rotation, etc., but the sphere was invisible. Why is that?
BillC

granthutchison
Developer
Posts: 1863
Joined: 21.11.2002
With us: 22 years

Post #2by granthutchison » 11.07.2003, 13:45

I think this may have something to do with the way Celestia decides whether to render objects or not. Based on albedo, radius and illumination, there's a decision made at some distance from the object that it's invisible, and therefore doesn't require rendering. By cranking down the brightness of your star, you've perhaps dropped the moon below the render level even at close quarters, while the planet is big enough (and therefore bright enough) to trigger rendering.
If I'm right, you may find the planet blinks out as you pull back from it. You should also be able to make the planet disappear by setting its radius to equal the absent moon's, and the moon reappear by increasing its radius.
That said, I don't see a way you can "fix" this problem. Perhaps Chris could be persuaded to allow star definitions to include the "invisible" class of object - it would allow barycentric systems to be built more easily.

Grant

Topic author
BillC
Posts: 19
Joined: 09.07.2003
With us: 21 years 4 months
Location: Woonsocket RI

Post #3by BillC » 12.07.2003, 15:57

Hi Grant!

Thanks for your reply. Yes, it's a rendering problem - the planets do blink out when I recede from them (they stay in view for quite a while, though!), but nothing makes the moon pop into view - getting closer, making it bigger or brighter, even classifying it as a planet. The star has to be a certain magnitude, or the moon won't show. I've even tried changing the spectral class (assuming that would alter the luminosity), but no go.

I also tried "enveloping" the star with a black planet, which works up close (though creates an occluding disc) but at a distance the star begins to outshine the planet, even if the star's magnitude is as low as it can go. Oh well.

What might make as much sense as having an "invisible" class for stc files would be to have a "star" class for ssc files, so a star could orbit another star and still be rendered as a star (with yet more stars possibly orbiting it).
BillC


Return to “Development”