Thursday, April 26, 2018

Customizing Radical Heights - Part 2


In this post I will step over the process the artist will run through to get the assets ready for game. The artists can import the mesh from any DCC they choose to create the assets within. The setup process itself is handled entirely in Maya.

Part 1 can be found here:
https://techanimator.blogspot.com/2018/04/customizing-radical-heights-part-1.html


Setting up the item

We need to first import the artist created meshes into a clean Maya scene. As mentioned previously the clothing is created for specific sections of the character. In this scene we have a shirt/upperbody and pants/lowerbody.

Assign the mesh
The artist runs the Customization Builder tool, selects the mesh and plugs the selection into the gender specific field. This field is used to determine which rig/skinned mesh the item will be constructed upon. Upon assigning the mesh it is evaluated for poly count, number of uv channels and number of material assignments. It also makes sure the transforms are correct on the mesh before attempting to bind to a skeleton.

Name Item & Associate Slot
Next we set a unique item name and then we assign the body slot/section for the clothing item. This will rename the mesh accordingly, create an export hierarchy and apply attributes to the groups and meshes used to rig and export the item. These attributes assist the tool when opened later and will also inform the export process how to handle the current asset.


  • Assign the selected mesh
  • Create a unique item name
  • Choose the body part section

Rigging the mesh

In this stage we import a clean skinned base body mesh. We locate the flagged gender specific body mesh that was imported and copy the skinweights from the body to the clothing mesh. Additionally, the skinweights and bones are pruned based on the body part chosen, to use the least required amount possible.



The base body mesh is flagged for skinweight copying

Rigged body mesh is versioned to handle updates


Importing not Referencing
It's important to note that I am not referencing the base body mesh here. While there are benefits to references they don't apply very well here. If I update the body mesh or skeleton, I want to know how to propagate those changes to the meshes in the customization files. If I allow referencing to just update naturally I cannot control the changes. After opening an existing customization file a callback will check the local mesh/rig version and compare to the latest one in the depot. I use the version numbers to inform how to process any updates. Some updates happen without user intervention while others require notification. The callback code for the tool also has versioning so I can run code specific to the version number where applicable. Once the scene version is up to date I can tick the local version attributes to the proper index. 

Rules for version updates:

  • Major: This requires a complete replacement of the rig in the scene & skin copy update.
  • Minor: The tool can update specific aspects of the mesh/rig without requiring a full update.
  • Patch: These small changes can generally be ignored and likely require no updates.

Range of Motion
The artist can optionally import the skeleton range of motion to check how the skinning worked out. A rom skeleton with baked animation is imported into the scene and the scene skeleton is constrained to the that skeleton. The artist can then apply some quick skinning fixes to the mesh or let the Character TD address any issues later in a polish pass.

View mesh skinning with Range of Motion

Exporting the mesh
Once everything looks good to go we can move forward with exporting the item. As was mentioned before the exporter handles all of the file naming and determines where to export relative to the project and the item slot. The file must also be saved and added to the depot in a proper location before exporting will occur. This ensures an artist that is putting assets into game will have the source file available as well.

On export the item FBX file is written out, a post-process is run on the FBX file to remove unnecessary nodes and correct the hierarchy where needed. A thumbnail is generated for our asset tool and all of the files are checked out and/or added to perforce automatically.

Exporting the mesh
The clean processed FBX file


Completed Process

Below is a video showing how easy the entire process is for the artist setting up the asset for use in game. The artist can further edit the existing meshes or update with another internal tool that will preserve all of the settings and replace the mesh, uv's, etc, all with updated skinning as needed.


Coming up Next

In the next and final part I will go over how the customization items are implemented in game using Unreal Engine 4.

Part 3

https://techanimator.blogspot.com/2018/05/customizing-radical-heights-part-3.html




No comments:

Post a Comment