Hello,
I was looking for how to export the animation as a video file that I made in AnyPortrait. I'm currently want to use this feature for sound editing in the video editor software. Because it is easier to do it since I'm better at video editor softwares such as Premiere Pro, After Effects or Audition. I'm going to make a sound editing for a whole animation, and then render as .mp3 or .wav then re-import to Unity to use in the game. Probably it would better if I create new Gameobject for sounds since I have multiple animation clips in one portrait.
Or is there better/easier solution for sound editing inside Unity without exporting the animation as video file? I'm open to suggestions.
Also I might be use this video export feature for not only game animation creation, maybe other things as well such as wallpaper animation etc...
Thanks.
Hi!
If you want to add elements such as sound or post-processing to your animation, we recommend using Unity's Timeline feature.
AnyPortrait supports playing in Unity's Timeline.
Using the Timeline, it is also possible to play animations in sequence.
Details can be found at the link below.
https://rainyrizzle.github.io/en/AdvancedManual/AD_Timeline.html
You can also refer to the official documentation for Unity Timeline.
https://unity3d.com/unity/features/editor/art-and-design/timeline
Unity's Timeline system is based on the Mecanim system. Check out how to learn how to play AnyPortrait's animations with Mecanim's Animator first.
https://rainyrizzle.github.io/en/AdvancedManual/AD_Mecanim.html
After applying Unity's Timeline, you can create video files using "Unity Recorder".
However, the sound quality is probably not as good as that of a professional video editing program. Please take this into account.
How to use the Unity Recorder is also written as a tutorial, so you can see it on the page below.
https://rainyrizzle.github.io/en/AdvancedManual/AD_UnityRecorder.html
As an additional tip, when our team makes promotional videos, we do not use the Unity Recorder for high quality and make the video by following the procedure below.
- Build with PC application. It will be rendered with maximum quality. We use "Timeline" or script to control animations and cameras.
- Run the application and take a video with another capture program.
- Edit the captured video using a professional video editing program.
While it is easy to shoot videos with Unity Recorder, professional editing tools are inevitably good to create the highest quality videos. You can choose the method that suits you considering quality and efficiency.
As Unity is recently updating with interest in the video industry, it is expected that higher-quality video production will be possible in the future.
As AnyPortrait also uses the features of Unity, future versions may be able to provide more convenient video recording functions with improved quality.
Thanks.
Hi!
When we check the errors you have written, it is mainly seen as errors that occur when the code is written incorrectly related to "Initialization".
But since we don't know the full code, we don't know exactly where and why the error occurs.
It is difficult to determine the cause of these types of errors through just a few pieces of code.
If possible, please write down the full code or send the file to our email. ( contactrainyrizzle@gmail.com )
There are several ways to smoothly convert the audio, and the most commonly used method is through "Coroutine".
We've browsed web pages with some sample code to help you.
It can be a bit difficult for you if you haven't tried coroutine code before.
However, the code is not long, so it would be nice to give it a try.
(The script contents of the web pages below are similar.)
https://www.codegrepper.com/code-examples/whatever/fade+in+fade+out+sound+unity
https://forum.unity.com/threads/fade-out-audio-source.335031/
https://gamedevbeginner.com/how-to-fade-audio-in-unity-i-tested-every-method-this-ones-the-best/
Thanks.
Hello,
I prepared my sounds and imported into Unity. I change the animation clip with the button. The first 3 scenes (animation clips) have loop animation.But since the 4th clip only needs to play once, (scene1d) is not loop animation. But next scene1e is loop animation.
I used gameobjects instead of using Timeline because I'm going to play only one sound.
(GameAudio has a sound for each animation clip)
Since the 4th animation clip is not looped, I used CrossFadeQueued to automatically transition animation. And it works great! I just couldn't understand how to do the same situation for sound.
I wrote a script like the one below, but the sound does not change when the clip changes. The first sound still continues to play. That's why I wanted your opinion. (It should change it to scene1d.wav => scene1e.wav when plays the queued animation).
scene1d.wav assigned to gameAudio[3] array
scene1e.wav assigned to gameAudio[4] array
Thank you.
Hi!
Through the code you attached, it seems you want to change the audio according to the animation.
When we check your code, there are "code that starts playing two animations sequentially" and "code that continuously checks whether the second clip is playing and changes the audio" in one function.
However, these two codes should not be in a single function because they must be called completely differently.
The former "code that starts animations" is code that is executed only Once.
On the other hand, the latter "code that checks whether to execute animation" is Continuously executed in the Update function and the condition must be checked. (Of course, it cannot be executed after the conditions are satisfied.)