So, I’ve made quite a few space ships in this series, but none of them have received as much criticism as the background starfield.We’re not counting the tubes, okay? Okay. So that’s what I’m going to be working on today. It’s not going to turn out great, but it will be much better than it was. I mean, you can see the result in the splash image, so you can go straight to the comments if you see anything you don’t like.
The background effect was built without referenceMy first mistake? Hardly. but I had something in mind about big crosses and circles around startlingly bright stars. I think it probably came from some of the illustrations in the GURPS space source booksor the TMNT Guide to the Universe, but it was vague, and I’m lazy. So instead of improving the background until it objectively looked good, I just kept lowering my standard of what I was expecting while I was working until I thought “yeah, that looks good enough” and moved on to the spaceship making part. This is why reference is so important, at least for me. Maybe some people have enough internal artistic sense to force themselves to create a refrerence-free success, but I’m not that person.
How Do You Find an Image?
So, in order to improve this background, I needed a picture that looked pretty much like what I wanted. I needed reference. Sadly searching Google image for “Stars that look like they have exes and circles around them” doesn’t really work all that well. Even searching for “Awesome stars” mostly ends up with images of nebulas, which, okay, fair! But I’m trying to make STARships here, not NEBULAships.
Fortunately, my dad is into astronomy, and we’ve built a few telescopes together, so I know where these cross shaped visual artifacts come from. They are “diffraction spikes” off the spider that holds the secondary mirror in a reflecting telescope. Unfortunately, that didn’t really help me find the reference art I needed either. Where do the circles come from? A few people in the comments said they were lens flares, but they are exactly centered on the stars, so that doesn’t seem to make sense. Eventually I found this file https://en.wikipedia.org/wiki/File:Pleiades_large.jpg
Which seems to be pretty much what I was looking for. That’s basically what I have already though. Right?
So, that’s a miserable failure. Amazing what having an objective standard of excellence can do to your evaluation of your work. I guess I should do something about that.
How Did I Do That?
So, this is ostensibly a series of programming articles. And in order to maintain the premise, I’m going to try to explain the “source code” for this image. You can download the Blender source file here:it’s in V 2.80 now
but instead of leaving it at that, here’s a screenshot of the node setup.
Just as an overview, each of these little boxes are “Nodes”. They have inputs on the bottom left, and outputs on the top right. If an input isn’t connected, the node uses the default value, which you can edit on the node itself. Unfortunately, it’s pretty hard to talk about anything beyond that, so here is another screenshot, re-arranged a bit, and with colors so we know what we’re all talking about. Or, you know what I’m talking about.
Let’s start on the left, with the blue boxes. There’s a noise image that I’m using because I can’t figure out how to get a plain noise function in Blender, so I made one in the Gimp and baked it into the file. There’s a galaxy layer, which is a big sphere with a particle system on it to randomly distribute some simple galaxy objects. That layer gets processed with a variable size blur so that the small galaxies don’t get too blurred. I’m using the noise image to add a bit of flavor to the galaxies, as well as a bit of low level noise to the background of the whole image. There’s also a “Background” layer, which renders the stars, which are themselves a giant sphere with a couple of particle systems to randomly distribute some stars. The particle system has “clumping” turned on, so the stars aren’t quite evenly distributed. Then I just add those all together and feed it into:
Which is basically the foreground and nebula layers. In the bottom left corner is the foreground, which gets re-leveled and alpha-over masked over the stars before the flare operations, as well as put in to the pipeline further on. Pretty standard stuff.
The really special part here is in the nebula, which I noticed in the reference image was concentrated around the bright stars.
So I used a “clouds” texture and multiplied it by a super-blurred version of the brightest stars from:
Which is the special rings effect section. I really did try to get a lens flare working which properly handles overlaps, but I couldn’t figure it out, so you’re stuck with this. It basically filters for the brightest stars, runs them through a “Dialate” node to make big circles, does a “Sobel” edge detect on them to make the bright ring around the outside, blurs it, and then masks it to get a hard edge around the outside. Then does that in paralell for the even brighter stars, combines them, and runs that through a “Soften” node, to take the hard edges off of the masked edges.
The “even brighter stars” are made super bright and get a fog glow filter to add that extra pop.
Add it All Together
That’s just about it. All of those passes get added together to result in a final image!
And just to show off the foreground, here’s the planets from the last articles. I may have modified the textures just a little.
So, that’s just about it! As pleased as I was about the background before these changes, I’m even more happy with the results after the update. Just goes to show what a difference good reference makes.
Speaking of good reference, I ran across an amazing Blender artist doing spaceship models. If you were pining for some starships, check out these!
Perhaps, some day, I’ll get the computer making stuff like that all on its own. Some day…
 We’re not counting the tubes, okay? Okay.
 My first mistake? Hardly.
 or the TMNT Guide to the Universe
 it’s in V 2.80 now
The Best of 2019
I called 2019 "The Year of corporate Dystopia". Here is a list of the games I thought were interesting or worth talking about that year.
Here is a 13 part series where I talk about programming games, programming languages, and programming problems.
What is Vulkan?
What is this Vulkan stuff? A graphics engine? A game engine? A new flavor of breakfast cereal? And how is it supposed to make PC games better?
Shamus Plays WOW
Ever wondered what's in all those quest boxes you've never bothered to read? Get ready: They're more insane than you might expect.
Overused Words in Game Titles
I scoured the Steam database to figure out what words were the most commonly used in game titles.