"Experimental support for facial animation"?

I see! I tried implementing the interface on the actor but I couldn’t get it to work. The values are getting printed but nothing happens in the anim BP. Granted I don’t really know how it’s supposed to work in the anim BP, I guessed the curves would get their values from the interface and be set automatically. I tried adding a modify curve node and using a Get Curve node in the anim BP and choosing Key1 but that didn’t work either. It works if I bypass the CurveSource and just cast to my character BP and get the CurveData float (straight from the envelope follower) from there.

The CurveName variable has Key1 as its value.
Event graph

Get binding
getbinding.png

Get curves
getcurves.png

Anim BP

It looks like you are on the right track. I assume that if you bring up the curve window you see no output for the named curve in question?

The curves are there but the values are at 0. I’m not sure if auto should be ticked or not. It is ticked but I can’t disable it, if I do so the editor crashes. I didn’t really expect to find something that crashes the editor. Maybe the cause is that I’ve got a curve named Key 1 and one named Key1, I renamed the morph target on my mesh from Key 1 to Key1 because I thought the space could mess something up.

The values stay at 0 even when using the modify curve method with try get pawn owner - cast to the BP - get curve data, even though I can see the mesh using the morph target when playing the level.

Edit: okay, I cannot even drag the morph target curves in the anim blueprint curve viewer anymore without crashing anymore, I guess I messed something up.

Edit2: the crash seems to have something to do with modify curve with a morph target and then clicking auto in the curve viewer for that morph target. Or dragging the slider.

Ah! I missed this bit at first. Indeed if you are doing what you describe I wouldn’t expect the morphs to be applied in the anim BP editor. In there you don’t have any control over the components of the displayed actor, so if your curve source is reliant on some external object then you wont see the results you would get in game.

The crashes are not good tho, Ill see if in can get a repro this side. You don’t happen to have a debugger attached, or a callstack from the crash reporter, do you?

I’ve logged the crash as UE-44914.

Did you reproduce the crash or should I download the editor symbols for debugging?

Also did you see any issues in my setup for curve source?

Yes I reproduced it with a minimal project, thanks.

Your setup looks fine AFAICS. If it works in PIE, but not in the anim BP editor, that is expected.

It doesn’t work though, the morph target is not applied using curve source. It only works when I cast to my character BP and get the curve data directly from the envelope follower. Get Curves is outputting the correct values so it’s not connected somehow it seems like, but the binding names are the same and I was thinking it would work like this.

I’m having a hard time setting up the new audio engine stuff myself (I’ve not played with it at all), so I cant even get the envelope follower working. I’ll keep trying, but if you have any more details on your setup that would be useful.

Sure, sorry about that.

There’s a guide here: New Audio Engine: Quick-Start Guide - Audio - Epic Developer Community Forums

Basically you need to edit WindowsEngine.ini and add AudioDeviceModuleName=AudioMixerXAudio2. Then enable the sound utilities plugin. I don’t know if the synthesis plugin is needed but you can enable that too.

Then in the same thread there’s Getting Started with Source Effects. Create a Preset Chain (right click and Sounds) and then a Preset with the envelope follower and put that Preset in the Preset Chain. After that you need some sound file. Open the sound wave and add the Preset Chain in the Source Effect Chain slot.

Then you need to set up stuff in your BP for the character or whatever actor you’ve got. You can start with an Audio component set to the sound wave you used earlier. Then add an EnvelopeFollowerListener component. Then you need to add the Source Preset you created earlier, create a variable with the type Source Effect Envelope Follower Preset and compile. Choose the Source Preset you created in the default value.

Drag the Preset variable into the BP and from that add a Register Envelope Follower Listener node. After that you can drag from the Envelope Follower Listener component (drag it into the BP) and Assign it to OnEnvelopeFollowerUpdate. This will hook up the event dispatcher and create the custom event that the EnvelopeFollowerListener component will trigger. In my case the sound was pretty low so I multiplied the Envelope Value by 20 times so I got more of a 0-1 range. You should be able to print this value when in PIE to make sure things are hooked up correctly.

By default the audio will play by default but you can also create a timer that triggers the audio like I did in my BP above. The rest of my BPs I’ve posted above. You should be able to get morph targets from the envelope follower alone by either doing Set Morph Target in the character BP or in the animation BP anim graph Try Get Pawn Owner and cast it to the character, get the Envelope Value (set it to a variable first) and put that in a Modify Curve node. That works fine but I couldn’t get the Curve Source method to work.

OK I got a minimal setup without the (rather cool) audio setup you detail above (thanks for that by the way!). It looks as if this is a problem with C++/BP interfaces not wanting to cooperate. I’m investigating.