diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d23972..5d231ca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,9 @@ ## Unreleased +* **Added** demo projects for Spine and After Effects. * **Fixed** After Effects script on macOS ([issue #77](https://github.com/DanielSWolf/rhubarb-lip-sync/issues/77), [issue #128](https://github.com/DanielSWolf/rhubarb-lip-sync/issues/128)) +* **Fixed** Rhubarb for Spine when used on non-Windows systems without extended mouth shapes ([issue #125](https://github.com/DanielSWolf/rhubarb-lip-sync/issues/125)) * **Changed** the way you make Rhubarb available to After Effects on macOS. This used to be a `/usr/local/bin/` symlink but is now a `PATH` entry ([issue #143](https://github.com/DanielSWolf/rhubarb-lip-sync/issues/143)). For details, see the README file for Rhubarb for After Effects. ## Version 1.13.0 diff --git a/extras/EsotericSoftwareSpine/README.adoc b/extras/EsotericSoftwareSpine/README.adoc index 080012c..619b572 100644 --- a/extras/EsotericSoftwareSpine/README.adoc +++ b/extras/EsotericSoftwareSpine/README.adoc @@ -6,25 +6,27 @@ image:../../img/spine.png[image] == Installation -https://github.com/DanielSWolf/rhubarb-lip-sync/releases[Download Rhubarb Lip Sync] for your platform, then extract the archive file in a directory on your computer. You’ll find Rhubarb Lip Sync for Spine in the directory `extras/EsotericSoftwareSpine`. +https://github.com/DanielSWolf/rhubarb-lip-sync/releases[Download Rhubarb Lip Sync] for your platform, then extract the archive file in a directory on your computer. You'll find Rhubarb Lip Sync for Spine in the directory `extras/EsotericSoftwareSpine`. -To create lip sync animation, you’ll need Spine 3.7 or better. +To create lip sync animation, you'll need Spine 3.7 or better. == Preparing your Spine project -You can add lip-sync’ed dialog to any Spine skeleton. First, make sure it has a dedicated slot for its mouth. I’m naming the slot `mouth`, but you can choose any name you like. +This section describes how to prepare your Spine project for lip sync animation. To get you started, you can use the demo project that comes with Rhubarb Lip Sync. It's located in the `extras/EsotericSoftwareSpine/demo` directory. Open it in Spine to see how it's set up. -Next, add image attachments to the mouth slot, one attachment per mouth shape. For details about the expected mouth shapes, https://github.com/DanielSWolf/rhubarb-lip-sync#user-content-mouth-shapes[refer to the Rhubarb Lip Sync documentation]. You’ll need at least the six basic mouth shapes A-F. If you add any of the extended mouth shapes, Rhubarb will automatically use them to create better-looking animation. I’m naming the attachments `mouth_a`, `mouth_b`, `mouth_c`, etc. You can choose any naming scheme you like and Rhubarb will detect it, as long as it’s consistent (including upper and lower case). For instance, `A-Lips`, `B-Lips`, `C-Lips`, … is fine; `mouth a`, `mouth B`, `Mouth-C`, … isn’t. +You can add lip-sync'ed dialog to any Spine skeleton. First, make sure it has a dedicated slot for its mouth. I'm naming the slot `mouth`, but you can choose any name you like. + +Next, add image attachments to the mouth slot, one attachment per mouth shape. For details about the expected mouth shapes, https://github.com/DanielSWolf/rhubarb-lip-sync#user-content-mouth-shapes[refer to the Rhubarb Lip Sync documentation]. You'll need at least the six basic mouth shapes A-F. If you add any of the extended mouth shapes, Rhubarb will automatically use them to create better-looking animation. I'm naming the attachments `mouth_a`, `mouth_b`, `mouth_c`, etc. You can choose any naming scheme you like and Rhubarb will detect it, as long as it's consistent (including upper and lower case). For instance, `A-Lips`, `B-Lips`, `C-Lips`, … is fine; `mouth a`, `mouth B`, `Mouth-C`, … isn't. Finally, you need to add some audio events, that is, events with associated audio path. These audio events will be the basis for animation. -_Optionally_, you can enter the dialog text into each event’s string property. If you do, this will help Rhubarb to create more reliable animation. But don’t worry: If you don’t enter the dialog text or if you already use the string property for something else, the results will normally still be good. For more information, see the https://github.com/DanielSWolf/rhubarb-lip-sync#user-content-options[documentation on the `--dialogFile` option]. +_Optionally_, you can enter the dialog text into each event's string property. If you do, this will help Rhubarb to create more reliable animation. But don't worry: If you don't enter the dialog text or if you already use the string property for something else, the results will normally still be good. For more information, see the https://github.com/DanielSWolf/rhubarb-lip-sync#user-content-options[documentation on the `--dialogFile` option]. == Exporting a JSON file Export the skeleton(s) by selecting _Spine_ | _Export…_. -Choose JSON format. Make sure the output folder is the same folder that contains your `.spine` file, or Rhubarb won’t be able to locate your audio files. Also, make sure to check the _Nonessential data_ checkbox. Despite the name, Rhubarb needs this information. Finally, click _Export_. This will create a file with the same name as your skeleton and the extension `.json`. +Choose JSON format. Make sure the output folder is the same folder that contains your `.spine` file, or Rhubarb won't be able to locate your audio files. Also, make sure to check the _Nonessential data_ checkbox. Despite the name, Rhubarb needs this information. Finally, click _Export_. This will create a file with the same name as your skeleton and the extension `.json`. == Performing lip sync @@ -44,8 +46,8 @@ Each time an animation job finishes, the JSON file is updated with the new anima Rhubarb Lip Sync for Spine has only changed the exported `.json` file, not your original `.spine` project file. To do that, switch back to Spine. -Delete your skeleton by selecting it in the hierarchy tree and clicking the _Delete_ button. If you don’t, Spine will complain in the next step that a skeleton with this name already exists. +Delete your skeleton by selecting it in the hierarchy tree and clicking the _Delete_ button. If you don't, Spine will complain in the next step that a skeleton with this name already exists. Select _Spine_ | _Import Data…_. Make sure the JSON file path is correct. Also make sure the checkbox _New project_ is *not checked*, or else Spine will start confusing paths. Click OK to re-import the skeleton from the JSON file. -If everything went well, you will now have a number of new, lip-sync’ed animations on your skeleton! +If everything went well, you will now have a number of new, lip-sync'ed animations on your skeleton! diff --git a/extras/EsotericSoftwareSpine/demo/audio/1-have-you-heard.ogg b/extras/EsotericSoftwareSpine/demo/audio/1-have-you-heard.ogg new file mode 100644 index 0000000..3c1aa9b --- /dev/null +++ b/extras/EsotericSoftwareSpine/demo/audio/1-have-you-heard.ogg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f76e59c49d3e9dc1c9cfde7bd2b66fc58191988ba4e58f6a4723d8fca36e594d +size 36141 diff --git a/extras/EsotericSoftwareSpine/demo/audio/2-it's-a-tool.ogg b/extras/EsotericSoftwareSpine/demo/audio/2-it's-a-tool.ogg new file mode 100644 index 0000000..2c08455 --- /dev/null +++ b/extras/EsotericSoftwareSpine/demo/audio/2-it's-a-tool.ogg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9e186e3c18948d9b40fad2164aa8b551085c03940277080d9bb41a0d7f11d6ce +size 64221 diff --git a/extras/EsotericSoftwareSpine/demo/audio/3-and-now-you-can.ogg b/extras/EsotericSoftwareSpine/demo/audio/3-and-now-you-can.ogg new file mode 100644 index 0000000..d7b0ba6 --- /dev/null +++ b/extras/EsotericSoftwareSpine/demo/audio/3-and-now-you-can.ogg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9daac5cae1c15c0d63865a4a990b7754752d20a0641f80027b6c86c3254b0e51 +size 43546 diff --git a/extras/EsotericSoftwareSpine/demo/images/head.png b/extras/EsotericSoftwareSpine/demo/images/head.png new file mode 100644 index 0000000..e82534c Binary files /dev/null and b/extras/EsotericSoftwareSpine/demo/images/head.png differ diff --git a/extras/EsotericSoftwareSpine/demo/images/legs.png b/extras/EsotericSoftwareSpine/demo/images/legs.png new file mode 100644 index 0000000..3b4fe60 Binary files /dev/null and b/extras/EsotericSoftwareSpine/demo/images/legs.png differ diff --git a/extras/EsotericSoftwareSpine/demo/images/mouth_a.png b/extras/EsotericSoftwareSpine/demo/images/mouth_a.png new file mode 100644 index 0000000..92b555b Binary files /dev/null and b/extras/EsotericSoftwareSpine/demo/images/mouth_a.png differ diff --git a/extras/EsotericSoftwareSpine/demo/images/mouth_b.png b/extras/EsotericSoftwareSpine/demo/images/mouth_b.png new file mode 100644 index 0000000..27684de Binary files /dev/null and b/extras/EsotericSoftwareSpine/demo/images/mouth_b.png differ diff --git a/extras/EsotericSoftwareSpine/demo/images/mouth_c.png b/extras/EsotericSoftwareSpine/demo/images/mouth_c.png new file mode 100644 index 0000000..968900a Binary files /dev/null and b/extras/EsotericSoftwareSpine/demo/images/mouth_c.png differ diff --git a/extras/EsotericSoftwareSpine/demo/images/mouth_d.png b/extras/EsotericSoftwareSpine/demo/images/mouth_d.png new file mode 100644 index 0000000..f8a7a7d Binary files /dev/null and b/extras/EsotericSoftwareSpine/demo/images/mouth_d.png differ diff --git a/extras/EsotericSoftwareSpine/demo/images/mouth_e.png b/extras/EsotericSoftwareSpine/demo/images/mouth_e.png new file mode 100644 index 0000000..7a0b59d Binary files /dev/null and b/extras/EsotericSoftwareSpine/demo/images/mouth_e.png differ diff --git a/extras/EsotericSoftwareSpine/demo/images/mouth_f.png b/extras/EsotericSoftwareSpine/demo/images/mouth_f.png new file mode 100644 index 0000000..c1adbdb Binary files /dev/null and b/extras/EsotericSoftwareSpine/demo/images/mouth_f.png differ diff --git a/extras/EsotericSoftwareSpine/demo/images/mouth_g.png b/extras/EsotericSoftwareSpine/demo/images/mouth_g.png new file mode 100644 index 0000000..7ea65ba Binary files /dev/null and b/extras/EsotericSoftwareSpine/demo/images/mouth_g.png differ diff --git a/extras/EsotericSoftwareSpine/demo/images/mouth_h.png b/extras/EsotericSoftwareSpine/demo/images/mouth_h.png new file mode 100644 index 0000000..a087798 Binary files /dev/null and b/extras/EsotericSoftwareSpine/demo/images/mouth_h.png differ diff --git a/extras/EsotericSoftwareSpine/demo/images/torso.png b/extras/EsotericSoftwareSpine/demo/images/torso.png new file mode 100644 index 0000000..27a206c Binary files /dev/null and b/extras/EsotericSoftwareSpine/demo/images/torso.png differ diff --git a/extras/EsotericSoftwareSpine/demo/matt.spine b/extras/EsotericSoftwareSpine/demo/matt.spine new file mode 100644 index 0000000..c5baab3 Binary files /dev/null and b/extras/EsotericSoftwareSpine/demo/matt.spine differ diff --git a/extras/EsotericSoftwareSpine/src/main/kotlin/RhubarbTask.kt b/extras/EsotericSoftwareSpine/src/main/kotlin/RhubarbTask.kt index d615ef2..7abc391 100644 --- a/extras/EsotericSoftwareSpine/src/main/kotlin/RhubarbTask.kt +++ b/extras/EsotericSoftwareSpine/src/main/kotlin/RhubarbTask.kt @@ -81,15 +81,12 @@ class RhubarbTask( } private fun createProcessBuilderArgs(dialogFilePath: Path?): List { - val extendedMouthShapesString = - if (extendedMouthShapes.any()) extendedMouthShapes.joinToString(separator = "") - else "\"\"" return mutableListOf( rhubarbBinFilePath.toString(), "--machineReadable", "--recognizer", recognizer, "--exportFormat", "json", - "--extendedShapes", extendedMouthShapesString + "--extendedShapes", extendedMouthShapes.joinToString(separator = "") ).apply { if (dialogFilePath != null) { addAll(listOf(