How can I make Dataprep Merge work per match instead of creating a single static mesh?

Hi! I’m new to Datasmith & Dataprep and wanted to use them for optimizing architectural models from SketchUp. I’m encountering an issue with my Dataprep recipe and I hope I’m just overlooking a simple detail somewhere.

I want to find each parent with a certain pattern in the name and combine everything under that parent into a single static mesh. For instance, I might have a building with doors and windows built of dozens of submeshes, and want the Dataprep output to turn these doors and windows into merged meshes. Based on the docs, I assumed the recipe for this would look like this:

Unfortunately, this doesn’t work as expected. Instead of “merge contents under each object with cm_* name” this recipe is interpreted as “merge every object found under all objects with cm_* into one mesh”. I can’t figure out how to achieve what I need. Maybe I’m missing something simple about defining loops vs. additions in the recipe UI? If it helps, here are some screenshots of the object hierarchy, to give an example of the individual objects I want to collapse into single meshes:

Most of the operations I want to do involve finding some parent and individually doing something to these parents (merging, offsets, outright replacement) so I’m kind of completely blocked until I figure out how to do this. :slight_smile:

Would appreciate any help or links to an example where this is achieved!

Sadly you cannot do what you request with the feature currently available in Dataprep.
There is no easy way to loop and merge even with a custom dataprep operation.

You can do that with a blueprint utility widget once the dataprep import is commited. However it will not modify your datasmith scene.

Thank you for the answer! That’s unfortunate, but it’s good to know which direction I need to investigate next.

I already started investigating editor function blueprints along with Geometry Script for this purpose and got basic pipeline doing geometry changes working. A related quick question: is the merging performed by the editor in Dataprep or supported via the Merge Actor menu option available through editor blueprints?

If existing merge functionality is not exposed anywhere, I’ll try to implement merging via Geometry Script (request a dynamic mesh for combined mesh, find every static mesh child of tagged actor, copy transformed contents of each child to combined mesh, try to remap materials etc.). This seems doable, but I hope I’m not reinventing a wheel that is already available as an existing node somewhere :slight_smile:

This one should be the way to go: using the Static Mesh Editor Subsystem and the merge function

You can also use the geometry tool function.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.