Some people asked in the Polycount thread how these Homeworld spheres (see this Article) were created. Let’s do it together! What we’ll use here are modding tools. I have no idea how near these are to the original Relic workflow.

Download
Download this mod tool collection and use the command line tool “HW2BGBuilder”. There’s also “HW2 – Spookysoft – HOD Tool 1.5.0.1” but it didn’t worked out very well for me.

HOD Viewer
For viewing your .HOD file you should use “CFHodEdit 3.1.5” (open your .HOD, then at the bottom of the program scroll to the lat tab “Miscellaneous” and press “HOD Preview”).

Let’s go
Ok, first we create a test .TGA to see what we can expect. I would say, this should work well (1024×512, 24bit):
Create a shortcut to the HW2BGBuilder.exe and drag & drop your texture on it. Let it calculate some stuff and then hit “Space” to start the process and feel like a Matrix hacker while numbers run down the command line.
And this is how it looks in “CFHodEdit”. You can clearly see the UV layout of the sphere. Now we know three things:

  1. Don’t add detail at the top/bottom of the texture because it gets stretched a lot.
  2. The left/right side of the texture has to fit to each other to avoid a visible seem.
  3. The colors are brighter then in the original texture, more about this in some sentences.

Regarding the last point: in Homeworld they painted only smooth gradients where the poles of the sphere are and avoid any visible stretching. Also the vertices are pretty rare in these areas which leads to smooth vertex colorĀ  gradients. Have a look on the geometry around the pole:
I think this is just awesome. Because of the limitation to use detail only on the horizontal areas, you achieve that the player (hopefully) never looses his orientation.

Now let’s use a “real” texture. But before that we have to decrease the output level from 255 to 128 (Photoshop > Image > Adjustments > Levels).

Level Output: 255

Level Output: 255


After the creation process you’ll find a “_ref.TGA” which is a edge map the program uses for the sphere creation. I think this looks really interesting. I think the quads are the parts which the program calculates after each other.

Edge Map

And this is how it looks in the viewer. Especially at the top of the big mountain you can see some color bleeding. I didn’t played around with the settings of the “HW2BGBuilder”. Maybe there’s space for improvements but in general i think the result is pretty good.
The resolution of your source texture has an impact on the sphere intersections and on course of the polycount.
My last point will be a bit technical. Please correct me if I’m explaining it wrong. There is a good point why i said “Bye” to numbers and went the way of graphics. :)

  • 1 Pixel needs 24 Bit/3 Bytes to be saved (RGB, every channel has 8 Bit)
  • 1 Vertex needs a position (XYZ) and a vertex color (RGB)

This means, if your source texture contains too massive contrast and detail everywhere, you would get more data than when you use a texture. But the Homeworld backgrounds consists mostly of colors and gradients and sometimes detail. So for this purpose, this optimization is awesome.

During i wrote this article, there were discussions going on how to achieve this poly reduction in zBrush. Computron posted his results here. Oh and poopinmymouth posted a great link where the creator tool is explained with all its parameters.

8 thoughts on “Homeworld 2 – Backgrounds Tech

  1. Anonymous

    On the 3rd to last image, the way you where rotating the camera “by mouse” looked a bit like you were free falling, surrounded by mountains!

    I remember feeling like the cleverest little five year old when I noticed the sky in the early Spyro games seemed to be doing something with triangles, but at the time I would have no idea what it was I was looking at!
    I wonder what the advantages and disadvantages of an animated vertex coloured skydome would be…

    Reply
    1. Simon

      You noticed it when you were 5 years old? Wow…that’s incredible :) When i was that old i didn’t noticed pixels at all and never thought about bad graphic or something like that. Just enjoyed Colonization in 320×340 :D

      Reply
  2. Mike H

    Do you know of a good tool to convert cube map backgrounds to the spherical ones HW2BGBuilder requires?

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *