What is the best way to combine premodeled props to a new mesh with only one material ?

Hi there,

I am currently working on a city builder like game and therefore need to model a lot of buildings. To make this process a bit faster i wanted to create props (e.g. a car) i can than place on different buildings instead of modelling always a new car.

So i would create a prop in blender and texture it in substance painter to use it on different meshes. However i was wondering what is the best way to combine different objects with different materials in blender/unreal. If i would just join for example 10 different props in blender, each with a different material, i would end up with a mesh with 10 materials assigned. That does not sound right in terms of performance optimization.

The only other way i can think of is to just join the props before painting them and then export them together to substance painter to texture them. But this would mean that i would have to texture the props for every new building instead of one time and then reuse them every time.

I hope you can understand my question :slight_smile:

Every help would be very welcome.

Thanks in advance :slight_smile:

Something like this?

You could make a level instance or do a merge actors and if you drag the prompt box you can set the resolution of the material it creates. You also have the option of converting it to Nanite which I would caution against. If you have 10 meshes, it combines them into one and bakes a material. You can also then instance the meshes under that actor for much better performance.

Hey,
thank you very much for your answer. This is exactly what i want to achieve. However i just tried around a bit with that tool and regardless of the options i choose there seems to be a great loss of detail in the merged mesh. Even if i double the texture size, it looks worse then the original.

Mesh with two materials:

I can only post one image so the other merged result can be seen in the next post.

Even though the looks were acceptable, it does not seem good in terms of performance to double the texture size for each material.

Are there any other settings i should try or is a loss of quality while merging materials inevitable ?

I also thought of another technique. In my game every building is a blueprint and has a static mesh component for the model. I could add e.g a car prop as a static mesh inside the blueprint and arrange the position etc. in the viewport. The car would be a seperate static mesh with an own material. If i then add this car in another building blueprint, would the car only produce one draw call, even if it is used in two different blueprints because it is the same mesh with the same material or would unreal treat them as seperate ?

Thanks in advance :slight_smile:

The Mesh with merged materials and doubled texture size:

Hey thank you for your reply!

As said in my previous answer merge actors does not seem to produce the result i want. Why do you caution against a conversion to nanite ? And what exactly do you mean by instancing the meshes under the actor. Is it something along the lines i thought of in my previous post ?

Thank you in advance :slight_smile:

There will be a quality loss the more materials you have. When you have 2 meshes with 2 materials using a texture with a resolution of 4096x4096 each and you set your new texture resolution for the merged actor to 4096x4096 the textures will be reduced to 1024x1024. There are methods to reduce draw calls (e.g. Nanite, reducing material slots) which can be combined with visibility cells, (H)LODs etc. but I think that depends on your scene.

To be honest, right of the box I don’t know for sure. With 4.22 and higher they made changes to the pipeline. Could be possible but I think you should have a look at the unreal tutorials:

Nanite is great but especially when you have more rounded sides and smaller meshes, Nanite folds on itself. You’ll get a mesh that looks like it’s missing a vert or had a flipped face. Test it out but I wouldn’t just convert and walk away without checking it. The level instancing will give you an actor like you want but without more advanced setup, you’ll need to go into the level to make changes to it. With the merge actors, (I know you said it wouldn’t work), but when you create the proxy mesh, you can add more proxy meshes to it. If you just copy that mesh you’ll see it takes a second or two to duplicate, but if you copy the mesh component inside, it’s instant and it’s a true instance of the mesh. Much cheaper and you can add it anywhere.

This is what you’re looking for:
Actor Merging | Unreal Engine 4.27 Documentation.
Merging Actors in Unreal Engine | Unreal Engine 5.0 Documentation