What is the mode input in the spawn conditional and spawn direct node used for? I’ve just left it on ‘Override’, but what does ‘Accumulate’ do? I couldn’t see any change to the behaviour.
Also, ‘None’ seemed to do the same thing as the ‘Enable’ input, so what is the point of the two ways of disabling spawning?
[Image Removed]
Finally, a more general question.
Why do we have spawn conditional and spawn direct nodes separated out? Could it be possible to add spawncount as an input to the spawn conditional so that the two nodes could be combined? That would give more flexibility to the spawn conditional by adding the ability to set the spawn count outside of Niagara, and still use conditions on if the particles will be spawned or not.
If you have multiple calls to spawn conditional, the accumulate mode will accumulate with any existing spawn count from previous calls. Override will replace with the latest call’s spawn counts.
None vs Enable is mostly a convenience thing for the Niagara Script to not have to transform its data in clunky ways to drive the spawn conditional. Either the bool or the enum will work depending on which is easiest for your script setup.
Wrt SpawnConditional/Direct, yes they probably could be combined into one but it would be quite a large complex function to fit all the functionality into one.
I felt it better to keep them separate to lower the complexity. Maybe in future I’ll add something more here.
It should be possible to get conditional spawning with direct spawn if you call spawn conditional after your spawn direct call. Set the spawn count to zero if your condition passes, otherwise it’s left alone as the previous value from SpawnDirect.
However I’d actually prefer to move away from these functions entirely and find some method for iterating directly on the NDC elements and directly testing conditions + calling spawn directly inside the Niagara graph etc.
These fixed logic functions are necessary for now but my hope is that they may not always be
Accumulate shouldn’t be any more expensive other than, any extra particles you spawn and that each call itself would incur the small DI function call cost (accumulate with 1 call would effectively be the same as override).
Yes you should be able to use spawn groups with NDC spawning as long as you’re using the new GetNDCSpawnData function to retrieve the NDCIndex for your spawned particles. As opposed to the old hacky method that would hijack SpawnGroup to feed in which NDC Index to use.