FBX workflow for more complex objects

Hi guys

I am currently working on a level and have come across a few questions on the best workflow to bring in assets (mostly static meshes in this case) from DCC tools into UE.

While it is relatively straightforward for simple objects, I’m struggling a bit with the more complex ones. Let’s say I have a complete building modeled in Maya, which consists of around 100 meshes. If I understand the (modular) UE approach correctly, I would import these pieces individually (unchecking “combine meshes”) and assemble the whole thing again in the Editor. This would require that I also relocate all meshes (in Maya) to world center before exporting them - if I don’t do that I get pivots all over the place.

This all seems overly complicated and laborous. Am I missing something here?

It would be lovely to import an FBX as individual pieces and place all those in the level with correct relative positions in one go (e.g. using groups from the DCC tool).

I assume the “correct” approach would be:

  • Combine the geometry of the original meshes in a meaningful way to create less pieces for assembly in UE
  • Re-do the UVs for the combined geometry & export the combined meshes
  • Import each of the combines meshes & place

Can anyone share any experience / best practices on this?

Cheers,
michael

I normally just group everything, and export the group.

@Crow87

Ant then you import it as a single mesh, or split it up and place in the level independently? What does the group do in UE? As far as I’ve seen, groups don’t get imported into UE…

I just bring it in as a single mesh, with combining disabled - its kept as a single entity, but you can influence the various parts.

Let’s say you have a building with 20 separate parts; you export them all, then import without combine meshes selected. Then drag one part into the scene and set it’s location coordinates to 0,0,0, and do this for the rest of the meshes. They will all be placed at where they were in your modeling software. It can be cumbersome sometimes, but maybe a solution can be found via plugins or Blutilities in the future.

@Crow87: I have my meshes grouped in Maya as well, but when I import the stuff with combining disabled, I just get individual items (its not kept as a single entity). Do you use any special settings in the FBX export? Or do you just mean the selection sets when you say “influence”?

I think I might have to adapt my workflow to a more modular way of thinking…It does makes sense, but I’m used to do the assemblies in Maya, not the Engine…

Same problem

IMX,

I am in the exact same situation, Maya, many objects and no way to import them in proper transforms hierarchy in UE… does anyone has a thorough answer to this? I think transform groups + hierarchies are a must in the UE static meshes management…or maybe I’m missing some big button to press somewhere:)

p.s.
referencing system for external files would be interesting too… or maybe a Maya to UE mesh plugin… :cool:

The full workflow is as follows:

(A) Build all your assets in any 3d modelling program, (Maya, 3DS Max, Blender etc) - this can be an entire world, split into different districts, (as in Liberty city in the Grand Theft Auto series) . Make sure you separate your world up into smaller districts of map sections, (mainly for an idea of where everything is, but not readable by your game engine)
Apply your materials to each object and assign the correct Mat ID’s to each model so that UE4 knows which group of poly’s to assign each multiple set of materials to.
(B) Create selection sets or groups, (to make your export tasks easier to manage with massive groups of models) - but, UE4 and UE3 will not recognise those groups, selection sets or whatever. Wherever your models were placed in your Maya or 3Ds Max world, they can be place in the exact same place in UE4, by selecting 0-0-0 in their transform coordinates. Try to import smallish groups of models to avoid the engine content browser from bogging down in creating hundreds of materials. Once they’re in the browser, they can be placed in the world transforming each axis to zero, as explained above. Always uncheck combine models in the import settings, because if your models have a material ID set of 1-2-3-or 5, UE4 will not know where to assign materials of the various models.
(C) If your imported models were exported with embedded media checked in the FBX export settings, your textures will be contained within the FBX, so UE4 can find them if you checked import textures and materials into UE4. UE4 will make basic materials out of the imported textures and not recognise any fancy Maya or 3Ds Max materials, neither will it recognise Mental ray or V-ray texture or material channels.
(D) Take your time in following the above steps, (read up or watch tutorials on anything you don’t understand in my description above. For example, most new users to modelling or the workflow from modelling to game content, aren’t aware of the Material ID system that all versions Unreal Engine and of 99% of game engines use. It’s simple stuff, but if you don’t know, it’s as complicated as quantum physics. :slight_smile: :cool:

1 Like

Just to add some context, the main issues with importing whole scenes or large chunks of scenes as a single mesh are:

  • if any part of a mesh (determined by bounds) is visible, the entire mesh is rendered. You can’t occlusion cull a part of a mesh. So, if your whole scene is one mesh, it is always all being rendered. If you have large chunks imported as single meshes, they are much less likely to be culled based on visibility. Whereas, when you break things up, you can improve those chances immensely and improve rendering efficiency. I believe this is also a problem when building the scene in an external program and importing it as individual meshes without moving them to the origin as the pivot is considered when calculating bounds. Referencing would be a way to allow you to build the scene there and avoid this issue I would think, but then you would still have to import individually (from each referenced scene) and rebuild the scene in Unreal. So it’s not the most efficient workflow.
  • using the same mesh multiple times has the same memory cost as using it once. So, if you build modular pieces and use those over and over to build your level, you can decrease memory usage dramatically. If you used the same geometry multiple times in your scene in Max or Maya but then import that as a single mesh, you are paying the memory cost for the whole thing and losing the benefits of instancing.
1 Like

Hi Dave &

Thanks a lot for the tips guys, they certainly helped! I think I have my basic game engine / UE workflow together now and can start tweaking and optimizing it.

Cheers,
Michael

Just to add importing an entire scene can take forever if it imports at all.

A work flow tip as how I like to do things is to get stuff out of app A and into app B as soon as possible to see how things are going as to the use of space.

How things are imported into UE4 as to origin is the same as to how things are built in 3ds Max as to it’s origin. Build a pre-fab relative to 0 0 0 then that’s where it will snap in UE and objects that are placed relative to world space in Max is the same position the object will import into UE’s world space. Excellent for making proxies as your placement will be absolute and you only need to type 0 0 0 for it’s origin.

But what really works well for me as to best practice is to ignore best practice and not put to much into mico managing the things that goes wrong or fixing things that will take a fair amount of time and effort. Managing details at this stage is a time vampire and even if you fix it there is a high probability that your going to change it anyways.

Making things like buildings as to fit to finish.

My rule number 1 as stated is to get it in and get it in as soon as possible and you can use folders to isolate until you can figure out what’s common that you can switch to instancing.

For example a fit to finish highly detailed skyscraper with a thousand windows has a memory foot print equal to a thousand windows so “seeing” this you can make a window prefab and now your memory foot print of a thousand windows will be equal to just one. Could even break it down even further if the window is made up of a dozen or so sub objects based on a box primitive you could fab the window frame by instancing the perfect single six sided box and now your memory foot print of a thousand highly detailed windows is equal to the single box primitive.

All of this goodness if you start by ignoring best practice as to being static and make decisions based on what you see and ask the question based on context as in I have a skyscraper with a thousand windows what are my options as to best practice of maintaining an optimized environment.

And last.

To keep everything on the track I look at everything I put into 3D space as having a fixed cost. A mesh object each face is worth a buck, a complex material is worth 20 bucks, so using the skyscraper example with a thousand windows my total construction cost for the windows is 26 bucks.

OH and just to add.

What would be really nice as to FBX work flow is if UE could at some point tie into Autodesks “send-to” feature.

1 Like

Hi Frankie, talking of your 1000 window tower, is there a way to export the max positions of these 1000 items. Or does the whole building need to be rebuilt in UE. As far as Ive seen Unreal cannot import instances from FBX.

If you are using Max I posted this last weekend:

And just to clarify, is quite right, however you need to be careful with the level of granularity of your modular pieces. Even though they will save render time, the number of objects will increase which will impact the CPU. It’s a matter of finding a sweet spot

If your building it’s going to be seen from street level, you most likely want to keep the ground level and first/ second floor modular, them as soon as possible make the higher up floors into bigger meshes and bake the geometry details into a normal map and a height map.

Also if you are building a large city scene, LODs are your friends.

Occlusion is going to play one of the most important roles and yes, putting everything together in a DCC app and exporting it “in place” is BAD idea.

1 Like

Hi Swat3d, I saw your export tool as well. It had some really great functionality for Asset creation. What I think is needed is a maxscript in which each instance in max can be pointed at an asset in Unreal.

As most of our projects are architectural, hand placing 100s of items in UE is not practical. The better way to do it is to break the scene up into modular pieces (of around 500 polys each) and export them to Assets. Then do another export to create a t3d file that exports their location in 3dsmax (or Maya).

Hey Voltaire,

Of course the best workflow always depends on the type of project you are working on. I was talking from a game point of view where there are a bunch of things like AI, etc going on in the CPU.

By exporting in place i mean as “unique” meshes

I will try to look into the T3D feature for sure, Thanks for the feedback.

Hi Swat3D,

This guy () 3ds Max Object Placement Scripts - Programming & Scripting - Epic Developer Community Forums
is very close to making a working T3D instance exporter. Im looking for ways to improve on it.

Although you can make instance and reference objects in 3ds Max the information is not exported by FBX, as far as I know.

Well yes and no. Yes as in “everything” but no as in it’s a great way using an DCC app you are familiar with to quickly proxy in your map as a single chunk to define space and volume as to relative scale.

Rule number one should be to get in as fast as possible your base environment volume to establish the overall scale of the environment using the player model as the relative object.

What makes for a bad idea is with in the context of the idea that goes against best practice. The 1000 windows idea for example it would be a good idea to do the building as a box primitive as part of a single export but exporting the building with a 1000 windows in place is not a good idea.

Using an app like 3ds Max one could layout their entire environment in a few hours to a couple of days taking into consideration what the engine can do as far as optimization goes.

FBX actually supports instancing, but UDK doesn’t do anything with it. If they wanted it to work they could do something like what Unity does–if it has instanced objects then import a single object and then create a prefab with the instances.

Hi All,

So i’m new to this and trying to use UE for ArchViz. I made my model in SketchUp and applied basic materials. I imported as a combined mesh so I could easily apply UE4 materials (eg apply UE4 to a floor of my building, all floors become wood.) When I build the lighting it was not happy. Is this because it is too complex a shape to map UVs? I tried importing as non-combined mesh and I have 1000’s of small meshes. I brought them into the level together but now applying materials will take days!

What is the best way to get this complex building into the engine without sacrificing the ease to mass apply materials?

(Also what is wrong with my point lights?)

Thanks in advance!