1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Guide to porting Textures and Static Meshes from U2XMP to U2

Discussion in 'Unreal 2' started by GreatEmerald, Jun 28, 2009.

  1. GreatEmerald

    GreatEmerald Khnumhotep

    Joined:
    Jan 20, 2008
    Messages:
    4,042
    Likes Received:
    1
    Just making a guide for anyone who is interested or will be interested in porting things to Unreal II. This focuses mainly on porting U2XMP content to U2. Before describing the actual procedure, we'll look into alternative ways and see why they don't work for us here ;)

    Porting textures

    Generally textures work just by dragging and dropping them from U2XMP to U2; however, there are a few exceptions. NOTE: Although due to an undocumented feature, when importing textures, if they have the material name in front of the texture name (for example, METL_TextureName), they will have their material applied automatically; however, some textures don't have the material description, so after porting make sure you have the correct Material set.

    All textures
    If U2 UnrealEd crashes when you drag and drop a texture package, that means that it contains an unsupported texture type (either a TextureArray or TexCoordSource).

    You might want to use UnrealEd U2XMP for that - don't. Export to File option is broken. Then you might want to use UT Package Tool - don't. It will crash with some error because it doesn't support U2XMP. You might want to use UDE/WoTgreal - don't. You will get an error that the BMP format is unsupported. You might want to delete the unsupported textures - don't. The Editor won't let you.

    This is what to do in such cases:
    1. Open U2XMP UnrealEd.
    2. Load your Texture package.
    3. Right-click on a texture (but make sure it's not a TextureArray or a TexCoordSource!) and choose Rename.
    4. Rename the package to something similar (otherwise you will have a hard time renaming all of those), for example, rename from MyPackageName to MyPackageName1.
    5. Go to the newly created package.
    6. Check all the textures for Palettes. If a texture uses it, remove the reference to it. Nobody uses Palettes these days and they will cause package loading problems if you don't get rid of them.
    7. Save the package.
    8. Use the drag and drop technique.
    9. Rename the dropped package to whatever you need (for example, from MyPackageName1 to MyPackageName).

    If this doesn't work, continue reading.

    RGBA8 textures

    You already know what fails. If the above method fails, then continue reading. Make sure, however, that you want to convert RGBA8 textures, and not DXT* ( the next section is about that).

    You will have no problems with these by using UCC whatsoever. To export them from U2XMP, you have to do some geekish command line work, but it's not much and not hard at all:
    1. Press Win+R and enter cmd in the box.
    2. Write cd *foldernamehere* to navigate to Unreal II XMP System folder. (note: for speed, write the first few letters and press Tab - it will automatically enter your folder's name; alternatively, you can add a wildcard * after the first few letters and press Enter; to switch to another drive, enter it's letter and the symbol : )
      Example:
      C:\Documents and Settings\Username>D:
      D:\>cd WinG*
      D:\WinGeneric>cd Pr*
      D:\WinGeneric\Programs>cd Ga*
      D:\WinGeneric\Programs\Games>cd UA*
      D:\WinGeneric\Programs\Games\UAnth>cd Unreal2
      D:\WinGeneric\Programs\Games\UAnth\Unreal2>cd System
      D:\WinGeneric\Programs\Games\UAnth\Unreal2\System>
    3. Enter ucc batchexport *PackageNameHere* Texture TGA *PathToAFolderHere*
      Example:
      ucc batchexport 343T Texture TGA ..\Textures\343T
    4. Open your Unreal II UnrealEd and use File -> Import to import your textures from the folder you batch exported into. NOTE: as mentioned before, works only with RGBA8 uncompressed textures.

    DDS textures

    This is a little more tricky. You already know why UnrealEd export and UTPT don't work. You might want to use the method with RGBA8 as described above - don't. Exported TGA files will be totally empty. You might want to do the same, but with PCX - don't. It's the same. You might want to do the same as above, but with DDS - don't. You will see that there is no DDS exporter in UCC.

    We do it correctly by using Unreal Development Environment or WoTgreal first, and then editing the BMP files with Photoshop (I'm using CS2) so UnrealEd would recognise them:
    1. Load UDE/WoTgreal.
    2. Go to Tools->Advanced Exporter...
    3. Press the Folder icon at the top and navigate to your U2XMP/Textures folder.
    4. Press your texture package name, then add a tick near your texture(s) name.
    5. Press Export -> Export to BMP. NOTE: you might be tempted to use .PCX - don't. Those .PCX files are just renamed .BMP.
    6. Use Windows Explorer to navigate to your U2XMP/PackageNameHere.u/Images folder.
    7. Rename YourTextureNameHere0.bmp to YourTextureNameHere.bmp to save some time when importing later.
    8. Open the .BMP file with Photoshop.
    9. Go to File -> Save As... and save as .TGA, 32bit, no compression.
    10. Open Unreal II UnrealEd.
    11. Do the usual importing stuff, selecting .TGA as the file to import.
    12. Select your compression rate in the Import dialogue.

    Porting Static Meshes

    Different methods to port Static Meshes to U2 from U2XMP are described here. Note that after porting, you should see if the Static Mesh is smooth enough. If it isn't (for example, if it's a natural mountain mesh or a mesh of a broken item), open your UnrealEd's console and enter STATICMESH SMOOTH. This hardly documented feature will smoothen the Static Mesh that is selected in the 3D world viewport. Make sure you save afterwards!

    Most Static Meshes
    There are different ways to port Static Meshes, but the easiest way is here.

    You might want to use UTPT to export the Static Mesh - don't. As mentioned before, UTPT doesn't support U2XMP enough to do that. Besides, what would you export it to? Then, you might want to use UDE/WoTgreal to export them - don't. There meshes don't even appear, or appear blank. You might then want to convert your Static Mesh to a Brush in U2XMP Editor and export - don't. Static Meshes simply won't get converted to Brushes for some reason. Then you might want to export the Static Mesh as .obj - don't. U2XMP Editor doesn't support .OBJ exporting. Then you might want to do the same in UT2004 - don't, there's an easier way and it doesn't screw UV maps.

    He we will convert the Static Mesh to a Brush and then back to a Static Mesh.

    1. Open U2XMP UnrealEd.
    2. Navigate to your Static Mesh.
    3. Place the Static Mesh in an empty map (it will appear like wireframe).
    4. Right-click your Static Mesh and select Convert -> To Brush. NOTE: After that, you might not see anything. Zoom out and you should see it then - sometimes in some maps the Builder Brush is hidden until you zoom out. If you don't see it whatever you do, it probably didn't get converted - go read the next section.
    5. Press Brush -> Save Brush As...
    6. Save it.
    7. Open U2 UnrealEd.
    8. Go to Brush -> Open Brush and open your saved u3d file.
    9. Right-click on your red brush and select Convert -> To Static Mesh.
    10. Fill in the dialogue.
    11. Open your Texture Browser and find the mesh map for your Static Mesh.
    12. Locate your new Static Mesh and go to Edit -> Sections...
    13. Press Use and Close.
    14. Save the package.

    myLevel and those which don't work from U2XMP

    You will need Unreal Tournament 2004 and UTXMP for this to work.

    You might want to use UTPT to export the Static Mesh - don't. As mentioned before, UTPT doesn't support U2XMP enough to do that. Besides, what would you export it to? Then, you might want to use UDE/WoTgreal to export them - don't. There meshes don't even appear, or appear blank. You might then want to convert your Static Mesh to a Brush in U2XMP Editor and export - don't (or, actually, do, but if it fails, read on). Some Static Meshes simply won't get converted to Brushes for some reason. Then you might want to export the Static Mesh as .obj - don't. U2XMP Editor doesn't support .OBJ exporting. Then you might want to do the same in UT2004 - don't, there's an easier way and it doesn't screw UV maps.

    What we are going to do is utilise UT2004 UTXMP for changing Static Meshes to Brushes, import Brushes to Unreal II and convert them back to Static Meshes.

    1. Open UT2004 UnrealEd.
    2. Navigate to your Static Mesh.
    3. Place the Static Mesh in an empty map (it will appear like wireframe).
    4. Right-click your Static Mesh and select Convert -> To Brush. NOTE: After that, you might not see anything. Zoom out and you should see it then - sometimes in some maps the Builder Brush is hidden until you zoom out.
    5. Press Brush -> Save Brush As...
    6. Save it.
    7. Open U2 UnrealEd.
    8. Go to Brush -> Open Brush and open your saved u3d file.
    9. If the pivot is off from where it should be (brush pivot = start of Static Mesh's plane and then pivot when placed in the game again), you have to put it approximately where it is in U2XMP. That means you have to open U2XMP UnrealEd and see where the 0,0,0 coordinates of that mesh are, and if your brush has it somewhere in the wrong place, press a vertex to put the Pivot there. It doesn't need to be exact, all Static Meshes will be repositioned in maps anyway.
    10. Right-click on your red brush and select Convert -> To Static Mesh.
    11. Fill in the dialogue.
    12. Open your Texture Browser and find the mesh map for your Static Mesh.
    13. Locate your new Static Mesh and go to Edit -> Sections...
    14. Press Use and Close.
    15. Save the package.

    Phew, took a while, but hopefully will be useful for anyone who wants to convert things from U2XMP to U2. As you can see, it requires truly unordinary tools to convert things here. If someone knows a way to truly export meshes (or convert to brushes) from U2XMP, please post here.
     
    Last edited: Jul 2, 2009
  2. GreatEmerald

    GreatEmerald Khnumhotep

    Joined:
    Jan 20, 2008
    Messages:
    4,042
    Likes Received:
    1
    Update: found new easier ways to do that. All textures can now be ported at once and no Photoshop is required, and you no longer need UT2004 (and thus all the Pivot hassle) for most Static Meshes.
     
  3. GreatEmerald

    GreatEmerald Khnumhotep

    Joined:
    Jan 20, 2008
    Messages:
    4,042
    Likes Received:
    1
    Yay for more undocumented features! It seems that when you port Static Meshes these ways, they will get too sharp. To make it smoother, just enter STATICMESH SMOOTH and save the package.
     
  4. Leo(T.C.K.)

    Leo(T.C.K.) Well-Known Member

    Joined:
    May 14, 2006
    Messages:
    4,718
    Likes Received:
    30
    Btw when I try to convert static mesh to a brush, it fails for some reson, I don't see red builder brush, at least on original Unreal2. not on XMP.
     
  5. GreatEmerald

    GreatEmerald Khnumhotep

    Joined:
    Jan 20, 2008
    Messages:
    4,042
    Likes Received:
    1
    Yeap, that happens a lot, at least on myLevel'ed content. You have to use something else when that happens...
     
  6. Leo(T.C.K.)

    Leo(T.C.K.) Well-Known Member

    Joined:
    May 14, 2006
    Messages:
    4,718
    Likes Received:
    30
    Use what?

    But I want to convert it into brush, possibly for porting these brushes to Unreal then.
     
  7. GreatEmerald

    GreatEmerald Khnumhotep

    Joined:
    Jan 20, 2008
    Messages:
    4,042
    Likes Received:
    1
    Try exporting static meshes via UTPT/WoTGreal/UCC, then import somewhere and convert to brush.
     
  8. Toploader

    Toploader New Member

    Joined:
    Feb 13, 2010
    Messages:
    3
    Likes Received:
    0
    Sorry to bump a semi old thread but thank you so sooo much for that advice, I do quite a bit of porting and I never new you could simply reapply the smoothing within the editor so damn easy!

    Also, there is a quicker way to get those brushes from map to map... and you can leave both editors open for this to save time if mass converting. Just convert the mesh to a brush (so it's a red builder bush, like you explained) hit 'add' (so you get the blue add brush) and then you can just copy and paste it to the other editor and convert it back to a static mesh. No side effects I'm aware of, does the same as exporting the red builder brush, and will save you a few steps each mesh if you are doing a bunch (like I often do).

    I also think that it's pretty important that the mesh is on the 0x0x0 axis both before you convert to a brush, and when you convert back to the mesh, can save pointless readjusting later, especially if you are importing entire maps ( that's a whole new tutorial though, but this can also be done perfectly if you prep the map you are coming from, and set up the packages correctly, then it's just a simple copy and paste from editor to editor)

    As for the red brush not sometimes showing up after a convert, I think, if you click in an empty space first, then hold ctrl and move the mouse, it will move the red brush and make it show up (not tired this in unrealXMP, but I used to get this problem in another unreal engine game)

    Last thing I want to add to your tutorial as a warning to others, sometimes, although not too often, trying to convert a mesh to a brush will crash the editor and escort you to your desktop. No way around this that I'm aware of, although I did get lucky one resizing a mesh before I tried to convert to brush.
     
  9. GreatEmerald

    GreatEmerald Khnumhotep

    Joined:
    Jan 20, 2008
    Messages:
    4,042
    Likes Received:
    1
    Yes, that's right, copy pasting is basically the same as exporting T3D (you can even paste that in Notepad or such), although I don't think that pasting makes the editor load the needed textures?
    Yes, moving the brush does make it appear sometimes. But sometimes the conversion simply fails and the red brush has no dimensions at all.
     
  10. Toploader

    Toploader New Member

    Joined:
    Feb 13, 2010
    Messages:
    3
    Likes Received:
    0

    It does for the versions of the engine I've tried, but like I say I'm not 100% sure about unreal XMP.
     
  11. Manticore

    Manticore Official BUF Birthday Spammer

    Joined:
    Nov 5, 2003
    Messages:
    6,035
    Likes Received:
    143
    This is still a great guide.
     
  12. Leo(T.C.K.)

    Leo(T.C.K.) Well-Known Member

    Joined:
    May 14, 2006
    Messages:
    4,718
    Likes Received:
    30
    I forgot this tutorial existed, however I use a bit of a different method but tend to have problems with the pivots (I will just move the staticmeshes actors manually in the map instead, I'm not re-doing the packages again...)

    I don't convert the red brush I instead use a map t3d with the additive versions of brushes and convert those for example.
     

Share This Page