Difference between revisions of "Content Dev:Scan to CC3+ Preparation in Maya"

From Reallusion Wiki!
Jump to: navigation, search
m (Fixing Mouth Cavity and Inner Lip Border)
m (Undo revision 5318 by Chuck (RL) (talk))
Line 65: Line 65:
  
 
{{clear}}
 
{{clear}}
 +
 +
== Fixing Mouth Cavity and Inner Lip Border ==
 +
 +
[[File:scan_to_cc3+_isolate_bodies.png|left]]
 +
 +
1) Import the CC base character (OBJ) and hide all the mesh besides the wrapped character body and CC base body. This will be our reference for adjusting the mouth cavity.
 +
 +
2) Select the mesh faces of the mouth cavity of the wrapped character by selecting both sides of the mouth cavity UV shell.
 +
 +
3) Align the mouth cavity to the position of the lips to rectify its offset while referencing the CC base character. You can get a better vantage point by moving the camera inside the cavity and viewing the internal attachment to the lips while manipulating the mesh faces.
 +
 +
You can also scale the entire mouth cavity to the likeness of the reference model.
 +
 +
{{clear}}
 +
 +
4) We recommend using Maya's '''Sculpting Tools''' to fix the mesh distortions around the junction/border between the lips and the mouth cavity, or directly adjust the mesh components and vertices.
 +
 +
5) Unhide the rest of the meshes once editing is complete to view the final result.
  
 
== Using PickWalker ==
 
== Using PickWalker ==

Revision as of 19:44, 22 August 2021

Main article: CC Avatar Content Production.

After the Wrap process, the exported wrapped character needs to be processed in Maya. The goal is to use Maya's PickWalker plugin to fix the wrapped OBJ mesh topology and vertex id order:

  • Fix the mouth cavity and lip shapes.
  • Use PickWalker to conform a CC base FBX to the wrapped character's shape (with the scan character's appearance) for export to CC.
  • Fix the eyelashes and reposition the caruncle (the red prominence at the inner corner of the eye).

You can download PickWalker from: http://olygraph.com/maya-mesh-reorder-transfer-vertex-position-tool/ and watch this tutorial video: https://www.youtube.com/watch?v=x5F6VKNxeCQ.

PickWalker does not support undo/redo, so you should save the file before executing the script.
Tearline, EyeOcclusion, tongue, teeth, eyeballs, and related geometry do not need to be re-positioned in Maya, as it's generally faster to do so in CC.

Aligning the Eyelashes

Once the character is wrapped, the eyelashes will have been dislocated from the eyelids and will need to be fixed in Maya:

1) Import the wrapped CC base OBJ, mentioned in the previous Scan to CC3+ Wrap Procedures article, into Maya.

Scan to cc3+ materials applied.png

2) Create a lambert material and load the eyelash wire-frame guide texture to the Color channel.

3) Select all of the eyelash mesh faces -front and back included (4 pieces total)- and assign the newly made eyelash material.

The eyelash wire-frame guide will assist you in positioning the eyelashes and attach them to the eyelids in a way that looks natural.
The red lines mark the attachment points to the eyelids.

4) Create another lambert material and load the baked diffuse map from Wrap into the Color channel.

5) Select the mesh faces for the head and neck (select by UV shell is the quickest) and apply the newly created head material.

6) Isolate one pair of eyelashes along with the head.

7) Select all of the eyelash mesh faces and realign them to the level of the eyelids.

8) Apply a Lattice deformer and adjust its division values in the Channel Box for flexible editing.

Scan to cc3+ lattice settings.png

9) Modify the lattice points until the red line on the wire-frame guides are embedded into the eyelids in a way that appears natural.

10) Once editing is complete, delete history on the eyelashes to remove the lattice deformer and bake the results.

Adjust the eyelash meshes until the red line disappears into the eyelids.

11) Perform the aforementioned steps for the other three eyelash mesh pairs.

Positioning the Caruncles

Scan to cc3+ positioning caruncles.png

Select the caruncle mesh faces and position them into the inner corner of the eyes.

Try using mirror move along the x-axis to quickly place both caruncles into their respective positions.

Fixing Mouth Cavity and Inner Lip Border

Scan to cc3+ isolate bodies.png

1) Import the CC base character (OBJ) and hide all the mesh besides the wrapped character body and CC base body. This will be our reference for adjusting the mouth cavity.

2) Select the mesh faces of the mouth cavity of the wrapped character by selecting both sides of the mouth cavity UV shell.

3) Align the mouth cavity to the position of the lips to rectify its offset while referencing the CC base character. You can get a better vantage point by moving the camera inside the cavity and viewing the internal attachment to the lips while manipulating the mesh faces.

You can also scale the entire mouth cavity to the likeness of the reference model.

4) We recommend using Maya's Sculpting Tools to fix the mesh distortions around the junction/border between the lips and the mouth cavity, or directly adjust the mesh components and vertices.

5) Unhide the rest of the meshes once editing is complete to view the final result.

Using PickWalker

Scan to cc3+ mesh pickwalker window.png

Now we'll need to have the CC base vertices take on the positions of the wrapped character so that the original vertex IDs can be maintained. This is crucial because every software relies on the vertex IDs to rebuild the model and perform (animated) deformations. For example, if a CC morph target relies on a set of IDs from 0 to 100 and they are mapped to the ear, but the OBJ format remapped the IDs, then the morph target is redirected to points peppered around the body and causes the character to "spike out".

Script Setup

1) Download geometryWalker and unzip the contents into your current version of Maya's Script folder, for example: C:\Users\John_Doe\Documents\maya\20XX\scripts.

2) Open Maya's Script Editor and enter the following the code under the Python tab but do not press enter:

Import geometryWalker.Qt.pickWalker_UI as pickWalker_UI

pickWalker_UI.pickWalkerUI()

3) Select the code snippet and drag and drop it into a custom shelf (bottom of the menu-bar) and a screen will appear requesting the settings for a new shelf menu item.

4) Enter a suitable Icon Label in the subsequent dialog window, i.e. "PW" and click on Save All Shelves.

5) Click on the newly created shelf menu item the Mesh PickWalker window should appear.

Process Flowchart

Scan to cc3+ pickwalker process flowchart.png

Processing Geometries with PickWalking

1) Delete the CC base character (OBJ) and import the CC base character (FBX). The imported FBX character is the model that will need to conform to the shape of the wrapped character mesh.

2) Move the entire wrapped character to the side so that the two bodies do not overlap.

Compared to the CC base OBJ, CC base FBX comes with rigging and pristine vertex data, as the OBJ format has a tendency to reorder vertex IDs.

Scan to cc3+ pickwalker setup.png

3) Load PickWalker by clicking on its shelf button.

4) Isolate the caruncle meshes: Show > Isolate Select > View Selected .

5) Select a face on the scan mesh caruncle and set it to Source Mesh Infos > Face 1:.

6) Click on a border vertex of the mesh face, i.e. upper-right corner, and set it to Source Mesh Infos > Vertex 1:.

7) Going clockwise, select another border vertex, i.e. lower-right corner, and set it to Source Mesh Infos > Vertex2:.

8) Repeat steps 4 to 6 with the respective caruncle for the CC base FBX, this time setting Target Mesh Infos > Face 1:, Target Mesh Infos > Vertex 1:, and Target Mesh Infos > Vertex 2: respectively.

It is crucial to match the picked elements exactly in the same consistent order.

9) Make sure that Mask Faces > Vtx Coordinates Mode: is in Object Space.

10) Save a backup for the current scene.

11) Click on the Pick Walk (WATCH OUT no Undo on this command) button. You should see that the target geometry (on the character base FBX) will have changed in shape to be exactly the same as the wrapped character.

12) Exit view isolation to see the entire bodies.

You can save a backup of the scene at any point in the process, the point is to make a backup before or after, every time the script is executed.

13) Repeat steps 3 to 11 for the eyelashes and body.

Scan to cc3+ pickwalker side by side comparison.png

14) Delete the entire wrapped character, leaving only the CC base FBX that has been conformed to the shape of the wrapped character.

15) Export the entire scene in FBX format.

Post-processing in Maya is now complete, see Scan to CC3+ Completion in CC for the next series of steps.