No announcement yet.

Help needed: UT2004 to UT3 Alphamap

  • Filter
  • Time
  • Show
Clear All
new posts

    Help needed: UT2004 to UT3 Alphamap

    This is mainly addressed to DGUnreal, but if anyone knows the answer, please chime in.

    "Alphamaps must be converted from the alpha channel of the UT2k4 .tga over to scaled G16 though, so you have to do some fiddling to get them in. PhotoShop out the alpha channel as a .bmp file"
    I export the UT2004 alphamap in .tga format. There is no alpha channel (I use GIMP rather than photoshop).

    "then bring it into HMCS, scale it to max extents and save as a G16."
    HMCS can read in the .tga and all looks good in the various views (i.e., perspective). I max the extents and save as G16.

    "Then same process as importing the heightmap, select the TLS layer index item and import the alphamap G16. Just be sure to use a seperate TLS for each imported alphamap, you can't import into a Procedural TLS."
    "Height Map Only" and "Into Current" are checked, "Bake" is not, Class is "G16BMPT3D"
    Importing the g16 gets the following message: "Failed to import alpha map for layer (TLS_Grass) of terrain Terrain_0"
    Same message appears when trying various other options.

    Any help would be appreciated.

    [Cross posted at]

    When exporting the UT2004 terrain RGBA8 alphamaps there will be an alpha channel in the .tga that you save to disk. By default the RGB channels will all hold 127:127:127 for solid grey and the alpha channel holds the mask information used for that specific texture layer or deco layer. I don't know if Gimp supports 32-bit .tga files, if not, then you will have to use other software to correctly extract the alpha channel.

    Once you have software that supports the 32-bit .tga, you only need to save the alpha channel off to a standard .bmp or .tga file, since that is all that you need for the data that will be used by UT3, the RGB channels of gray data are meaningless.

    UT3 requires its alpha channel data imported as a G16 file. So you will have to take the .bmp or .tga that you saved from the .tga alpha channel, load that into HMCS and Scale it to Extents (full 16-bits).
    Then save that as as G16 .bmp file.

    Import that into UT3's Terrain Edit dialog as mentioned.

    Note that this is assuming that you are keeping the terrain heightmap and alphamaps the same size as they were in UT2004.
    If you have changed the terrain to be a different size than UT2004, you can't use those alphamaps without modifying them also. Otherwise you will get an error when you attempt to import. You also can't properly import them into a Procedural layer setup.
    In other words, if you took a UT2004 256x256 heightmap G16 which is a 255x255 terrain, imported that into UT3, then changed the terrain NumPatches from 255x255 to 256x256 to get the MaxTesselation system working, then you have just changed the size of the underlying heightmap and alphamap dimensions to 257x257.
    There are 256x256 vertices in a 255x255 terrain mesh, there are 257x257 vertices in a 256x256 terrain mesh.
    So if you have changed the size of the heightmap in UT3, you will have to also change the paper/document size of the alphamaps before importing so that they are the same dimensions.


      GIMP supports .tga alpha but apparently not one exported from ut2004. Must be a bug.

      Since HMCS can read the .tga alpha correctly, I will test for the problem to be that I did change size of the height map. In fact, now that I think about it, I am pretty sure that is the problem. Unless HMCS reading the .tga directly a problem?


      Edit - Update:
      That was the problem: I had it 256x256 when it should have been 255x255. All set now. Thanks for making HMCS too.