MaxScript Release 0.4 Beta FOR MAX 3.x (12/17/1999)
Copyright (c) 1999 by Borislav Petrov, Bobo's Rendert**ls.
SHORT DESCRIPTION
headsWitch is a custom utility for placing
Lipsynch animation on Character meshes.
It is being developed exclusively for HyperImage
LLC
INSTALLATION
Copy the .ms file to \Scripts
Copy the .BMP files to \UI
Start 3D Studio MAX 3.x
From the MAXScript drop-down menu,
select "RUN Script".
Find the file called "headsWitch01.ms"
and run it - nothing should happen.
Right-click a toolbar and select
Customize...
Find the entry "headsWitch" in
the Category "HyperImage".
Drag the icon to the toolbar,
close dialog.
Open a SCxxxMF scene.
Press the icon - a new floating
rollout should appear.
FEATURES
Version 0.4 BETA (12/17/99)
THE UTILITY FLOATER
The Utility floater is 470 pixels wide and has a variable height (min 480
pixels) depending on the number of Output window lines.
The Floater's name will contain the base name of the scene "SCxxx" or "Not
A Valid Scene" if the scene is not a HyperImage Scene file.
The Utility contains 3 rollouts.
The "Actions" rollout provides buttons for
import and saving.
The "The Witch Says..." window gives feedback about all oparations
and their success.
The Height of this window is set to 10 lines by default. This can be changed
by editing the User Variable in the script's source.
Error messages and warnings will start with a ">" sign. Object-related
Success Messages will start with the "+" sign. All other messages will
be plain text. You can scroll up and down to see the whole session history.
The last line will be highlighted automatically on output.
The [SAVE Log File] button saves the text from the Output window
to a text file with the extension ".LOG". A number will be added to the
name to allow any number of log files in the same directory. The log file
will also contain the file name, path and date/time of creation.
The [VIEW Log File] button loads the Log file if there just one,
or opens a dialog to select a file if there are more than one. If there
are no files, a warning message will be output.
The [REPORT Lipsync Paths] button prints a list of all character
names and their corresponding Lipsync Paths. Only the "Green" paths will
be reported - either the automatically detected path or a manually assigned
path. Alternative paths ("Blue" or "Yellow") will not be reported as the
characters will use the path currently set as Alternative when importing
data.
The "Options" / "Auto-Display Related Objects" checkbox is unchecked
by default. When checked, only Biped parts containing the character's string
except the Biped Head and the Mesh Head and Eyes will be unhideen, the
rest will be hidden. This applies to Characters with the "On" checkbox
activated. Activating the "On" checkbox will also update the display in
case the "Auto-Display" is active.
The "Options" / "Skip on Vertex Count Warning" checkbox is unchecked
by default. When checked, an extra vertex count test will be done and meshes
with different vertex counts will be skipped.
The [Get] button lets you select the location of alternative (background)
lipsync files. The MAX file name and path should be specified. This path
will be saved to a configuration file and used next time you launch the
utility.
The [LOAD!] button scans the alternative path for object names and
searches for lipsynch data. NOTE: In Version 0.4, the file will be scanned
just once. This will speed up the collecting of alternative data.
The "Heads" rollout contains a set of controls
for all 10 characters:
The "On" checkbox is enabled when both a Lipsynch file and a Head
Mesh have been found. It is checked automatically in such a case, too.
When no Head Mesh has been found in the scene but a Lipsynch file exists,
the user can pick a Head Mesh manually - the checkbox will be enabled after
that. The checkbox will be checked automatically if the user picked a Head
Mesh manually.
The [Character] button contains the name of the character. If pressed,
It will select all objects in the scene containing the name string of the
character ("Car","Diz","Gos" etc.)
The [Head Mesh] button is disabled if no Lipsynch file could be
found. It will show "None" if no Head Mesh could be found in the scene.
It will display the name of the Head Mesh if one has been found or has
been picked manually by the user. To pick a new Head Mesh, press the button
and select a scene object or hit "H" to select by name.
The "Lipsynch Head" drop-down list shows "None" if no Lipsynch file
could be found when launching the utility. It will show "NONE" (in caps)
if no Lipsync data has been found at the Alternative location after using
the [LOAD!] button. It will list all object names from the Lipsynch file
if one has been found. The default XXX_HEAD name will be highlighted automatically
if found. The user can select a name of an object from the list manually.
This object should have a valid Morpher modifier and the same vertex count
as the target head Mesh. (This can be checked when importing depending
on the state of the respective Option switch.)
The Lipsynch color indicator can be RED, BLUE,
YELLOW
or GREEN.
When RED, no Lipsynch file has been
found after both the local and the alternative paths have been scanned.
When BLUE, a potential Alternative
path has been discovered, but not checked for existing Lipsync Data. You
should use the [LOAD!] button to check the file.
When GREEN, a local Lipsynch file has
been found in the \Lipsync sub-directory, or a valid Lipsync file has been
assigned manually using the character's [>] button.
When YELLOW, a background global Lipsynch
file has been found at the Alternative Path location and a valid Lipsync
Mesh has been found inside the file. You should use the [LOAD!]
button to check the file.
The "Preview"/ [AVI] button plays back the AVI preview file containing
the name of the character. If no file can be found nothing will happen.
If more than one files contain the character's name, no player will be
started. A message will appear in the System Report window suggesting to
use the File/View File command instead. This button starts the Windows
Mplayer. A DOS command prompt window will open in the background as long
as the Player is active.
SWITCHING
HEADS
The [IMPORT LIPSYNC] button will be
disabled if the scene is not a valid HyperImage scene, or no Lipsynch head
files could be found.
If at least one Lipsynch head file has been
found, the [IMPORT LIPSYNC] button will be enabled.
Press the [IMPORT LIPSYNC] button to
import Moprher modifiers containing Lipsynch data for all characters having
their "On" checkbox checked.
The utility will merge the Lipsync Head with
the current scene and check the vertex count of both objects. If the count
is different, the head will be skipped.
If the vertex count is the same, a copy of
the imported Head's Morpher modifier will be placed on the Stack of the
Head Mesh the following way: If there is an existing Morpher modifier,
it will be replaced. If there are more than one Morpher modifiers on the
object, the one that is nearest to the Top of the Stack will be replaced.
If there is no Morpher on the Head mesh and there is a BonesPro modifier
present, the Morpher modifier copy will be placed bellow the BonesPro modifier.
If there is no BonesPro modifier, the Morpher will be placed on top of
the Stack.
If any error should occur during this phase,
a general error message will appear in the System Report window. The cause
for an error might be a missing Morpher modifier on any of the two objects,
or a bug in the utility. Please contact the author in this case.
After importing (even on nothing has been
imported), the [SAVE FINAL SCENE] button will be enabled.
Press the [SAVE FINAL SCENE] button
to save a copy of the scene with a name "SCxxxCF" to the "\Character Final"
subdirectory.
NOTE: After saving the
Character Final scene, the MAX title bar will display the new CF name,
but the scene itself will not be updated to the new file name. Starting
the Utility again will still find the original MF scene and path. Using
Save and Save As... will apply to the original MF scene. This is caused
by a limitation of MAXScript. It can be fixed in case this is a workflow
or security problem.