Progress Report on Rebuilding Web Site

2024 May 01Home page back online
2024 May 06Menu system online, but there are still broken links and broken pages
2024 May 08Series and Archive modules in sidebar, advertising banners
2024 May 10Quick search, sidebar WIP module
2024 May 12Basic login/out functionality. No registration or password recovery yet.
2024 May 22Modal dialogs, post editing and preview, image gallery and gallery uploads
2024 May 27Some database glitches, XML validation of submitted pages
2024 May 29Display of comments, "Spoiler" short code, SEO-friendly permlinks

2013

Feb

12

Creating Simple Starfields

By Duane

Not everyone needs convincing starfields, but if you are doing anything with space art, or, more to my point, book trailers for science fiction novels, you might need some.  3ds Max does have a starfield rendering effect, but if you have ever used it, you'll know that it is not all that convincing.  I don't know about the talents of others, but every time I have tried to draw one out by hand, it has looked even less convincing.  So it has been off to Google.

Unfortunately, Google is only moderately helpful.  There are scads of starfield images out there, many of them brought to us by courtesy of NASA and the Hubble Space Telescope, and they are dazzling and spectacular.  But they fall short in three primary ways.  First, they faithfully reproduce a million more stars than the human eye can see, even in space, so they may not be particularly realistic in that regard unless it is the effect you want.  Second, they usually target particularly interesting nebulae or asterisms, and are rarely just ordinary starfields.  Third, if you want a particular region of space, it's likely that you'll want the region that you can't find anywhere.  A possible fourth shortcoming is that if you want the sky as viewed from Vega, you're plain out of luck.

I went on to search for software that could generate convincing starfields.  I found StarPro, which is insanely detailed and not too unreasonably priced if you need it, and if you have Adobe After Effects or one of its other supported applications.  And there are a lot that are free but which just plain suck.  I considered writing one.  Then, in a flash that illustrated just how stupid I can be, I realized that I already had two fairly good starfield generating programs on my computer.

The mental lapse may have occurred because I didn't think of them as graphics programs in any way.  They are astronomy programs.  I have three, but only two fill the bill as starfield generators.  The third will get an honorable mention, because as an astronomy program, it's the best of the litter.

Celestia

http://www.shatters.net/celestia/

The first contender in our lineup is Celestia, branded as the only planetarium software that doesn't restrict you to Earth.  That's not strictly true: I've seen planetarium software in planetariums that didn't restrict you to Earth, or to the present era in history.  But this might well be the only free software that does it.  When you start Celestia, you'll find yourself staring at Earth from some point in cis-lunar space:

Starfields Earth in Celestia

Interestingly, it doesn't always look the same, so it might be using some algorithm to determine time and place.  You'll notice, too, that there is a bunch of text gibberish on the screen.  I call it gibberish, because, although it might be useful information, there is some glitch, at least on my system, that leaves most of it as nondescript blocks.  Either way, you don't want that text on a starfield image, so the first step is to get rid of it.  Select Render/View Options... and you'll get this screen:

Celestia View Options

Under Information Text, select None, and the gibberish goes away.  Other features you want turned off are grids and labels.   Now, that you have the display looking like a real sky, let's check out Vega.  Go to Navigation/Select Object... and type Vega in the box.  Nothing will happen right away; all you have done is select an object.  Type C or use Navigation/Center Object, and the display will pan to place Vega in the center:

Vega

Not so interesting so far; any old planetarium program can do that.  So now type G, and watch yourself fly to Vega.  Not close enough?  Hit G again.  You'll see something like this:

Celestia Viewing Vega

Only if you have followed my directions, your screen won't look quite like this one; Vega on yours will be rounder.  This is as it should be.  Vega rotates rapidly and is actually an impressive oblate spheroid.  It just so happens that from Earth we are looking at it nearly from one of its poles (I forget which one) and so it looks spherical.  I navigated to near its equatorial plane before capturing this image.  That Celestia observes that little detail impresses me.

Still, though, not super-cool.  But did you notice that other stars shifted their apparent positions slightly as you moved?  We're not just playing telescope.  Now type H (Helios, I presume) to select our sun, then type C again.  It will pan around and you see the sky toward Sol as viewed from Vega (You might not be able to see much detail in this and following thumbnails, so click to see the large version.) :

Sol From Vega

Yes, that's Sol, the inconspicuous dot in the center.  The bright star at the center bottom is Canopus, and the one slightly brighter than Sol and almost straight up from it is Sirius.  I know this because if you position your cursor over them and right click, Celestia will tell you what they are.  For one work in progress, I did want to know what the sky looks like from Sirius.  It's relatively straightforward (for a software engineer) to get a star catalog and write a program to convert the 10,000 or so closest stars from celestial to galactic coordinates, shift the origin from Earth to Sirius, and convert them back.  Of course, it will also have to calculate apparent luminosities so you'll know how bright all of the stars look from there.  Or, you could just have Celestia do it for you.  I opted for the latter.

One of the particularly cool things about Celestia is that since it doesn't restrict the viewer to Earth and contains models of most of the significant bodies in the Solar System, you can get images like this:

Celestia - Io and Jupiter

There are a couple of other things you might want to know.  The left and right square brackets increase and decrease the number of visible stars, and F10 lets you record a screen capture.  Cursor keys, with and without the shift key, will let you navigate around.

As fun as Celestia is to play with, there is one thing I don't really like.  You can choose to display galaxies or not, but one galaxy that it never displays is our own.  You can't get that Milky Way band across the sky.  Being a software engineer, I understand that doing so with any acceptable degree of accuracy would be computationally prohibitive, so the writer has chosen not to do it at all.  Also, if you get too far away, stars thin out because we don't have data for all the stars out there.

But don't freak out; our options are not yet exhausted.

Stellarium

http://www.stellarium.org/

Stellarium is billed as giving the most realistic renderings of the sky.  And again, for free software, the claim is probably true.  The opening screen gives you this:

Stellarium Opening

Yeah, that's about what the sky would look like, from somewhere, and except for the labels.  Actually, if you don't like that location, there are several landscapes you can choose from.  With that in mind I want to call your attention to the capture below.

Stellarium Renderable

The first feature that you might notice is the block of text that has appeared in the upper left corner.  If you click on anything on the screen, this stuff will pop up to tell you all about what you clicked on.  No problem.  Right click anywhere and it'll go away again.  The second is that you are seeing the entire window; not just the capture of the starfield.  This reflects a difference in the way Stellarium's screen capture works from Celestia's.  Control-S captures an image to a specified location (by default, the desktop), but it is the entire window, not just the starfield.

The third is that there are no menus.  Stellarium goes the way of "creative," and in my opinion annoying, software by forsaking a common, familiar interface for one that someone thought was clever and therefore having to be figured out.  You get the translucent toolbars by dragging the cursor to the lower left-hand corner.  You can get just one by being more selective, but I'm showing you both.  With the lower ones, you can turn off most of the artifacts that don't belong in a starfield, such as labels and terrain, but it seems you can't get rid of all of them, so you have to go to the ones on the left, anyway.

The third icon from the top of that left-hand bar is the Sky and Viewing Options window.  I'm not showing it to you as I did with Celestia because there are multiple tabs and you will go through most of them to get the sky looking as you want it to, and I just didn't want to fill this blog up with too many option windows.  I'm sure you can find them.  Be sure to turn off fog, among other things.  You can also adjust luminosity, which has the effect of showing more or fewer stars.  But once you get the settings to your liking, you can get some pretty decent starfields:

Stellarium Starfield

Notice the background nebulosity of the Milky Way is very much in place.  Notice, too, that the default unexpanded toolbar is still in the lower left-hand corner.  I haven't found a way to get rid of it other than using some graphics program to crop it out.  Annoying, but not the end of the world.  As a matter of fact, two of the images from a previous post (A Heinlein Gallery) uses starfields generated with Stellarium.

Aside from being Earthbound (or at least near-Earthbound) Stellarium can really aggravate me with its sky navigation.  It doesn't want to just pan using standard click and drag.  It wants to pan and rotate, and eventually it will drag you to a place where it only wants to rotate.  I've tried all combinations of shift and control keys in combination, but it ignores them all.  In all fairness, what I have not tried is looking up instructions, but I guess I revolt at something that shouldn't be all that hard to begin with.

Cartes du Ciel

http://www.ap-i.net/skychart/start

I said at the beginning that a third would get an honorable mention, and here it is.  It is vital to understand, however, that the honorable mention is as a starfield generator.  You might be able to tell from the image that it makes no attempt at any sort of photorealistic rendering:

Carte du Ciel

That's because it's not a planetarium program; it's a star-chart program, and if this blog entry were about star-chart programs, it would rank as number one.  Yes, I use it in my writing, but not for images; I use it for research.  If I want to know where my alien civilizations lie in relationship to each other, it's Cartes du Ciel that I reach for.  In that regard, Celestia and Stellarium don't compete at all, except that Stellarium has some good star lore features, which, on the other hand, you don't really need anything beyond Wikipedia for.

All three programs are free and all three are available for Windows, Mac OS-X, and Linux.  All three can be augmented by larger star catalogs and other astronomical databases.  They're not as pretty as StarPro, of course, but I don't need StarPro for what I'm doing right now.  If someday I feel the need for cooler and more spectacular book trailers, I might be able to justify the expense, but even then, Hair Farm will probably come first.

Download them and give them a try.  As for me, I'm pretty much done with searching Google for usable star images.

 

Comments

There are no comments for this post.

You must be logged in to post a comment.