Niagara Data Channels - Question

Hey guys,

I’m currently trying out NDCs for hit impacts following the various tutorials out there.

I’ve managed to get it working, but here is what I’m trying to do :

  • My goal is to have one system that would have all of the emitters for all the surface types (ie. dirt, sparks, water…) and based on the write of the surface from the BP, spawn or not certain emitters.
  • The problem is that at the moment it reads the surface type at particle spawn level (because Get NDCSpawn Data which is used for the index has to be in particle level) which happens too late to do the logic at emitter update.

Maybe something has to be done at system level, but I cannot wrap my head around it :confused:

If anyone has a solution, I would really appreciate, thanks :slight_smile:

Might have found something that works, but pretty sure there is a better solution out there.

Hello,
I just stumbled upon the same issue. And I think it can be done with the Conditional Spawning.
There is an example in the NiagaraDataChannels content examples (I’m on 5.5). In the example it’s with a float value. But I just changed it to EPhysicalSurface enum and it works!

  • Add the EPhysicalSurface enum to your data channel

  • Write it as you normally would in BP (from 5.4 onwards I think you can write the enum directly without the need of converting to int)

  • In your Spawn Conditional node, add the create variable:

  • For the Comparison Operator chose ‘Equals’

  • Select the physical surface you want as the condition. This can then be done for each emitter, to select depending on the surface type.

  • You might need to restart engine, sometimes it’s necessary.

Quite neat actually. The only drawback would be that you are limiting the amount of spawn conditions this way. E.g. if you wanted to also check if a float value is greater than xxx as spawn condition, that would be impossible, as the Conditional Operator is set to ‘Equals’.

Hope that helps!

2 Likes

Where did you find this content example ? I’m looking in the Unreal Content Example project but I don’t find anything related to data channels inthere :sweat_smile:

What I had to do was remove local content for the Content Examples package and redownload it which seemed to include the new content after

1 Like