CityEngine to UE4 pipeline

Hey guys, I’m looking for a way to export a whole city from CityEngine to Unreal Engine as an Unreal Map, not an FBX. Why? Well, I want to keep the benefits of mesh instancing and oclusion culling, so I don’t want a huge mesh of my whole city.

I’ve been searching for this for the past week and I’ve found a couple of old threads (2010) that points to broken links of website. And I’ve also seen a couple of videos, where they use a Python script to export a t3d file.
I haven’t found this script anywhere, nor documentation about how a t3d file is supposed to be. I know anything about Python either, although I’ve got programming knowledge.

What I’m trying to do, is to get all the models from the CityEngine scene, import them into UE4, and import a t3d file which should have the position/rotation/scale of each (instance) model in the world. So, at the end of the day, this should be like if I’d have placed each model inside UE4 editor.

I know this is possible somehow lol. Although, to me, it doesn’t seems too clear right now, since I’m new to CityEngine and also to UE4 (been using Unreal for a month now, although I’ve got some game development knowledge).

So, does anyone has a copy of this old T3D export script? Or even better, does anyone has an updated one?
If not, can someone point me to some documentation about generating T3D files? or T3D files itself?

I think that’s it, thank in advance!
(by the way, I’m Spanish speaker, so sorry for my mistakes when putting my words into English)

You cant, there isnt a single way to port content beetween different engines. You wouldneed to re import all your meshes into UE4 then bulld the level again.

vblanco thank you for your answer, but is there anyway that you can prove that? I mean, if a t3d file can hold information about pos/rot/scale of each actor in a level, then you should be able to generate it using the right asset names (previously imported to UE4) with any programming language, I mean, it’s just a text file isn’t it? Or am I missing something here?

You could create a plugin for that. But I don’t think there’s a native support on UE4 for t3d files.

Mielke thanks. But I think you’re wrong, T3D files are Unreal Text. If you go to File > Import the default file format is T3D. Also, T3D is the copy/paste format that UE4 uses, so there must be support for T3D.

Separately from T3D, modern versions of FBX do support mesh instancing. I don’t know if CityEngine supports exporting that, and I don’t know if Unreal pays attention when importing, but the FBX file format does support the concept.

Wow, that’s really cool. I think CityEngine does support it, since the FBX export has an option that says “Reuse asset instances, merge generated meshes by materials”, so I belive it does support it.
I’ll check UE4 docs to see if I find something about it. Thanks jwatte!

Well, after googling for a while I think UE4 does not support FBX mesh instancing when importing. Looks like generating a T3D or UMAP is the only way.

But, you can’t import files as a map… It doesn’t work like that. Map’s don’t store mesh information, they store small things like “location of this mesh”, so on and so forth. Those meshes are separate .uasset files found elsewhere in your content folder, they’re just referenced by the map file if they’re present in it. Map files also store other things, like the level blueprint, gamemode type etc. Those references are also very finicky, and where possible shouldn’t ever change. If you even found a way to convert something from one format to a .uasset map file, how would it know where to find those objects?

From what I understand, T3D support is actually a legacy feature and isn’t widely used anywhere. T3D is just a universal way to store binary information so that files can be exported and imported whenever, but in an Unreal format. Effectively .uasset is it’s ‘replacement’. Before you never saw that, because everything was store in .upk files. I don’t think it ever supported map exports anyway, only content objects.

Your best approach, is to generate your city and somehow get it into a modelling program like Maya or 3DS Max. Separate or cut up your buildings into separate mesh assets, extract your textures as texture maps, import those, and import the separated meshes as FBX files. Create your materials and you’re away. You just paste instanced meshes where possible, in Unreal terms that means IDENTICAL meshes. That IS the Unreal 4 pipeline, you can’t just change that willy-nilly. You’ll have to place the meshes manually of course, but with CityEngine open next to you on another screen that probably isn’t too difficult. Time-consuming yes, but it’s the only real way.

TheJamsh thank you very much for your answer, I still think it’s pretty possible to generate a T3D file with the loc/rot/scale of each mesh, import each mesh as separate fbx into UE4 and then import the T3D file which must point correctly to each .uasset in the content folder. But well, I don’t have the slightest idea of how a t3d file is supposed to be componed and neither do I know how to code Python for CityEngine. So, I’ll try to find out more about this and post here.


I’m not really sure what you want to do is possible. As TheJamsh was saying, you’d basically have to re-work UE4’s entire pipeline.
However, I have one question: What are you going to use the city for?

See, CityEngine is great for skyline renders and all that, but almost every building (if not every building) consist of one very low poly mesh. Using this in a game world won’t really look too good (though it would probably run nicely) unless your going for a blocky feel. Plus, the sizing proportions in terms of UE4 are most likely off, forcing you to resize your city and subsequently destroying everything you wanted to keep (or at the least make it look worse).

Of course if you just wanted a scene it would be fine, but the only high detailed scene you can really do is a skyline one. Anything closer and the illusion of detail is lost.

If you wanted to put this into UE4 there would things you need to edit with the meshes anyway, so why not just make them modular?

I’ll go and play around in City Engine and see if I can confirm this… or maybe someone else can in the meantime.

~ Jason

Hey Jason, thanks for helping out. I’m working on this game which the main scene will be three little cities. Something like State Of Decay but a little bigger maybe.
What I really like about CityEngine are the streets system. About the buildings, for this particular case, I’ll probably put them by hand, since I’m planning on making some interiors, and other stuff.

But what I really don’t want to do is to place 10000 street lamps, despite that, even If I won’t make it procedurally, it’s gonna be a really pain in the a** to make some streets like CityEngine’s one; I mean, the crossings, diagonals etc; CityEngine is kinda powerfull in that way.

Well I know my other choise is Houdini, since I’ve seen that amazing Freek Hoekstra’s video. But well, making a Digital Asset for Houdini to generate a City ain’t as easy as it seems lol. (BTW, I think Freek uses a T3D file as export from Houdini too)

So I’m kinda stuck. I really don’t wanna export those streets as FBXs files.

I hear you.
I wouldn’t want to export all that either!

However, I do wonder if there is a way to … say export the streets in a modular way.
Sure it would be a bit of work, but at least you won’t be dealing with 1 billion tiny pieces.

Houdini really isn’t that good for game worlds as far as I know. Its better if you are doing a scene…

Which leads me to something.
Do you think you can generate the world through code?
If you get a base street you can procedurally generate a game world.
Its how games like “Whereami?” was made (well ok that was in Unity, but you get the idea).
Could coding that be an option for your game?

~ Jason

Hey Jason, I think for now, I’m gonna export some parts of the streets like a straight one, crossing, diagonals, free way and try to create the world inside the editor, using specific parts… It’s not what I had in mind, since It’ll be much more work, but for now it seems the way to go, although I haven’t though about generating it with code to be honest.
Thanks again.

Couldn’t you write a custom script, since CityEngine supports Python, that exports every unique mesh to its own FBX file and generate a layout file containing the transforms for every object in the city? You should then be able to reverse the process with a custom plugin for Unreal that imports the meshes and places instances of them according to the layout file.