How backgrounds are made in Homeworld2 from the inside

Original author: Simon Schreibt
  • Transfer
This article is a translation of two articles from Simon Schreibt. Both articles on the same topic are complementary. Do not be afraid that everything is typed in capital letters at the beginning, this is the style of the author and I tried to preserve it as much as possible.

What you see here

these are stunning backgrounds

one of the finest sci-fi games.

H omeworld 2

Thank you for reading.

Just kidding, of course. Of course I have something to tell on this subject. In our company, from time to time we look at art from Homeworld and bow to the skill of its creators. Now, after we have discussed how great the background looks and how interesting this sketching style is (sketch), something remains ... some details seem ... especially for us.

I mentioned that it looks a bit like ... gradient top coloring. But they will not draw the background with geometry, right? I mean ... that in this case it should be a pretty heavily tessellated sphere. The discussions were over, but I was not satisfied with the result and wanted, at least, to see the textures. So I used some utilitiesto extract data from Homeworld 2 Demo, but there were no textures. Only a few .HOD files. Googling, I found a topic on how to generate these .HOD files from .TGA . She read:

“... scans every pixel of the image and then, based on the contrast,
decides whether or not to add a new vertex and color ...”


Could this really be a vertex coloring? Fortunately, you can look at the .HOD file using CFHodEdit. Another utility may enable forced grid display. Look, what turns out to be pulled into the light:

This one

of the most daring

game art solutions I've ever seen.

And here you can see how this affects the geometry of the celestial sphere in the game. See how little resolution in non-contrast areas? And what is a smooth sphere in places where there are many details?

I never even thought that in this way you can get such good results. Oh, and don't forget that this approach solves two big problems.

# 1 There are no problems with artifacts from compressing textures in DDS format.
# 2 More important from the composition side: due to the fact that you can’t get strong detail (the training says that the original TGA should not contain many clear details), the background remains where it should be:


Very often I see games where the background contains too much noise and detail, which is really very difficult to distinguish from the middle and near plan.

Last time I saw the perfect combination of technology and composition in Diablo 3. I'm talking about my article “Trees in Diablo 3” .

The end of the first article. Second part.

Some ask in a topic on Polycount how these spheres in Homeworld were made. Let's do it together! Well, we will use mod utilities for this. And I have no idea how close this is to the original Relic approach in this matter.

Download this collection of mod utilities and use the “HW2BGBuilder” tool. There is also “HW2 - Spookysoft - HOD Tool ″, but for me it didn’t really work.

HOD Viewer
To view .HOD files you need to use “CFHodEdit 3.1.5 ″ (open your .HOD file, then at the bottom of the program find the“ Miscellaneous ”tab and click on“ HOD Preview ”).

Ok, first we will create a test .TGA to see what to expect. I think this should work well (1024 × 512, 24bit):

Create a shortcut for HW2BGBuilder.exe and drag our texture onto it. Let the utility calculate what is needed and then press “Space” (a play on words from the author. It also means the space and space buttons at the same time. Note per.) To start the process. Feel like a Matrix hacker while numbers run down the command line.

And this is how it looks in “CFHodEdit”. You can very clearly see the UV scan of the sphere. So, now we know three things:
  1. You should not add detail to the top and bottom of the texture, as it will compress very much there.
  2. The left and right sides of the texture should coincide with each other to avoid a visible seam.
  3. The colors are brighter than on the original texture.

A little more about all this in a couple of sentences below.

Regarding the last point: in Homeworld, they draw only smooth gradients at the poles of the sphere and avoid any visible deformation. Vertices are also rare in these areas, resulting in smooth gradients in the colors of the vertices.

See how the geometry is distributed around the pole:

I think it's just cool. Due to the restriction on the use of detail only in horizontal areas, you also achieve (I hope) that the player will never lose orientation in space.
Now let's move on to the “real” texture. But before that, let's reduce the level (brightness approx. Per.) From 255 to 128 (Photoshop> Image> Adjustments> Levels).

Brightness Level: 255

Brightness Level: 128

After generation, you will find the “_ref.TGA” texture, which is a border map used by the program to create a sphere. I think she looks really interesting. I think that the squares are the parts that the program counts one after another.

Face map:

And this is what it looks like in the viewer. In some places, especially on the top of a big mountain, you can see a “leak” of color. I did not really play with the “HW2BGBuilder” settings. Perhaps there is room for maneuver and you can improve the result, but overall the result is very good.

It should be noted that the resolution of the original texture hit noticeably in the number of polygons as a result.

Last thoughts will be a bit technical. Correct me if I explain incorrectly. The fact that I said “bye” to the numbers and went the way of graphics makes sense.
  • 1 pixel requires 24 bits \ 3 Bytes to be stored (RGB, each channel 8 bits)
  • 1 vertex needs position (XYZ) and color (RGB)

This means that if the original texture contains too much contrast and detail everywhere, then there will be more data than when using the texture. But the backgrounds in Homeworld consist mostly of colors and gradients, as well as a small amount of detail. So for these purposes, the optimization is cool.

While I was writing this article, there were discussions about how to achieve a reduction in the number of polygons in zBrush. Computron posted its results here . Oh and poopinmymouth gave an excellent link where the utility for creating spheres with all its parameters is described.

And now I really thank you for reading.

Also popular now: