[SOLVED] Is it possible to cast shadow on UE5 notifies in anim montage?

Hello there!

I was wondering if there’s a way to spawn niagara mesh particles through anim notifies inside animation montage and enable the cast shadow option.

You might need to call a blueprint in the anim montage, and handle activating the niagara system and controlling the cast shadow option within the BP. That’s just my best guess though without having personally done what you’re asking about.

There is a built in option to play Niagara effects in anim montages:


You can then spawn mesh particles inside your Niagara effect.

I’m not sure actually if you can enable shadows there, I thought they were. If not, you can always use the CustomComponentRenderer to spawn a StaticMesh instead. There you have all the options of a normal StaticMesh.

Custom Anim Notifiers

One last thing, which is something a lot of people don’t know:
You can easily create your own anim notifiers in blueprint. Just inherit your blueprint class from one of the existing anim notifiers. Then you can customise the logic inside to whatever you need (e.g. spawning a Niagara System and enabling shadows).


image

You can even beautify it by overwriting the name, color etc. :slight_smile:


Result:
image

You could expose the NiagaraSystem that you want to spawn as well. Just make it a public variable.

3 Likes

I love making my own notifies, I just wasn’t sure about the shadow casting stuff on Niagara particles with any kind of out of the box option. I guess I was trying to (and failing at) suggesting a custom notify, but made it sound more like a standard BP :smiling_face_with_tear:

Thanks for the awesome write up and explanations Tobias! :sparkling_heart:

2 Likes

Actually :smiley: , I wasn’t sure either, so I double checked:
‘Cast Shadows’ on spawned Niagara systems is disabled by default (and also in the AnimNotify unfortunately). This means custom component will also not work.
So creating a custom AnimNotify is probably the best solution, in the end.

2 Likes

Hello! thanks a lot for the replies !

I was able to fix my main need which was being able to cast shadow from my particles !
And even was able to expand from it and expose parameters to control user variables I set up in the particle system too! Cause same as cast shadow, that feature is not enabled by default into the play niagara notify

as Tobias mentioned, I made a custom notify from the play anim notify class and then adjusted like this to enable shadows and casted niagaracomponent to write niagara variables:
(also dont mind my variable naming…I have zero creativity :see_no_evil:)

2 Likes

Great solution! Happy you were able to solve it :slight_smile: