Bake Morph Targets, Combine Morph Targets and Copy Morph Targets. All without leaving the editor.
Marketplace link: https://www.unrealengine.com/marketp…90c524bafd847f
Example Project: https://www.dropbox.com/s/v8p151s6zs…ample.zip?dl=0
Feature List
Editor
- Bake and remove morph targets from skeletal meshes
- Create morph presets
- Custom Morph Tools Asset editor
-
COPY MORPHS from one mesh to another - Based on vertex proximity: Vertex ordering is irrelevant - Works great for clothing with similar topology to the base mesh
-
COMBINE morphs - Combine multiple morph targets into a single morph target. Save RAM at runtime.
-
Random mesh generation based on the morphs of the mesh. - Easily create hundreds of different NPC meshes with customizable random mesh generation.
see: Editor Documentation
Runtime
- Bake and remove morph targets from skeletal meshes
- Save and load the baked mesh to disc
- Set morphs based on a morph preset
- presets can be constructed at runtime or in the Morph Tools Editor
Detailed Documentation and feature list can be found here: https://kostenickj.com/docs/morphtools
Questions and support: Post in this thread. Or join the Morph Tools discord at JK Plugins Support
Why I made this:
Morph tools is a product born out of the needs from my ongoing game project. I was designing a character creation system primarily based around morph targets. My mesh size began to rapidly increase as I added more and more customization options. Eventually I had around 2000 morph targets and my mesh size on disc was around 1GB. Anytime I needed to make an edit to a single morph, it took at least 30 minutes to reimport the mesh it back into the editor; my workflow was stifled.
I realized I needed a system to make it feasible to actually use a mesh with this many morph targets in a real game.
The first, and most important feature I implemented was morph target “baking”.
Morph Baking: permanently apply the deformation of the morph target the the mesh data (and optionally remove the morph target entirely).
Baking morphs is essential to performance in my project. For example, my character meshes have a lot of “set and forget” morph targets, like nose size, body size, or other things that don’t change over time. There is no need to recalculate the vertex positions every frame if I only never need to set them once. At runtime I had hundreds of morph targets eating up RAM and being needlessly calculated even though I didn’t need them to be.
With my baking system I can set the morphs once during a controlled scenario (in my case, character generation) and then immediately bake and delete them from the mesh once character creation is over. In my extreme example this saved about 500mb of runtime memory.
Once baked, the skeletal mesh can then be saved to disc and loaded from a save game later without ever having to set the targets again. In the example project, I show you how to do this.
Baking works both at runtime (in a packaged game) and in the editor via a custom asset editor.
Next, I needed a faster way to iterate on morph targets. It took almost 30 minutes each time I needed to reimport my mesh after tweaking a morph, so I implemented morph target copying.
Morph Copying (experimental): Copy morphs from one mesh to another based on vertex proximity.
Using the morph copy tool, I can import my mesh with a single morph target, then use the Morph Tools editor to copy the morph over to my “master” mesh. This process cuts morph target iteration time down significantly.
Vertex ordering between meshes is irrelevant; the process works purely on vertex proximity mapping between the source and target meshes.
Since the copy process uses vertex proximity and not vertex ordering, it can be used to create morphs for character clothing meshes in certain scenarios. Clothing meshes that are mostly skin tight and have similar topology to the base character mesh are the best candidates. In my project I am able use the morph copy feature almost exclusively to copy morphs from my base character mesh to clothing meshes without ever having to create the morphs on the clothing item in a 3d editor.