T3D File
The T3D file format or Unreal Text File holds a text list of Unreal map objects. An entire map can be saved as this file format, or just a single actor or brush.
Note that while brushes, their applied textures and light actors are saved, the Unreal Geometry itself is not saved: upon importing a T3D file the map must be built.
Copying objects from UnrealEd and pasting into a text editor produces the same format.
Unreal Text format
Exported brushes and (other) actors. See T3D file.
- Created by:
- UnrealEd's File → Import command
- UnrealEd's Brush → Import command (see Data Import and Export for more on both these commands).
- is this created by external stuff too?
Exporting T3D
- Export the whole map: File → Export...
- export one brush:
- export a part of a map: either save, delete discards and export as above, or select, copy, paste into a text editor and save as a T3D file
Importing t3d
File → Import...
(note importing may take a LONG time)
Overheard on #utjb...
<tarquin> t3d stores brushes & actors but not texturing, right? <Mychaeel> Texturing as well. (melds into the opening speech from Reservoir Dogs...) <DaveA>Stores links to textures, and texture transforms, but not the pixels themselves
The T3D format is a text file which stores information about map actors. It's in fact identical to what can be copied from UnrealEd to a text editor. An exported map looks like this:
Begin Map Begin Actor Class=LevelInfo Name=LevelInfo0 TimeSeconds=17.008888 Summary=LevelSummary'Entry.LevelSummary' DefaultGameType=Class'Botpack.UTIntro' AIProfile(0)=23784352 AIProfile(1)=52 AIProfile(2)=41 AIProfile(3)=42 AIProfile(4)=40 AIProfile(5)=44 AIProfile(6)=45 AIProfile(7)=21846171 AvgAITime=0.000000 Level=LevelInfo'Entry.LevelInfo0' Tag=LevelInfo Region=(Zone=LevelInfo'Entry.LevelInfo0',iLeaf=-1) Name=LevelInfo0 End Actor Begin Actor Class=Brush Name=Brush0 MainScale=(SheerAxis=SHEER_ZX) PostScale=(Scale=(X=0.250000,Y=8.000000,Z=3.000000),SheerAxis=SHEER_ZX) TempScale=(Scale=(X=0.250000,Y=8.000000,Z=3.000000),SheerAxis=SHEER_ZX) Level=LevelInfo'Entry.LevelInfo0' Tag=Brush Region=(Zone=ZoneInfo'Entry.ZoneInfo0',iLeaf=1,ZoneNumber=1) Location=(X=464.000000,Y=-16.000000,Z=64.000000) Begin Brush Name=Brush Begin PolyList Begin Polygon Item=OUTSIDE Texture=black1 Flags=4194304 Link=0 Origin -00160.000000,+00000.000000,+00128.000000 Normal +00000.000000,+00000.000000,+00001.000000 TextureU +00004.000000,+00000.000000,+00000.000000 TextureV +00000.000000,+00004.000000,+00000.000000 Vertex -00128.000000,-00128.000000,+00128.000000 Vertex +00128.000000,-00128.000000,+00128.000000 Vertex +00128.000000,+00128.000000,+00128.000000 Vertex -00128.000000,+00128.000000,+00128.000000 End Polygon ... End PolyList End Brush Brush=Model'Entry.Brush' Name=Brush0 End Actor Begin Actor Class=PlayerStart Name=PlayerStart0 Level=LevelInfo'Entry.LevelInfo0' Tag=PlayerStart Region=(Zone=ZoneInfo'Entry.ZoneInfo0',iLeaf=1,ZoneNumber=1) Location=(X=183.134430,Y=-987.334167,Z=33.978027) OldLocation=(X=-217.561523,Y=-44.538128,Z=-87.899948) Name=PlayerStart0 End Actor ... End Map
External link: http://unreal.jall.org/tutorials/t3d.html (new URL)
Loading T3D brush geometry
You must parse those informations correctly: PrePivot, Location, Rotation, MainScale, PostScale, TempScale, Polygon / Vertexes
FOR each vertex of each polygon of parsed brush DO: do MainScale ... x *= MainScale[x], y *= MainScale[y], z *= MainScale[z] do translation (-PrePivot[x], -PrePivot[y], -PrePivot[z]) do rotation Yaw, Pitch, Roll do PostScale ... x *= PostScale[x], y *= PostScale[y], z *= PostScale[z] do TempScale ... x *= TempScale[x], y *= TempScale[y], z *= TempScale[z] do translation (Location[x], Location[y], Location[z]) ENDFOR
For Yaw, Pitch, Roll rotation matrix see http://mathworld.wolfram.com/EulerAngles.html find correct matrix pitch-roll-yaw
Unknown (correct) effect: SheerAxis
TextureU, TextureV, PanU, PanV, Origin are information about how to apply texture for the polygon.
Python T3D loader (doesn't care about texture informations): http://carolina.mff.cuni.cz/~gib/ut_utils/unreal_t3d_loader.zip see readme.txt in zip file
T3D Utilities
- MapScale scales an entire .t3d file
- MeshMaker converts a prefab in .t3d format to a decoration
- [UnrealROC] converters: from 3DMF, to VRML/X3D/OBJ (including textures et al).
Related Topics
Kefik: There can be also a tag 'CsgOper' which have one of two values ... 'CSG_Subtract' → subtract the brush from space or 'CSG_Add' → add this brush to shape.
Sobiwan: New to WIKI editing, but not using it. I was searching for the actual format of T3D and found [Mongo's description] of [Planetunreal] to be extremely helpful. I'll ask him (mongo@planetunreal.com) if we can use and/or edit his description here. The format is much more involved than described here. We can even supply examples of how to do particular hacks.
MadNad: Interestingly, I was able to convert a [Quake3_Level] into a unreal map. Quite interesting. First i converted a *.bsp to a *.map in quake, then I made a level that was just a huge cube and converted it to *.t3d. With an external app (i'll have to find the name of it ) I was able to merge these two together. After some scaling and switching additive brushes in quake to subtractive brushes in ued and subtractive to additive, I compiled and had q3dm7 geometry. I don't necessarily recommend doing this, as it will take more time to fix than create it from scratch, but I thought I would share a little experience I had with this.