Can spawn groups be used inside a Niagara System that runs through the NDC pipeline? (Can NDC and SG work in tandem)?

I have tried multiple approaches to get spawn groups and NDC working together, but so far without success. Spawn groups are used to compress emitter counts, while NDC is used to reduce CPU overhead.

There appears to be a conflict between NDC spawn conditionals and spawn groups when used together. At this point, it is unclear whether this is due to an implementation error on my part or a limitation of the system itself.

[Attachment Removed]

Steps to Reproduce
I have tried multiple approaches to get spawn groups and NDC working together, but so far without success. We are using spawn groups to compress emitter overhead, while NDC is used to reduce CPU overhead.

There appears to be a conflict between NDC spawn conditionals and spawn groups when used together. At this point, it is unclear whether this is due to an implementation error on my part or a limitation of the system itself.

[Attachment Removed]

Hi,

I wrote a long reply on this very subject on the RTVFX discord recently.

Join here Discord.

It’s quite a useful and knowledgeable community for Niagara and vfx generally.

The overview is that SpawnGroups are setup by individual spawns inside the emitters.

For NDC spawning this isn’t really possible for a variety of reasons. All NDC spawns have to occur in the same spawn.

However, we can get our SpawnGroup like behavior back by reconstructing Particles.SpawnGroup from our NDCSpawnData.

Here is the key part from my above mentioned post.

We could add some custom logic to our InitFromNDC module and set Particles.SpawnGroup pased on the data from GetNDCSpawnData.
This will return:
    NDCIndex - The index of the NDC item that spawned this particle. Can be used in Read() function on the NDC DI.
    NDCSpawnIndex - The index into all of the particles spawned by the same NDC. Similar to ExecIndex() but gives you a (unique per NDCIndex) value 0 to NDCSpawnCount-1
    NDCSpawnCount - The number of particles spawned by the same NDCIndex. 
 
I can see some cases where setting Particles.SpawnGroup = NDCIndex might be useful.
 
Or evenly split particles within each NDCSpawn between spawn groups.
Particles.SpawnGroup = (NDCSpawnIndex / (NDCSpawnCount / NumSpawnGroups)
 
Or it should be easy enough to setup a module that will split into N weighted spawn groups. +/- some randomization. 
All based on this NDCSpawnIndex and NDCSpawnCount value.

[Attachment Removed]

im the same guy Simon:) Thanks for you help, i did get spawn groups working with NS NDC setup, because of your advice on RTVFX discord.

Have a great weekend!

[Attachment Removed]

Ha ok awesome.

I did think it was a coincidence that it came up twice :slight_smile:

Glad you got it working.

[Attachment Removed]