Animation Stream#
Added in version 2.2.
Animation Stream uses the NVIDIA Animgraph service (minimum v1.0.1) to animate your character by subscribing to a stream of audio and animation data from the service.
Note
You must set up a character for animation before adding Animation Stream to your application.
Note
Animation Stream is currently incompatible with the RemoteA2F provider. These two features can’t be used in the same application.
System Requirements#
Windows:
64-bit Windows 10 or later
- Linux:
64-bit Linux OS with libstdc++ version 6.0.29 or later
Ubuntu 21.10 or later
RHEL 9.4 or later
Fedora 35 or later
Debian 12.0 or later
Animation Stream Connection Setting#
The ACE plugin’s project settings have some options that affect the default NVIDIA Animgraph server connection used by the Animation Stream feature.
Edit > Project Settings… > Plugins > NVIDIA ACE > Animation Stream > Animgraph Service Default URL
The server address must include scheme (http or https), host (IP address or hostname), and port number. For example,
http://203.0.113.38:51000
orhttps://animgraph.example.com:51010
.
Edit > Project Settings… > Plugins > NVIDIA ACE > Animation Stream > Animgraph Service Number Of Connection Attempts
By default 1. If you expect to bring up your Unreal-based application at the same time as the NVIDIA Animgraph service, you may want to have more initial connection attempts while the service comes up.
Edit > Project Settings… > Plugins > NVIDIA ACE > Animation Stream > Animgraph Service Time Between Connection Retries (Seconds)
Subscribe Character To Animation Stream#
To animate a character from an animation stream received from an ACE
service, use the blueprint function Subscribe Character To Stream on
the character actor. These instructions describe the blueprint
interface, but you can also call
UACEBlueprintLibrary::SubscribeCharacterToStream
from C++.
Depending on your application, there are many ways to determine which character to animate. Some options might be:
have a single default character that is animated
automatically animate the character that the player is looking at or the closest character
provide some UI for selecting a character
After you’ve chosen a character Actor, subscribe it to an animation stream:
Call the ACE > AnimStream > Subscribe Character To Stream function.
Provide the actor corresponding to the character you want to animate. If the actor has an ACE Audio Curve Source component attached, this starts the connection to the NVIDIA Animgraph service.
Provide a stream name corresponding to a
Stream Id
from the NVIDIA Animgraph service.The node’s Success return value indicates whether the actor was successfully connected to the streaming thread. There is a delay before the connection to the service is actually established.
Even if the node returns True, it’s possible that the connection could later fail. For example if an invalid stream name is provided, or if the service is unavailable. Check the logs for details.
The stream of animations will continue forever until one of the following occurs:
stream is canceled
actor is destroyed
connection to the service is interrupted
Cancel Animation Stream Subscription#
To stop a character from being animated, use the blueprint function
Unsubscribe From Stream on the character actor. These instructions
describe the blueprint interface, but you can also call
UACEBlueprintLibrary::UnsubscribeFromStream
from C++.
Call the ACE > AnimStream > Unsubscribe From Stream function.
Provide the same actor you used for the Subscribe Character To Stream function.
The node’s Success return value indicates whether a valid actor was provided.
The stream is immediately canceled. After this node returns that it is guaranteed, no more animations will occur.