i would really love a feature for combining mehes in the editor. Sure, you can combine things in your 3d package, but this would save time. This could be done like grouping and un grouping meshes. Saving draw calls and lighting problems with modular pieces could also be a benefit by using combine mehes. I’ m not talking about an automatic lod combine solution, more a manual approach. What do you think about this idea? Best regards, Michael
The problem with this is that the combined mesh would need a single UV map that contains ll the UV maps of the subobjects.
Im not sure how efficient that repacking could be done. Otherwise you would end up with excessively large lightmaps.
As far as the drawcalls are concerned: Sometimes it is undesirable to have one drawcall instead of many.
Consider a long fence in one piece versus a fence made of segments.
If in segments, I have one draw call per visible segment. On the other hand i have only one draw call for the whole fence, but even so if only a tiny portion of it is visible…
Under Editor Settings > Experimental enable Actor Merging. Restart the editor and now when you select several actors in the level and right click you’ll see merge option. It will create a new asset for merged actors in the content browser and arrange it’s material ID’s and lightmap UV’s accordingly.
Is there any documentation on how the situation of different lightmap resolutions across meshes are handled?
Also, if the UVs are remapped, how does this affect material functions that sample specific regions in the original, single mesh, layout?
Well you can forget about it for now i suppose. There is no documentation since it is still experimental and a very basic tool. But, I just checked it(the last time i used it was on 4.4 i guess) and it looks like the tool doesnt create lightmap UV’s(even though it gives you the option it doesnt generate a second channel) or material ID’s anymore. Don’t know why it turned out this way over time. :\
While I’ve not used the tool myself really until this thread, I can verify that it does create lightmap UVs and repack if the option is selected. It also used multiple material IDs so long as the Merge Materials option was not checked. Using the merge materials option will create a texture atlas.
The option is currently not functioning for 4.8, on windows at all. This is with the functionality selected in the editor settings and a restart just to make sure. It used to give you a Merge|Merge Static Meshes option, when you would right-click, after selecting two or more static meshes. That is no longer present and I can’t find a way to invoke the merge dialog anymore
Yeah I’m not sure about that way of doing it. When I tried it out today I enabled it via the experimental section in the editor settings. I then went to Windows > Merge Actors which then brought up a separate window. I selected the meshes in the scene that I wanted to merge and changed the options in the accompanying window then selected the “merge actors” button in the bottom right. I can look into this more next week when I get time. I’m not sure if some of the previous behaviors have become deprecated or what with it being an experimental feature. I wouldn’t doubt something has become broken with it if it’s not been touched in a while.
I’ll gladly see if I can dig up anything though.
I think the right click to merge actor behavior has been removed. Now you just use “Windows->Merge Actors” dialog to do the trick.
Well there you go… the one place I didn’t look… The irony.
Ah, I had tested it on 4.7 and used right click > Merge option which has limited settings and doesnt create lightmap UV’s or materials so looks like it was kind of broken in 4.7 but works awesomely in 4.8. Sorry about the confusion!
I have a small question about it ,since there is no documentation about it, (cant test it now):
-When I merge several actors, where is the pivot located for the new, combined, mesh
There is an option to set pivot point at 0,0,0. If you dont enable it the pivot is set at the pivot location of the alphabetically first mesh’s pivot. I.e. if you select a tree and a table the pivot is set at the table’s pivot location.
Regarding your previous question on lightmap UV’s; i dont think it takes mesh size into consideration while creating the lightmap atlas. It just repacks existing islands.
I would like an answer to this… my merge actors is doing this for certain assets… see the following post…