Corrective Smooth Baker

by meshonline in Scripts and Addons

Limitations

This add-on does not support Rigify Auto-Rigging System and Auto-Rig Pro directly!!!

The add-on needs to rotate bones independently to find a definite solution, unfortunately, either Rigify Auto-Rigging System or Auto-Rig Pro heavily depends on constrains, which will cause the add-on fails to find a definite solution.

If you are a Rigify user or an Auto-Rig Pro user, and want to benefit from this add-on, you need to export the rigged character to FBX file, then import the exported FBX file back into Blender.

Bake vertex weights to the imported rigged character instead of the original rigged character.

When finished, you can export the imported rigged character to game engines, or use Blender's built-in Data Transfer Modifier to transfer the baked vertex weights back to the original rigged character.

The workflow is a bit complicated, I have recorded a short video, which demonstrated the workflow for Auto-Rig Pro.

You may watch the video from: https://youtu.be/y-RDnpiM1d8.

The add-on only supports meta-rigs.

What is it?

Have you heard of Delta Mush - The most advanced smoothing technology for armature deformed characters?

Blender has a built-in Delta Mush modifier - The 'Smooth Corrective' modifier, you can use it to reduce highly distorted areas of a mesh by smoothing the deformations.

Unfortunately, the modifier only works within Blender, if you export the character to games, all the smoothing effect will lose.

To solve the problem, I created a 'Smooth Corrective Baker' add-on for Blender, you can use this add-on to bake the smoothing effect of the 'Smooth Corrective' modifier to vertex weights.

After baked the smooth effect to vertex weights, when you export the character to games, the smoothing effect will not lose.

Because the vertex weights are generated from a huge amount of random poses, the vertex weights fit any poses very well.

In short, this add-on makes ideal vertex weights.

Showcase

The add-on twists the armature to generate a huge amount of random poses.


Here is the progress bar, it displays the completed percentage, the completed vertices count, the total vertices count, and the remaining time.


Here is the ballet girl in the tutorial video, the picture alternately shows the original mesh and the baked mesh.


While baking for an armature deformed cylinder, we can preview the baking process in realtime.

Interface

In Blender 2.79, when selected both the mesh object and the armature, the interface will appear in the animation tab of the tools shelf.


In Blender 2.80+, when selected both the mesh object and the armature, the interface will appear in 'View3D->UI->Mesh Online' tab of the sidebar.

Tutorial

Basis Tutorial:

Video Package: Download the HD version of the video(Format:zip,Size:23.2MB,Date:Jan 6,2021).

Watch Online:


Advanced Tutorial:

Video Package: Download the HD version of the video(Format:zip,Size:24.4MB,Date:Jan 16,2021).

Watch Online:


How To Install

The product is a zip file named 'corrective-smooth-baker-1.0.0.zip', unzip it anywhere, launch Blender, navigate to File->User Preference->Addons, click the 'Install Add-on from file...' button, a pop up dialog will appear, select 'corrective-smooth-baker/addon/2.7/bake.zip', or 'corrective-smooth-baker/addon/2.8/bake.zip', click the 'Install Add-on from file...' button on the pop up dialog, the addon will be installed to Blender's addons directory.

When the pop up dialog closed, we are still on Addons page, a few seconds later, the add-on will appear, activate the add-on, then click the 'Save User Settings' button and close the 'Blender User Preference' window.

How To Upgrade

Download the new version of the product.

Launch Blender, navigate to File->User Preference->Addons, type 'bake' in the search box, the addon will be filter out, click the small triangle beside the add-on to expand the contents, click the 'Remove' buttons to remove the add-on.

Install the new version of the product.

Supported Platforms

Blender v2.79-v2.91.

Any hardware platforms which Blender runs on.

How does the add-on work?

You need to add a 'Smooth Corrective' modifier to the mesh object you want to bake to, usually the default parameters work well.

Then select bake range, setup deviation threshold, select bake quality, setup twist angle, setup influence bones, and setup prune threshold.

When selected both the mesh object and the armature, the interface will appear, click the 'Corrective Smooth Baker' button to start the job.

If you want to stop the job, press 'ESC' key on the 'View3D' window, the job will terminate immediately.

When the job is started, the armature twists madly to generate a huge amount of random poses.

Then the add-on toggles the 'Realtime' button of the 'Smooth Corrective' modifier to measure vetex position changes to find highly distorted vertices.

While baking, the add-on solves a large linear system for every vertex to find the best vertex weights which fit all the random poses.

Then the add-on updates vertex weights for all the vertices with new vertex weights.

When the job finished, you can remove the 'Smooth Corrective' modifier from the mesh object.

Detail Of The Parameters

Bake Range

Where or not to bake vertex weights for all vertices

'All Vertices' means that we bake vertex weights for all vertices.

'Selected Vertices' means that we bake vertex weights for selected vertices.

'By Deviation Threshold' means that we only bake vertex weights for highly distorted vertices.

The default parameter is 'By Deviation Threshold'.

Deviation Threshold

Skip all the vertices whose position changes(in centimeters) are below the deviation threshold.

The default parameter is 0.1.

Bake Quality

Balance the quality and the speed.

'Low' means that we bake at low quality with fastest speed.

'Medium' means that we bake at medium quality with fast speed.

'High' means that we bake at high quality with slow speed.

'Very High' means that we bake at very high quality with much slower speed.

'Highest' means that we bake at highest quality with slowest speed.

The default parameter is 'High'.

Twist Angle

Maximum twist angle of the deform bones.

The default parameter is 45.0 degrees.

Influence Bones

Max influence bones per vertex.

The default parameter is 4.

Prune Threshold

Prune vertex weights which below the threshold.

The default parameter is 0.01.

License

The license of this add-on is "GPL".