Convert to Static Mesh Performance

Cheers fellow developers!

I’ve created a modular set of assets, which uses single material. I can use them, to recreate more complex structures. However using grouping or recreating more complex combinations is not that efficient, to repeat certain asset combinations. Here comes a very useful feature of Unreal Engine is “Convert to Static Mesh”.

I can build some kind of structure with my modular assets and then save it as another static mesh (similar to prefabs). Also this is very usefull for auto LODs. However I have a question about performance of this kind of created in-editor static meshes. When you look at them, there’s as many slots for materials (elements), as objects used to create this static mesh.

My question - is it better to create complex structures in 3D editor and import them into project, or converting group of static meshes into complex static mesh doesn’t affect performance (draw calls, memory)?

Is better use modular and procedural content becouse you can build tons and tons of content realy fast so at the end is better use modular that build all in 3D software. And after in gameplay you can script evrething you want to do with different part of the modular structure to make it customazible in game. Yeah the performance is changing but you make more content in less time. Is like the coise to use C++ our Blueprints. If you know both you usualy use blueprint beceouse they are faster and you can easy found and correct bugs and implemente new feature. However making all in 3D software and all in C++ is better for performance but you need 10x more people to achive the same end result in terms of content.

Aniway all biggest open world games was made by modular and procedural content.

About the conversion is usefull if you dont need to modify the model durning the gameplay our changing basic strucutre. So after you build a template example a empty house is better save all in 1 static mesh but if you need to access to the doors to make them oppen you need that door not be in the static mesh. So all you need be static is better to convert in single static mesh, all you need to be Dynamic you need to place it as different objects. And yes in terms of performance is a good coise to make this operation.

I’m sorry, but you’ve retreaded everything I already know. My question was about actual performance difference between couple meshes converted to static mesh within editor and same meshes exported from 3D editor as same combination.

If is the same quantity of elements you use in both there is no difference in performance diference. If after combine in 3D software you optimize it it can be better but combining meshes in 3d software and made it in ue4 changing nothing there is the some quantity of vertex, tris, materials etc etc. The difference realy is was in that in 3d software you can optimize a big scene in ue4 direcly you cant. But you still export the final mesh you combined in ue4 by using export fbx file of this asset and optimize it in your 3d software then bring it back to ue4 it can help if you want to do it.

Now that made me think :3 I’ve checked it out, by exporting Converted to static mesh asset as .fbx and importing it into 3D editor. Indeed, there’s literally no difference between combined in UE and combined in 3D editor meshes. My confusion came from Converted to static mesh detail panel, where there were as many material slots, as many meshes were used. But, apparently, those slots can be simply deleted.

I think, if you convert 2 objects to a new static mesh, unreal will keep the materials. Imagine you got a box and a glass door and want to combine them. of course u need the glass material, and the wooden material. In your combined mesh.
However, if all of your assets uses the same material, then the “Merge Actors” or BSP “create static mesh” will only assign 1 material on the whole mesh, even if it’s a material instance.

So i created a some BSP-Cubes, set material, converted them to SM, only 1 Material slot used, I Merged 3 static meshes with the same material, only 1 slot used. So how exactly do you merge the meshes? do you export as fbx or something?

You’re talking about BSP merging, and I’m talking about imported static meshes with their own materials.

Sry, i didn’t get you clear: This is the solution i found after some testing:

You can Merge an Mesh with itself, and it will combine all same-material slots.

  1. create static mesh with 2+ material slots with same materials
  2. place it in the scene
  3. right click → merge actors
  4. merge with itself (just click merge)
  5. get a new static mesh with merged material slots.

So this should solve your Problem. It’s a little tricky, if you have to do it for multiple meshes.
EDIT: since each material uses a draw call, this should be faster and is more elegant :slight_smile: