Hello,
I've been using AnyPortrait for a while and I've created a few animations of my own. And I think one of the best tools for portrait animation in Unity. However, I want to use this tool more widely, rather than just character animation.
I'm going to create a cutscene for my game, but as you know the cutscene consists of multiple images. What exactly should we go about creating a cutscene for AnyPortrait? An example video for cutscene: https://www.youtube.com/watch?v=SxMu32c2xvg
Should we create a custom Unity scene just for the cutscene and create a new AnyPortrait object for each frame in the hierarchy? And we can play all animations by linking them together with a script.
At first, this came to my mind, but when I was testing AnyPortrait before, I added another portrait to the game and when I exported, the size of the game increased by about 15MB. I don't understand why a single portrait increases the size so much. It consisted of 2560x1080 resolution Photoshop file to support widescreen mobile devices. If it was 4K, who knows how much it would have increased. If a single Photoshop file increases the size this much, I cannot even guess how much the cutscene, consisting of dozens of frames, will increase the size. If we are going to cutscene, how should we optimize?
Two options are offered to us when making bake. The second option is marked as "optimize" but from what I heard we could not edit it further if we did this. This is a huge risk, because it means we won't be able to fix the animation afterwise. If we choose the optimized bake option, how can we do when we want to edit again? And how can we further reduce the file size of these portraits without losing too much quality?
Another question is that I plan to have mouth movement in cutscene. However, I could not understand how it would be in AnyPortrait. As far as I understand there is no audio playback feature.
An extra note: I couldn't find the layer opacity setting when editing the animation clip. So I created a float type morph, while I turned on in one, I turned it off in the other. Temporarily I setting the opacity this way, it would be nice if the program had a feature in itself.
Thanks in advance.
Hi!
We will answer your questions as follows.
First, AnyPortrait was developed only for animating a single GameObject. This is structurally fixed, and if we want to create something like a cutscene we have to create a whole new tool.
We have no plans to create a new tool that integrates multiple character animations. Instead, it is recommended to use Unity's Timeline or Scripts.
How to use Unity's Timeline, we probably introduced you before, but once again, we attach a link as below.
https://rainyrizzle.github.io/en/AdvancedManual/AD_Timeline.html
Next, we will give you an answer on the size of character files created with AnyPortrait.
The size of the character file itself increases with the number of vertices and meshes, the number of bones, the number and complexity of animation clips and modifiers.
Depending on how you work, its file size may not be much, or vice versa.
Also, not only the size of the AnyPortrait file itself, but the file size of the images you use is also very relevant.
Check the file size of the Texture Asset in the Inspector window. Reducing the image size or changing the compression option can significantly reduce the file size.
Not all Texture Assets need to be 2048 or larger to make a 4K screen.
(Also, if the original PSD file for Bake with Atlas is included in the project as an asset, try moving it out of the project (not removing it). After becoming Bake with Atlas, you won't need the original PSD file.)
Also the answer to "Optimized Bake".
"Optimized Bake" is a Bake method to be used in the program that will be distributed at the end after all editing is finished.
Users should use the usual Bake method during game or program development and can be optimized by replacing the character created with Optimized Bake immediately before the distribution.
We previously suggested using the Unity Timeline or script to add sound.
In this regard, assuming you have added sounds to the Unity Timeline, let us explain how to make Lip-Sync simple.
Write a very simple script to control apPortrait's Control Parameter.
As you can see from this script, the value of the public variable "mouthOpen" will continue to be assigned to the control parameter named "Mouth Open".
This is because the name of the control parameter that determines the mouth shape of our character is "Mouth Open".
Now let's configure the scene.
(1) They are characters created with AnyPortrait and their parent GameObjects.
(2) It is a GameObject with a Playable Director to which the Timeline will be applied.
(3) It is the GameObject containing the above script. Don't forget to assign apPortrait.
When you assign Timeline Asset to Playable Director and open the Timeline window, the above screen will appear.
Register the "LipSyncController" GameObject containing the above script in this Timeline as an Animation Track.
Now let's control LipSyncController's public variable "mouthOpen" with this Timeline.
(1) Click the Record button to start recording.
(2) Select LipSyncController in this state.
(3) Edit the "mouthOpen" variable. The UI turns red and you can see that it is controlled by the Timeline.
(1) It is also possible to edit the curve by pressing the Curve button.
(2) Let's complete the animation for "mouthOpen".
(1) When you run the game, you can see that (2) the shape of the character's mouth changes according to the timeline.
Using this method, you can synchronize the sound and the shape of the character's mouth.
You can also control the visibility and color of the mesh, including opacity, from modifiers in animations.
If you can't change the color, check the modifier settings as follows.
(1) Select the animation modifier.
(2) Color Option should be turned on. (The default is off.)
(1) Register the mesh as the timeline layer of the modifier and add a keyframe.
(2) Turn on the edit mode.
With the mesh and keyframe selected, you can change the color and visibility from (3) the top of the screen or (4) the keyframe property UI. (You can also change the visibility in the Sub-Hierarchy on the right.)
(5) The mesh color and alpha value are changed.
If you have any further questions regarding this issue, please let us know.
Thank you.