Download

Converting building fbx model to game level

Hello everyone,

We have a project where we’ve been given a .fbx file (880 mb) of a large building. The goal is to create a virtual walkthrough through through it with the oculus rift.
The model has quite a few different meshes but also many that are similar. The meshes are also sometimes made up in a, what I think for a game level, incovenient way (a wall that spans the height of multiple floors, for example, or objects made out of small building blocks). I have also spotted some clipping. We are allowed to contact the architect to request some changes to the model to make it fit better for this purpose.

We tried importing the model as a whole into the unreal engine with “combine meshes” unchecked but, after a while, windows gave a message that it was running out of memory and shortly after it shut the unreal engine down. This happened on a PC with 8 gb ram.

We have done quite a lot of investigation but we’ve reached a death end. As a last resort, we’re now considering seperating all the unique models from the building and building it from the ground up in the engine. I think this will take a lot of time. Is this a good idea? When I imported a window I got a wrapped UVs error when trying to build the lightning.

We appreciate anything that may help us get into the right direction. Thanks in advance. :slight_smile:

Hi Cyborgking,

The best workflow here would be to separate the mesh into separate objects, especially if they have already been unwrapped. You would not want to import this as a single mesh combined because you will then have overlapping UVs for sure.

For each mesh you’ll also want to make sure that you’re setting up a second UV channel for Lightmaps if you’re planning on using Static/Stationary lighting as this will be required since the lighting is then being baked into a lightmap texture. You cannot have overlapping UVs in the Lightmap UV though if you want to avoid incorrect shadowing.

A modular approach with asset and then assembling in UE4 is the best way to get the most control over your assets.

With regards to the 880mb file, this is a rather large file to import in a single go. I had a user asking about importing a 5 million poly mesh a couple weeks back that was 700mb and why it takes so long. This is a large file size to import. I tested on my machine (32gb of ram with a GTX 770) with a 12million poly mesh that was 596mb and it took nearly an hour to import. That was also without any embeded media, like textures, as well.

I hope this helps and if you have any questions don’t hesitate to ask! :slight_smile:

Tim

Also, if it’s an architectural file it’s probably not really designed for a game, the poly count may be much too high. Ultimately to get the best results you’d need to go through and look at each object and see what needs to be adjusted.

UE4 uses instancing of objects as well, so if you have some things that are used multiple times you can improve memory usage by importing only one of them into UE4 and then you can place the instanced copies around the level and it only will have to keep one in memory. There’s also tools for 3ds Max in the Content section that can help so that you can arrange your objects in 3ds Max and have it copy the locations over to UE4 so that they can be in the exact place you want them and get the best performance.

When I imported my Salk institute to Ue4 I broke the model in 4-5 parts. Total size was about 1 000 000 verts. It would have crashed if i’d imported it in one piece!!!

I did a similar project (file size wise) some time ago. I would probably go about it this way:

  • Import the FBX into 3ds Max
  • Split it up where it makes sense, doors, floors wall elements etc. Just make sure you don’t put to large chunks together cause that will create problems with the lightmaps
  • Objects which look similar to each other, like doors, wall elements and stuff, reuse them as much as possible
  • Poly heavy objects should be optimized or remodelled. CAD data can be a hazzle >< Alot of CAD data has polygons on top of each other (especially data from building models), this is something you should check ofc.
  • Unwrap everything with two uv channels. For the second uv channel you can use flatten mapping in 3ds Max
  • Set up proper normals
  • Export the individual chunks in their own FBX file
  • Rebuild the scene in UE4, and reuse as much as possible

That how I did it atleast :9

As stated above, the best way to import an archvis “level” is to separate the pieces into individual models (walls, floor/ceiling, window, chair, w/e), and export each individual asset and import into UE.

For example, if you have a 2 floor building:

The floor and ceiling is basically a cube, top is a floor texture, bottom is a ceiling texture. Then you would have 1 or 2 walls, cubed again (outside is the outside of the building, inside is the inside), 1 chair, 1 desk, 1 window, etc…

Then import the individual assets and position where they need to go.

I’ve been thinking about doing an archVis tutorial… we’ll see.

Also

The problems you will run into if importing as a single object is materials is assigned to the object as a sub-material. If you make an edit you would have to re-import the entire project again and if you add a new material to the mix it could scramble the material assignments. Also if you don’t name your materials in you host application what belongs to what is a nightmare.

Objects are culled if not in the visible view port and as a single object “everything” would be rendered even if it’s not visible and your walk through will turn into a crawl through.

As mentioned the lightmap thing. The UVmap layout will be massive, as well as the resolution and its anyone guess what will happen to draw calls.

Thanks everyone for your fast replies and workflow descriptions! :slight_smile: Good to know about the UVs for lightmapping. We’re glad to have some confirmations on some topics.

We’ll look into those tools that darthviper107 mentioned and inspect the meshes some more.

Thanks again for your awesome support! :slight_smile:

I had this same issue, with my undergrad thesis vr museum project. The 3d artist went well over board on polycount and what what not on the original model so each part had to be break up into parts. I had to get the project running a mobile laptop GPU so that didn’t help out ether. This is how the project end up coming before getting canceled
UE4VRMS1.jpg

Would be nice for “artist” friendly talk for neewbies