I’m a complete noob in Unreal (using UE5 on a Macbook Pro), and am trying to build a project that requires a morph target of a character to change with the amplitude of audio. The audio needs to be streamed from a URL.
I’ve built a blueprint that allows the character’s morph target to be controlled by a .wav that is already imported into my project - but I think this method needs to analyse the audio beforehand, which streaming the audio from a URL wouldn’t allow for.
I’ve looked at “Arthur’s Audio Blueprints”, and he has a few levels where he’s able to take his live microphone audio signal and affect the transformation of meshes using the audio’s amplitude - but as I’m completely dumb, I don’t understand it at all!
Is there a way that I can do what I’m looking to do? If anyone knows how it can be done (or could even screenshot a sample node setup if it’s not too much trouble) I’d be so incredibly grateful for the advice!
If you’re just looking for the general volume of the sound (i.e., the morph does things like change when the sound gets louder or softer), you can use an envelope follower for that. Envelope followers work in realtime, so streaming the sound from a URL isn’t an issue. Any sound you’re streaming from a URL you’ll need to use a Media Sound Component for, but you can attach a Submix to that component. And you can get volume from that Submix!
Querying an envelope from a Submix is admittedly not the most intuitive thing in the world. You’re going to need to use Blueprints. But the basic flow is:
- Have a Submix in your Blueprint as a variable
- Call “Start Envelope Following” on the Submix
- Call the function “Add Envelope Follower Delegate,” and add a delegate to it
- This is a weird step if you’re not used to Unreal
- There’ll be a red box called On Submix Envelope BP on this “Add Envelope Follower
Delegate” function
- Drag off that red box, and select “Add Event->Add Custom Event” from the dropdown
menu
- That’ll give you an event that will contain the envelope data of your sound, that will get
called every time there’s new envelope data
- This is where you put the stuff you want to be influenced by the envelope value
- Call “Stop Envelope Following” at some point, probably
- Envelopes get the average volume over short periods of time of the sound: you can mess with the settings of this on the Submix itself. “Envelope Follower Attack Time” controls how fast the envelope responds to input. “Envelope Follower Release Time” controls how slowly the envelope dampens from input.
Now in terms of getting that data to a morph target, I have no idea, I know nothing about morph targets.
If what you’re trying to do, though, is get the sample accurate waveform, i.e., things like this, that’s a lot harder. It is doable, but nearly everyone I’ve seen do this used Niagara. I’m not sure how well it’d translate to morph targets - Niagara has a built-in oscilloscope that people rely on.
Would you mind sharing a screenshot of the blueprint that you used to allow character morph targets to be controlled by a .wav?
I know it was long ago, but I could really use the help, if you are so kind thanks!