Rabbit Sees Stars

I have an obsession with Doom's skies.

Really, there's no other way to put it. I think it started with the advent of freelook in Doom source ports. It was a Wizard of Oz moment for me as I saw the horizontal "seam" between the repetition of Doom's sky textures for the first time.

This cityscape sky texture in Doom II is called RSKY2. It is 256 pixels wide by 128 pixels tall.

Since the original Doom engine didn't have freelook, it only needed to tile horizontally, not vertically.

In later Doom ports like GzDoom, there was a kludge to account for skies not tiling well vertically with freelook enabled by fading the sky based on the top edge of the sky texture's colors.

In my own personal Doom maps, I tried to use custom skies made by other Doom artists where those artists made cloudy sky textures which textured well in both horizontal and vertical directions.

This sky I renamed on my computer as OranSky, so I could see looking at the file name that it was orange clouds.

My apologies to the original author for not knowing who made this one but as you can see, it tiles fine in both directions.

But what I had a real affinity for is a good starfield sky. I tried several but ended up opening up a paint program and poink-poinking with the mouse button to create a starfield I liked more than what I'd found available. And I was happy with that for about a minute. Okay, maybe longer than a minute, but over time, the inherent blockiness of stars began to gnaw at me.

If I go back to the basics of what I learned about Doom's sky rendering, I remember that the 256 pixel wide by 128 pixel tall texture is painted four times, side by side, wrapping around the inside of a hypothetical cylinder.

In my illustration of Doom's sky cylinder here, you don't see the third copy of the sky texture because from our out-of-cylinder view here, it would be facing away from us. But the player's viewpoint in the game is inside this cylinder and they see four copies of the same sky texture painted side-by-side, wrapping around the inside "wall" of the cylinder.

A map author really doesn't have to do anything for this "magic" to happen as the capability to draw the sky is handled automatically by the Doom engine.

But what if we relieved the Doom engine from its duty doing this? In many Doom ports, there's a neat little added feature called a skybox viewpoint. You may think of the skybox viewpoint as a camera. And if I wanted to, I could create my own cylinder of any arbitrary size and use that skybox viewpoint thing object in my maps to provide what should be painted whenever the Doom port comes across a sky ceiling (or floor) in a map.

I'm not really great at math and I certainly didn't do any calculations using pi (that 3.14... thing) to create my camera holding cylinder in DoomBuilder 1.68. No, I right-clicked in linedef mode with the shift key on the keyboard held down and then increased the values for number of vertices and size of radius in the resulting insert sector dialog box. Through a little bit of calculation and a whole lot of "trial by terror", I settled on 32 vertices with a radius of 531. It seems those have been quite the magic numbers for my pseudo-circle creation here which, is still just a polygon. My starfield texture is 256 pixels wide, so I needed the sum of all sides of the polygon to be divisible by this number with no remainder. 32 sides of the polygon times 104, the resulting equal lengths of those sides, equals 3328. 3328 divided by 256, the width of my starfield texture, equals 13. I select all sides of the polygon, assign my starfield texture to them and then choose Lines -> Autoalign textures from DoomBuilder's menu. In the resulting dialog box, I check the box which says Start on Front sides as well as checking the box which says Align X offsets.

I then select sectors mode in DoomBuilder and adjust my cylinder's vertical dimensions to have a ceiling of 1256 and a floor of -1200. This stretching of the distance between the ceiling and floor is what takes advantage of textures which tile vertically as well as horizontally. I insert another sector exactly in the middle of this sector and just stick with the default values of four vertices and a radius of 32. I raise the floor of this tiny square sector to 16. Then, I enter things mode of DoomBuilder and insert a thing in the middle of this square. I change the type of thing from Player 1 Start to Skybox Viewpoint, thing number 9080. I don't really give a damn which direction, North, South, East or West, my camera is facing. I'm just going to be looking at stars anyhow.

The result of this effort are smaller stars but a whole lot more of them which is more akin to what we go outside to see on a night with a clear sky.

Quite some time ago, I was impressed with a map by Darkwave0000 in the Mega 5 deathmatch megawad. It's a really fun map to deathmatch in so if you haven't ever tried it out, you're messing out! One (among many) of the things I found interesting about this map was the Moon mural.

It is unfortunate that the moon is sitting there all alone in a field of flat black without any stars to keep it company, however. I decided in one of my maps, I would have the action taking place on a moon and be able to see the planet this moon is orbiting when the player looked in the proper direction. I chose a gas giant planet like a Jupiter or Saturn as the type of planet to place in my moon's sky. Gas giants typically have lots of moons! To do this, one simply adds a "billboard" inside the cylinder I created for the starfield, adjust the distance from the camera, skybox viewpoint, appropriately and be sure offset the Y direction of this billboard down, in my case, I used -1056.

I'm rather pleased with the results of this arrangement!

Robotron INDUSTRIES, (c)2026 Copyright Chap Software,
All Rights Reserved