Page 4 of 5

Posted: Wed Nov 04, 2009 9:59 pm
by JensAyton
GlobalExplorer wrote:
A real star background may not sound like much but it adds immensely to the realism of the space scene. Actually it's hard to understand why this technique is not used more in computer games,
Fun fact: the first time this was done was in Expensive Planetarium, a mod for the very first computer game, Spacewar!.

Posted: Thu Nov 05, 2009 11:02 am
by GlobalExplorer
But those were the good ol' times. Today space looks like that:

Image

Image

Posted: Thu Nov 05, 2009 11:45 am
by Kaks
Now we know neither armada 2526 nor parkan 2 float your boat. In that case you might not like some of the more technicolor systems you can find in Oolite. Plus, thanks to Disembodied flogiston explanation we've already established that Oolite isn't set anywhere in the RL universe anyway.

As far as your program is concerned, visible constellations will look different, if viewed from solar systems n-light years from Sol. Are you implementing them with their own 3d coordinates, or just 'glued' to a sphere? If the latter, you might feel compelled to change your approach a bit! :)

Posted: Thu Nov 05, 2009 7:06 pm
by GlobalExplorer
Sure, that's all a matter of taste. But to be honest there is currently no game that I like very much. Though I have seen some screenshots of Infinity Earth that look very promising.
As far as your program is concerned, visible constellations will look different, if viewed from solar systems n-light years from Sol. Are you implementing them with their own 3d coordinates, or just 'glued' to a sphere? If the latter, you might feel compelled to change your approach a bit! Smile
Of course. Each star has it's own 3d vector, so recalculating the positions should not be a big problem. However, for every new viewpoint the brightness needs then to be recalculated as well. I believe this can only be done from absolute magnitudes. While right now I can get away with just using the apparent magnitude. You probably guessed, I begun by setting the origin of my coordinate system to Earth, but this does not have to stay that way. It's just the natural way to begin working on such a problem.

Another problem is I need something to compare to. Certainly there is special software that can be used to calculate the constellations. But it would help me a lot if you had some simple examples, or instance "here is a screen that shows what does the Big Dipper looks like from Tau Ceti".

And I am only interested in a certain distance from Earth, 20-50 light years or so.

I worked on getting better star colors, hopefully I got them right this time. I also increased the number of stars that are actually visible.

Image

Image

Image

Image

Posted: Fri Nov 06, 2009 6:25 am
by Commander McLane
GlobalExplorer wrote:
Another problem is I need something to compare to. Certainly there is special software that can be used to calculate the constellations. But it would help me a lot if you had some simple examples, or instance "here is a screen that shows what does the Big Dipper looks like from Tau Ceti".
In this case Celestia is your friend.

Posted: Fri Nov 06, 2009 12:35 pm
by JensAyton
GlobalExplorer wrote:
Of course. Each star has it's own 3d vector, so recalculating the positions should not be a big problem. However, for every new viewpoint the brightness needs then to be recalculated as well. I believe this can only be done from absolute magnitudes. While right now I can get away with just using the apparent magnitude.
But if you have full vectors (not just direction) and apparent magnitude, absolute magnitude (in some arbitrary unit suitable for conversion back to apparent magnitude somewhere else) is just apparent magnitude times the square of the distance.
I also increased the number of stars that are actually visible.
In reality, you’d see far fewer stars in the third picture, assuming the planet is somewhere in the region of 1 AU from earth. With the sunlit side of Earth (albedo about 0.39) or the moon (0.12) in view, only the very brightest stars are visible to the naked eye.

Posted: Fri Nov 06, 2009 1:43 pm
by DaddyHoggy
Ahruman, your ability to know stuff about seemingly everything, never ceases to amaze me. :wink: (that was meant to be a compliment btw)

Posted: Fri Nov 06, 2009 3:22 pm
by JensAyton
Thanks! I did have to look up the average albedo of the earth, though. ;-)

Posted: Fri Nov 06, 2009 6:42 pm
by GlobalExplorer
Ahruman wrote:
But if you have full vectors (not just direction) and apparent magnitude, absolute magnitude (in some arbitrary unit suitable for conversion back to apparent magnitude somewhere else) is just apparent magnitude times the square of the distance.
Absolute magnitude M is already given. It can be calculated too, but the computation is different to just power two.

The star catalog provides this input: distance d, apparent magnitude m and absolute magnitude M. What I need is the computation of the new apparent magnitude at a Point p != Earth. I don't see any more use for m_Earth and instead, think I should try to calculate m_P from M and d directly.

I know this formula [source]:

M = m - 5 × log(distance) + 5

and this could be used to calculate the apparent magnitude too:

m = M + 5 × log(d) - 5 (?)

e.g. for the Sun:

M = 4.83
d = 4.84813*10^-6 pc

==> 4.83 + 5 x log(4.84813*10^-6) - 5 = -26.74

Which is the the correct value! So, I hope this would be the right approach?

Calculating the coordinates and distance to other viewpoints than Earth is not a problem. Since I already have the vector from earth it's basically just a subtraction with a new position vector relative to earth.
In reality, you’d see far fewer stars in the third picture, assuming the planet is somewhere in the region of 1 AU from earth. With the sunlit side of Earth (albedo about 0.39) or the moon (0.12) in view, only the very brightest stars are visible to the naked eye.
Do you mean the number of visible stars from space or from Earth? I am, of course, simulating a viewpoint in space!

Needless to say, I still have problems correlating the screenshots with pictures of the real night sky, so I really need input from people in the knows. I'd be glad if a hobby astronomer will have a look at my screens and point me to mistakes. Tonight is a very cloudless night here in Berlin, so I think I should begin with some practical astronomy :)

Posted: Fri Nov 06, 2009 7:09 pm
by Kaks
Do you mean the number of visible stars from space or from Earth? I am, of course, simulating a viewpoint in space!
From space: albedo is the brightness of a celestial body, in terms of reflected solar radiation. Eyes compensate for bright objects, so dim stars won't be visible when the earth or moon is in the frame.

Posted: Fri Nov 06, 2009 9:07 pm
by GlobalExplorer
I am not sure if I get it. Do you suggest a program should simulate the sensitivity of human eyes and make the fainter stars disappear once a planet is in your field of view, but switch them back on when it's not? No disrespect but that would be one of the craziest ideas I heard in a long time :wink:

Posted: Fri Nov 06, 2009 10:19 pm
by DaddyHoggy
Until the creation of HDR graphic cards that's effectively what happens in games anyway, very bright objects or very dark shadows but not both, so often scene developers would create scenes that semi-mimicked the functionality of the eye so that the colour/contrast/brightness of the scene perceived "looked about right".

I can probably find some lecture notes from my colleagues on the subject if you're interested?

Posted: Fri Nov 06, 2009 10:58 pm
by Kaks
GlobalExplorer wrote:
No disrespect but that would be one of the craziest ideas I heard in a long time :wink:
There's an amazing number of realistic touches available if you embrace the craziness! ;)

And there are hundreds of commercial games out there that made do with a 'painted on canvas' backdrop, sometimes using a few separate objects in the middle-to-far distance! :)

Posted: Sat Nov 07, 2009 8:33 pm
by GlobalExplorer
I also had a go at procedural generation with libnoise. Made my first planets with a little bit of experimentation, and just very few noise modules.

I must say libnoise is really a powerful, impressive library, but I don't think it will be possible to bring the results close to the manually created textures. But it should be possible to make much better ones than the ones on these screens!

Image

Image

Posted: Sun Nov 08, 2009 1:58 pm
by JensAyton
GlobalExplorer wrote:
So, I hope this would be the right approach?
Well, I don’t know. You just told me I was wrong. ;-) (My inverse-square-law stuff wasn’t actually for magnitude, it was for luminosity, which strikes me as more relevant for simulating this stuff.)
Ahruman wrote:
In reality, you’d see far fewer stars in the third picture, assuming the planet is somewhere in the region of 1 AU from earth. With the sunlit side of Earth (albedo about 0.39) or the moon (0.12) in view, only the very brightest stars are visible to the naked eye.
Do you mean the number of visible stars from space or from Earth? I am, of course, simulating a viewpoint in space!
I’m talking about the number of stars visible from space when Earth is in view dazzling you. Eyes have adjustable optics, y’know, and so must any camera that can take a usable picture of both the planet and the star background. :-)