I am importing from Sketchup to Ue4.
I am using Dataprep and would like to create a dataprep recipe function that would search for each object that shares the same material then merges them together.
So essentially merge geometry by materials.
Anyone done anything similar or have any ideas. Thanks everyone.
You don’t necessarily want to do that just as an automatic thing, you can only have one lightmap on a mesh so if you just merge every object by material then there’s a good chance that some meshes will be very large (in terms of surface area) like floors/walls/etc.
That would mean that even with a high resolution lightmap you wouldn’t get much detail in the lighting. So while it is definitely good to reduce the number of separate objects when you can, you need to do it in a way that you aren’t overdoing it so it’s probably better to do that manually.
Thanks for the response.
I am using raytracing. So I am not using any lightmaps or baking lighting. Not worried about the lightmap, more worried about object count and model organization.
The cleanest version of this I have found is to loop through Twinmotion (I’m using rhino, but it also has a direct link plugin for sketchup). Twinmotion has an import “collapse by material” setting that does exactly what you want. After plugins are installed, UE4 datasmith will read the saved twinmotion file just like a CAD file.
Hi, just curious if you have found a solution? having the same struggle right now
You would need to make a custom dataprep operation, and those do have a working merge operation.
So through dataprep is not a viable option at the moment.
If you want you will have to do an editor blutility widget instead or a python script.