Niagara Modules - Defaulting an attribute with an input property

I wanted to default a property in a Niagara module with an input attribute. This module is in the particle update section of the stack.

Instead of taking the actual value from the module, it just takes the default of the input property instead.

Is there anything I can do to fix this problem without having to default the property in particle spawn? (I don’t want the problem that users of the module need to add 2 modules, just to default a property).

[Attachment Removed]

Steps to Reproduce[Attachment Removed]

You should be able to do that just like this, no need for the begin defaults, add the input, set the default value, add the module and the default should be the value.

[Image Removed]Changing the default after adding the module won’t impact existing modules, if you want to have something where the user can leave it as ‘unset’ I would use a static switch and following along with initialize particle.

Thanks,

Stu

[Attachment Removed]

Thanks for the reply.

My screenshot may be confusing, since I simplified the logic to share it here.

[Image Removed]There would be a bunch of logic where I marked in yellow that would modify the particle ‘prop’ attribute each frame. So, I don’t want the ‘prop’ attribute being initialized each frame, but I do need a user input to initialize it.

The module is in particle update part of the stack, hence the reason I wanted to use ‘Begin Defaults’ for initializing it.

[Attachment Removed]

So to try to be clear :

  • I want to initialize an attribute (in this case, the ‘prop’ attribute) with a user input attribute, in a particle update module.
  • Then the ‘prop’ attribute should be set per frame and fed back to itself in the next frame, with some logic, without being affected by the initialization of the attribute.

The simple approach would be that I initialize the attribute in the particle spawn module, but for users of this module, they would need to add 2 modules to their emitters instead of just one, just to initialize the ‘prop’ attribute.

[Attachment Removed]

Basically, I think there is a bug that the input attribute (in this case ‘int32’) is passing on its default value instead of the value set in the module UI.

[Attachment Removed]

Hi,

Sorry for the late response.

So it looks like a bug in the translator, as we write the constant not the reference to the input.

I can add a jira, but I don’t know when this will be addressed.

Thanks,

Stu

[Attachment Removed]

Thanks! Would be great if we could get in a fix for this.

[Attachment Removed]