Announcement

Collapse
No announcement yet.

UT3-to-UT2k4 Translator

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    UT3-to-UT2k4 Translator

    This is not a request for something within the game but for an external application. Maybe someone can write such a thing in Java or any other programming language of his choice. I am just a beginner in Java and have no clue how to read or write textfiles with it, so that's why I ask someone else to do it.


    Now what the program should do, is a process that would take half an eternity if done by hand: It should translate the plain text that you get if you select actors in the editor and copy-paste them into a text editor from UE3-style to UE2-style. It should only be done for brushes, as everything else would require the StaticMeshes of that game. (But on the other hand: why shouldn't it work for lights too?)

    So the program should walk through the input txt-file in which the user pasted all the brush data of a map and write them into a new output txt-file.
    It then should search for certain keywords that tells it where it's currently in the file and which informations it should write to the output.


    Helpful is knowledge about the anatomy of such copy-pasted actors in both engines. This is how it looks:

    UE2:
    Code:
    Begin Map
    Begin Actor Class=Brush Name=Brush50
        CsgOper=CSG_Subtract
        MainScale=(SheerAxis=SHEER_ZX)
        PostScale=(SheerAxis=SHEER_ZX)
        bLightChanged=True
        Level=LevelInfo'myLevel.LevelInfo0'
        Region=(Zone=ZoneInfo'myLevel.ZoneInfo0',iLeaf=36,ZoneNumber=1)
        Tag="Brush"
        PhysicsVolume=DefaultPhysicsVolume'myLevel.DefaultPhysicsVolume0'
        Location=(X=-1408.000000,Y=-1024.000000,Z=8192.000000)
        Begin Brush Name=Model51
           Begin PolyList
              Begin Polygon Texture=HumanoidArchitecture.Floors.flr03HA Link=0
                 Origin   +00000.000000,+00000.000000,+00000.000000
                 Normal   +00000.000000,+00000.000000,-00001.000000
                 TextureU -00001.000000,+00000.000000,+00000.000000
                 TextureV +00000.000000,-00001.000000,+00000.000000
                 Vertex   -00383.999969,-01408.000000,-03712.000000
                 Vertex   -00383.999969,-02048.000000,-03712.000000
                 Vertex   -01024.000000,-02048.000000,-03712.000000
                 Vertex   -01024.000000,-01408.000000,-03712.000000
              End Polygon
              Begin Polygon Texture=Shiptech.Walls.Wal21CS Link=1
                 Origin   +00000.000000,+00000.000000,+00000.000000
                 Normal   +00000.000000,-00001.000000,+00000.000000
                 TextureU +00001.000000,+00000.000000,+00000.000000
                 TextureV +00000.000000,+00000.000000,-00001.000000
                 Vertex   -01408.000000,-01024.000000,+08192.000000
                 Vertex   -02048.000000,-01024.000000,+08192.000000
                 Vertex   -02048.000000,-01024.000000,-03200.000000
                 Vertex   -01408.000000,-01024.000000,-02944.000000
              End Polygon
        .
        .
        .
             Brush=Model'myLevel.Model70'
    
    
        PrePivot=(X=-1408.000000,Y=-1024.000000,Z=8192.000000)
        bSelected=True
    End Actor
        .
        .
        .
    Begin Surface
    End Surface
    End Map

    UE3:
    Code:
    Begin Map
       Begin Level
          Begin Actor Class=Brush Name=Brush_4 Archetype=Brush'Engine.Default__Brush'
             Begin Object Class=BrushComponent Name=BrushComponent0 ObjName=BrushComponent_5 Archetype=BrushComponent'Engine.Default__Brush:BrushComponent0'
                Brush=Model'Model_3'
                LightingChannels=(bInitialized=True,Dynamic=True)
                Name="BrushComponent_5"
                ObjectArchetype=BrushComponent'Engine.Default__Brush:BrushComponent0'
             End Object
             CsgOper=CSG_Add
             Begin Brush Name=Model_3
                Begin PolyList
                   Begin Polygon Texture=WAR-BeachFront.Material.bigRoughBricksMaterial Flags=3584 Link=0 LightingChannels=2051
                      Origin   +04095.998047,-08447.995117,-00512.000000
                      Normal   +00000.000000,-00001.000000,+00000.000000
                      TextureU -00000.500000,-00000.000000,+00000.000000
                      TextureV +00000.000000,+00000.000000,-00000.500000
                      Vertex   +00511.999786,-01023.999634,-00512.000000
                      Vertex   +00511.999786,-01023.999634,+00256.000000
                      Vertex   -01023.999878,-01024.000122,+00256.000000
                      Vertex   -01023.999878,-01024.000122,-00512.000000
                   End Polygon
                   Begin Polygon Texture=WAR-BeachFront.Material.bigRoughBricksMaterial Flags=3584 Link=1
                      Origin   +04095.998047,-08447.995117,-00512.000000
                      Normal   -00001.000000,-00000.000000,+00000.000000
                      TextureU +00000.000000,+00000.500000,+00000.000000
                      TextureV +00000.000000,+00000.000000,-00000.500000
                      Vertex   -01023.999878,-01024.000122,-00512.000000
                      Vertex   -01023.999878,-01024.000122,+00256.000000
                      Vertex   -01024.000122,+01023.999878,+00256.000000
                      Vertex   -01024.000122,+01023.999878,-00512.000000
                   End Polygon
                   Begin Polygon Texture=WAR-BeachFront.Material.bigRoughBricksMaterial Flags=3584 Link=2
                      Origin   +04095.998047,-08447.995117,-00512.000000
                      Normal   +00000.000000,+00001.000000,+00000.000000
                      TextureU +00000.500000,+00000.000000,+00000.000000
                      TextureV +00000.000000,+00000.000000,-00000.500000
                      Vertex   -01024.000122,+01023.999878,-00512.000000
                      Vertex   -01024.000122,+01023.999878,+00256.000000
                      Vertex   +00511.999756,+01023.999329,+00256.000000
                      Vertex   +00511.999756,+01023.999329,-00512.000000
                   End Polygon
                   Begin Polygon Texture=WAR-BeachFront.Material.bigRoughBricksMaterial Flags=3584 Link=3
                      Origin   +04095.998047,-08447.995117,-00512.000000
                      Normal   +00001.000000,+00000.000000,+00000.000000
                      TextureU +00000.000000,-00000.500000,+00000.000000
                      TextureV +00000.000000,+00000.000000,-00000.500000
                      Vertex   +00511.999756,+01023.999329,-00512.000000
                      Vertex   +00511.999756,+01023.999329,+00256.000000
                      Vertex   +00511.999786,-01023.999634,+00256.000000
                      Vertex   +00511.999786,-01023.999634,-00512.000000
                   End Polygon
                   Begin Polygon Texture=WAR-BeachFront.Material.yeOldeTiles Flags=3584 Link=4
                      Origin   +04095.998047,-08447.995117,-00512.000000
                      Normal   +00000.000000,+00000.000000,+00001.000000
                      TextureU -00000.250000,-00000.000000,+00000.000000
                      TextureV +00000.000000,-00000.250000,+00000.000000
                      Vertex   -01023.999878,-01024.000122,+00256.000000
                      Vertex   +00511.999786,-01023.999634,+00256.000000
                      Vertex   +00511.999756,+01023.999329,+00256.000000
                      Vertex   -01024.000122,+01023.999878,+00256.000000
                   End Polygon
                   Begin Polygon Texture=LT_Buildings2.BSP.Materials.M_LT_Buildings_BSP_Bunkerwall1a Flags=3584 Link=5
                      Origin   +04095.998047,-08447.995117,-00512.000000
                      Normal   +00000.000000,+00000.000000,-00001.000000
                      TextureU -00000.000000,+00000.500000,+00000.000000
                      TextureV +00000.500000,+00000.000000,+00000.000000
                      Vertex   +00511.999786,-01023.999634,-00512.000000
                      Vertex   -01023.999878,-01024.000122,-00512.000000
                      Vertex   -01024.000122,+01023.999878,-00512.000000
                      Vertex   +00511.999756,+01023.999329,-00512.000000
                   End Polygon
                End PolyList
             End Brush
             Brush=Model'Model_3'
             BrushComponent=BrushComponent'BrushComponent_5'
             Components(0)=BrushComponent'BrushComponent_5'
             Tag="Brush"
             Location=(X=-4095.998047,Y=8447.995117,Z=512.000000)
             CollisionComponent=BrushComponent'BrushComponent_5'
             Name="Brush_4"
             ObjectArchetype=Brush'Engine.Default__Brush'
          End Actor
          Begin Actor Class=Brush Name=Brush_5 Archetype=Brush'Engine.Default__Brush'
             Begin Object Class=BrushComponent Name=BrushComponent0 ObjName=BrushComponent_6 Archetype=BrushComponent'Engine.Default__Brush:BrushComponent0'
                Brush=Model'Model_4'
                LightingChannels=(bInitialized=True,Dynamic=True)
                Name="BrushComponent_6"
                ObjectArchetype=BrushComponent'Engine.Default__Brush:BrushComponent0'
             End Object
             CsgOper=CSG_Subtract
             Begin Brush Name=Model_4
                Begin PolyList
                   Begin Polygon Texture=WAR-BeachFront.Material.darkTile Flags=3584 Link=0
                      Origin   +04287.997070,-08255.995117,-00512.000000
                      Normal   +00000.000000,-00001.000000,+00000.000000
                      TextureU +00000.500000,+00000.000000,+00000.000000
                      TextureV +00000.000000,+00000.000000,-00000.500000
                      Vertex   +00671.999878,-00767.999817,-00496.000000
                      Vertex   +00671.999878,-00767.999817,+00128.000000
                      Vertex   -00831.999939,-00767.999878,+00128.000000
                      Vertex   -00831.999939,-00767.999878,-00496.000000
                   End Polygon
                   Begin Polygon Texture=EngineMaterials.DefaultMaterial Flags=3584 Link=1
                      Origin   +04287.997070,-08255.995117,-00512.000000
                      Normal   -00001.000000,+00000.000000,+00000.000000
                      TextureU +00000.000000,-00000.500000,+00000.000000
                      TextureV +00000.000000,+00000.000000,-00000.500000
                      Vertex   -00831.999939,-00767.999878,-00496.000000
                      Vertex   -00831.999939,-00767.999878,+00128.000000
                      Vertex   -00831.999817,+00191.999878,+00128.000000
                      Vertex   -00831.999817,+00191.999878,-00496.000000
                   End Polygon
            .
            .
            .
          End Actor
            .
            .
            .
    End Level
    Begin Surface
    End Surface
    End Map

    As you can see there are many similarities and some differences.

    UE3 has a single "Begin Level"-scope and an "Object"-scope in every entry (which defines the Archtype) that need to be removed.

    And the only entry that is relevant in UE2 between the "End Brush" and "End Actor" is the Brush=Model'myLevel.Model70' (but this is a myLevel-reference in UE2, dunno if it works right away. Maybe it can be left out).


    And in the "Polygon" definition are surface flags, but maybe the stuff that I got here just didn't have any flags. It's taken from ONS-SPAMBOX..

    For the sake of compatibility should all texture references here be set to the default texture or another one that is already loaded at editor start, the mapper can choose matching textures by himself then.


    So if anyone could do this, then it would be a great facilitation for those who try to make exact remakes of UT3-maps.

    #2
    this is for the UT3Converter, right? And if you look at it there, there are the txt files that correspond to the UT3 classes and others that correspond to the UT2k4 classes, you just need to make the process in the opposite direction, but UT3 has more actors that UT2k4 doesn't has, so these actors that UT2k4 doesn't has could be transformed in actors that are similar or even actors that are made by the community that make the same thing. i hope this long and boring test helped you

    Comment


      #3
      What UT3Converter? I thought this to be a new program, but if there already is one...


      Yeah, you could probably also convert lights (maybe distinguishing normal Lights, Spotlights and Sunlights) and maybe also PathNodes.

      StaticMeshes not, but maybe Flag and Cores and Nodes, although those could be easily placed by hand.
      The single TerrainInfo is more easily set up by hand, but does someone know if there is a heightmap for Terrain in UT3? I once tried to export one but it didn't work. Maybe because the map was cooked (does that add some kind of protection?).

      Comment


        #4
        UT3 actually exports the heightmap in text form. A converter tool would have to convert it to a 16 bit grayscale BMP.

        Comment


          #5
          UT3Converter converts maps from UT2004>UT3, UT99>UT2004, and so on, I think that it would be some how easy to make it to convert maps from UT3 to UT2004, since the process would be the inverse. It has all the games classes in txt files. this may be what you are looking for, a java program that converts maps between games, it just doesn't currently supports the conversion of maps from newer games to older games(they are working on it). You can check out UT3Converter here.

          Comment


            #6
            Crusha, in ONS-Avalanche I exported the main terrain from UT3 and imported it into 2k4 so it is definitely possible.

            Comment


              #7
              Originally posted by Sanch3z View Post
              Crusha, in ONS-Avalanche I exported the main terrain from UT3 and imported it into 2k4 so it is definitely possible.
              You did? I tried to export the Terrain from WAR-TankCrossing, but all I got was this:

              Comment


                #8
                Isn't that the texture layer map?

                Comment


                  #9
                  Heightmaps are 16 bit grayscale images. Most graphics programs don't know how to work with those. A graphics program usually interprets it as 16 bit color image, but there are a few specialized tools like G16Ed that can load and edit them.

                  Comment


                    #10
                    Originally posted by Crusha K. Rool View Post
                    You did? I tried to export the Terrain from WAR-TankCrossing, but all I got was this
                    yes but I dont exactly remember how I did it I didnt, and still dont, have any plans to remake any other UT3 maps so I didnt make any note of how it was done.

                    I know I copied the avalanche terrain and pasted it in an empty map and stripped out the material layers first.

                    Comment


                      #11
                      any luck on figuring out how to convert UT3 BSP to 2k4? I wouldnt mind being a part of a few projects since work on my original map has stalled. Shall we make a 2k4 port of WAR-Downtown Crusha?

                      Comment


                        #12
                        Me votes any Necris themed UT3 map

                        Comment


                          #13
                          Well, basically you would just need to Select all Brush in WAR-Downtown, then copy-paste that into a text editor and apply the changes as I mentioned in the beginning of this thread. Then it should work in UT2k4 (of course you should replace every reference to a UT3-texture to one from UT2k4).

                          The only problem is the amount of things that needed to be changed by hand, that's why I suggested to write a program that applies the changes by following a set of rules, considering the amount of BSP in a map like Downtown.

                          I can't do that, but maybe someone else could. Otherwise you would need to take some time for yourself and change the text file by hand.

                          Comment


                            #14
                            yeah I was looking at your t3d comparisons and doing it by hand would be a bit of work. Also in UE2 t3d there is a "location" parameter for each brush and no such parameter in UE3. I really wouldnt know what to do with that.

                            Last night I tried selecting all brushes in Downtown, copying to an empty map, ripping that, convert to static mesh in 3dsmax, import into 2k4. The idea was that I could build the BSP from scratch around the static mesh then delete the mesh. That didnt work so well.

                            Comment


                              #15
                              Originally posted by Sanch3z View Post
                              yes but I dont exactly remember how I did it I didnt, and still dont, have any plans to remake any other UT3 maps so I didnt make any note of how it was done.

                              I know I copied the avalanche terrain and pasted it in an empty map and stripped out the material layers first.
                              That's a shame - I have a WAR map I was making for UT3 that I kind of lost interest in finishing for that game, but wanted to make for UT2004. Unfortunately I don't know that I have the original heightmap outside of the UT3 WIP terrain...

                              As for Downtown, I can try to export from UT3 and see if I can get it into 2k4 sometime soon.

                              Comment

                              Working...
                              X