
Preparing models for game engines has always involved a bit of work for things like creating lightmap UVs, baked normal maps, and LODs. Nanite and Lumen have made things easier, with one caveat; Nanite does not support translucent objects. Having any translucent materials on an object will make it completely unusable with Nanite because of the how/when translucent triangles are rendered in game engines. This is a huge pain because many older models, or models from various marketplaces, are not split up with this in mind.
To solve this issue I created a widget in Unreal that can automatically split the translucent and opaque parts of models with a single button. Here are the steps to get it running in your project.
Step #1 - Download the widget
Download the widget for your engine version here:
Step #2 - Enable the Geometry Script plugin
Enable the Geometry Script plugin in your project and restart Unreal.

Step #3 - Copy the widget to your project
Unzip and copy the widget anywhere inside your Content folder.

Step #4 - Run the widget
Right-click the widget in your Content Browser and select "Run Editor Utility Widget". A new window for the tool should open up.

Step #5 - Select your assets and process them
Select the assets you want to process in the Content Browser and press the "Separate" button. Allow some time for everything to process. This might take a few minutes if you are processing many meshes, meshes with high poly counts, or meshes with many material IDs.

Some features of the process are:
It works on multiple assets at the same time.
It works on both static meshes and BP actors made of multiple meshes, like those from KitBash
Every mesh that has translucent materials on it will be split into new meshes with the corresponding suffix "_Opaque" or "_Translucent"
Opaque meshes will automatically have Nanite applied
You can use the "Replace Scene Meshes" flag during the process to replace static mesh actors in your current scene with the split ones.

By default the process will keep your old meshes in your project, but you can check the "Delete Old Assets" box to automatically remove them after the process completes.
Improvements for the future
If you have any suggestions to make the tool better please leave a comment! If you need support getting it to work in your context you can find me on the KitBash3D Discord server as @FriedChickens.
If this helped you please like this post!
Comments