Skip to main content

Tutorial: Remesher in Blender

This tutorial contains these key points:
✔️ Use the Blender plugin
✔️ Create a Settings Preset Config
✔️ Remesh selected parts
✔️ Decimate the remaining parts
✔️ Export a GLB
✔️ Compare the results

This tutorial shows how use the RapidPipeline 3D Processor plugin in Blender to simplify a 3D model, optimizing parts with small holes using the Remesher, baking the holes into an alpha map, and decimating the rest of the model.

This tutorial makes use of the RapidPipeline 3D Processor plugin for Blender, for more information see the Blender Plugin Documentation. The plugin runs on a powerful 3D data optimization and automation toolset, for more about this see the 3D Processor Reference.

Before and after renders of the shopping cart, as an aniamted GIF comparing PBR renders vs wireframes
Input model (left) has been remeshed, and textures were baked including an alpha map for the holes. Source model is 48mb with 284,003 triangles, and the optimized model is 4mb with 50,000 triangles.

This tutorial uses a high-resolution plastic shopping cart model available here from TurboSquid.

Using the Remesher

  1. First step is to complete the installation process to make sure the RapidPipeline 3D Processor Blender plugin is installed and ready to use.

Screenshot of the RapidPipeline 3D Processor Blender plugin
The Blender plugin for the RapidPipeline 3D Processor.

  1. The remeshing will be done first, so all the parts of the shopping cart named "plastic" are selected in the Blender Outliner.

Screenshot of the Blender Outliner with plastic items selected
Enter plastic in the Search field, then double-click the parent icon to select them all.

  1. Then Shift-click on the blue plastic seat to deselect it. The child seat is a solid mesh without holes, so the decimator tends to do a better job. This part will be processed later along with the rest of the model.

Screenshot of the Blender viewport with the plastic seat deselected
Deselect the plastic seat.

  1. Turn on Statistics in the Blender viewport.

Screenshot of Viewport Overlays dialog, with Statistics enabled
In the Viewport Overlays, enable the Statistics.

  1. In the top left corner of the viewport, notice that the total triangle count is 284,003.

Screenshot of Statistics for the selected items

The desired total for the optimized model is 50,000 triangles. At that resolution the model will be fairly compact but still retain significant detail from the original.

  1. In the Layout tab, open the Object menu, then scroll to the bottom and click on RapidPipeline Processor.

RapidPipeline Processor button in the Object menu

  1. In the Scene Graph Flattening tab, turn on Enabled, and set the Flattening Method to full.

Flattening Method and its options

This tells the Remesher to create a single mesh for all the selected parts. Without this, each mesh part would be processed on its own.

  1. In the Optimize tab, turn on Enabled. This turns on decimation and remeshing.

Optimize tab with Enabled turned on

  1. Set the 3D Model Optimization Method to use Mesh and Material Optimization. Materials can be optimized alone, but in this case both the meshes and the materials need to be changed because the Remesher creates a whole new mesh and bakes textures from the source meshes onto the new mesh.

Mesh and Material Optimization option

  1. Set the Mesh and Material Optimization to Remesher.

Mesh and Material Optimization option

  1. In the Remesher secton set the Faces to Faces Value and type in 25,000.

The Faces Value

The desired final triangle count for the entire shopping cart will be 50,000. The basket can be limited to half of that, which ensures there will be enough resolution left for other half (metal frame, wheels, strap, child seat, etc.).

tip

Remesher Target is an upper limit. If the Remesher needs less triangles it will do this automatically, but it will never exceed this limit.

  1. In the Material Merger section, set the Material Regenerator to Generate UV Atlas.

Generate UV Atlas option

The remesher will create a totally new mesh, and transfer the materials over from the source meshes. This setting tells 3D Processor to create UVs for this new mesh.

  1. Make sure the Normal Map Baking Mode is set to always. This will bake a bump map to preserve the bevels and details from the source model.

Normal Map Baking Mode option

  1. Inside the section for Ambient Occlusion Map Baker, turn on Enabled. This will bake an ambient occlusion map for the new mesh, which also helps to preserve shading detail from the source meshes.

Ambient Occlusion Map Baker option

  1. Enable the Texture Baking Resolution, and set the Default Texture Map Resolution to 1024. The original textures are 8k, but 1k for the basket and 1k for the rest should be enough detail. If this resolution isn't good enough, the Processor can simply be re-run with a higher resolution.

Default Texture Map Resolution 1024

  1. The next setting Bake Topological Holes to Alpha Map is an advanced setting which is hidden by default. To expose this setting, go to the top of the UI and set the Settings Level to Expert. This exposes all available settings.

Settings Level option

  1. Scroll down and enable the checkbox for Bake Topological Holes to Alpha Map. This will preserve the holes from the source meshes, by baking them into an alpha map for the new mesh, which is created by the Remesher.

Bake Topological Holes to Alpha Map option

  1. Scroll to the bottom, set the Remeshing Method to shrinkwrap, and the Resolution to 5.

Shrinkwrap option

The two remeshing methods Shrinkwrap and Voxelization produce different results, which can be leveraged in different situations. Shrinkwrap is generally better with mechanical shapes and hard angles, while Voxelization is better with organic meshes like clothing and characters.

The Resolution usually needs to be fine-tuned to match the size of the holes in the source topology. It decides how fine the remesh grid will be, which affects whether the new mesh will cover or poke through the existing holes. The greater the Resolution, the sharper the corners will be, but also the more likely the new mesh will start to sink into the holes.

Resolution results for the shrinkwrap remesher
A demonstration of Shrinkwrap resolution values for the shopping cart.

tip

The upper resolutions for the Remesher are constrained by the Remesher Target value of 25,000 faces, which was set earlier. If higher resolutions are desired the Remesher Target can be adjusted, or it can disabled entirely. This can be useful for detailed meshes which require deep cuts.

For this model the holes are covered completely by Resolution 5. A value of 4 also works, but the edges of the basket start to distort. 5 offers enough resolution to keep corners tight, while also covering the original holes. This allows the alpha map to do the heavy lifting, and requires a lot less vertices.

  1. The remaining settings can be left to their defaults. Click the Run button to process the model.

Run button

It optimizes the meshes quickly, and when complete the original source meshes are hidden, and the new remeshed basket is shown.

Remesher result with Statistics

Notice in the Statistics that the new basket has only 2,524 triangles, not 25,000. This is because the Remesher only needed that many to accomplish the job at Resolution 5. The Remesher Target was set to 50,000 triangles, but this is only an upper limit. This target tends to matter more when using higher Resolution values.

The Remesher Settings File

The finished settings for the Remesher can be preserved for reuse using the Save and Load buttons. Here's what that looks like:

{
"sceneGraphFlattening": {
"method": "full"
},
"optimize": {
"3dModelOptimizationMethod": {
"meshAndMaterialOptimization": {
"remesher": {
"target": {
"faces": {
"value": 25000
}
},
"materialMerger": {
"materialRegenerator": {
"uvAtlasGenerator": {
"textureBaker": {
"normalMap": {},
"aoBaker": {},
"topologicalHolesToAlpha": true
}
}
}
},
"method": "shrinkwrap",
"resolution": 5
}
}
}
},
"export": [
{
"fileName": "",
"textureMapFilePrefix": "",
"discard": {},
"format": {
"glb": {
"pbrMaterial": {}
}
}
}
]
}

Optimize the Frame

  1. To optimize the rest of the shopping cart, select the new basket mesh, then select Invert (Ctrl I) to select the rest of the model.

Frame meshes selected

  1. Back in the RapidPipeline 3D Processor, go to the Optimize tab and change the Mesh and Material Optimization to Decimator. The rest of the shopping cart doesn't have a bunch of small holes, so traditional mesh decimation is best.

Decimator option

The desired overall triangle count is 50,000 triangles, and the basket was remeshed to only 2,524, so this means the rest of the shopping cart can use the remaining 47,476 triangles.

  1. Under the Target, set the Faces to Faces Value, and set the Faces Value to 47,476.

Decimator Target Faces Value

  1. Set the Material Optimization to Material Merger. This will merge all the selected parts together into a single texture set and material, using texture baking and UV atlasing.

Material Merger option

  1. Make sure the Normal Map Baking Mode is set to always. This will bake a bump map to preserve the bevels and details from the source meshes.

Normal Map Baking Mode option

  1. Enable the Ambient Occlusion Map Baker, to bake an occlusion map.

Ambient Occlusion Map Baker enabled

  1. Enable the Texture Baking Resolution, and set the Default Texture Map Resolution to 1024. This was the resolution used for the basket, so it makes sense to use the same for the rest of the shopping cart.

Default Texture Map Resolution 1024

  1. The remainder of the settings can stay at their defaults. Click the Run button to process the selected parts.

Run button

RapidPipline 3D Processor finishes optimizing the meshes quickly, and when complete the original source meshes are hidden and the decimated mesh is shown. Shift-click on the remeshed basket to show the full Statistics.

Remesher + Decimator with Statistics

The finished result of the Remesher and the Decimator is two meshes, with a combined triangle count of 50,000.

The Decimator Settings File

The finished settings for the Decimator can be preserved for reuse using the Save and Load buttons. Here's what that looks like:

{
"sceneGraphFlattening": {
"method": "full"
},
"optimize": {
"3dModelOptimizationMethod": {
"meshAndMaterialOptimization": {
"decimator": {
"target": {
"faces": {
"value": 47476
},
"deviation": {
"percentage": 0.0
}
},
"materialOptimization": {
"materialMerger": {
"materialRegenerator": {
"uvAtlasGenerator": {
"textureBaker": {
"normalMap": {},
"aoBaker": {},
"bakingResolution": {
"default": 1024
}
}
}
}
}
},
"collapseDistanceThreshold": 0.01
}
}
}
},
"export": [
{
"fileName": "",
"textureMapFilePrefix": "",
"discard": {},
"format": {
"glb": {
"pbrMaterial": {}
}
}
}
]
}

Exporting to glTF

  1. Make sure the remeshed basket and the decimated frame are selected, then go to the File menu, choose Export, then glTF 2.0.

Blender Export to glTF 2.0

  1. In the Blender File View dialog make sure to open the Include dropdown and choose Selected Objects. This will exclude the source meshes, and export only the two new optimized meshes.

Blender Export Selected Objects

  1. When finished exporting, the new GLB file can be viewed in web 3D viewers like the glTF Sample Viewer. The GLB can also be uploaded to the RapidPipeline Web Platform for conversion into other formats, like USDz.

Before and after renders of the shopping cart
Input model (left) at 48mb with 284,003 triangles. Output model (right) is 4mb with 50,000 triangles.

Input / Output Statistics

The source model was 48mb with 284,003 triangles, 8192x8192 textures, and 20 draw calls.

The processed model is 4mb with 50,000 triangles, 1024x1024 textures, and 2 draw calls!

Input AssetOutput Asset
284,003 triangles50,000 triangles
44 meshes2 meshes
20 draw calls2 draw calls
8192x8192 maps1024x1024 maps
File size 48mbFile size 4mb