Niagara Programmable Set Fixed Bounds not behaving as expected

Hi Epic,

I am having a really weird behaviour. I am trying to get some bounds animated using the SetFixBounds but seems that when animating them based on a bool, the bounds won’t animate, as It looks like there is some internal logic that will only return the higher bound value.

If I though invert and plug the Min to the Max and vice versa, then the animation works as expected.

My expectations is that no matter what I plug in the Min (making sure are always negative values) and no matter what I plug in positive (making sure are always positive values) I can animate the bounds as I desire.

Do you know if my expectations are wrong? definitely feels there’s a bug here.

Happens with CPU and GPU emitters.

I attached:

  • The zipped uasset of the particle system used as a test.
  • A video showing the behaviour
  • A screenshot of the Scratch Pad module where data is passed as expected and doesn’t animate (inverting the mix max will make it work, but feels odd and wrong)

Let me know if any more information is needed,

Kind regards,

[Attachment Removed]

Steps to Reproduce

  1. Create a Particle System with a ScratchPad module in Emitter Update
  2. Set Bounds to be Programmable and in the scratchpad create a logic that based on a bool switches from one bounding box min max to another min max value
  3. Observe that when this is done, if min and max are connected to the right min max input, the programmable bounds won’t work (feels like something internally is detecting different bounds and making it unable to update and bypass the larger one)
  4. If min max are inverted, then it works as expected, where the bounds will automatically update, but that doesn’t feel right.

[Attachment Removed]

Hi,

Inverted works because it bypasses this test…

	if (!CurrLocalBounds.IsValid ||
		!CurrLocalBounds.IsInsideOrOn(NewLocalBounds.Min) ||
		!CurrLocalBounds.IsInsideOrOn(NewLocalBounds.Max) ||
		(ForceUpdateTransformTime > MaxTimeBeforeForceUpdateTransform))

I believe this code came from Cascade and was replicated into Niagara many years ago.

Imo this should be part of the dynamic calculation to try and mitigate the cost of constantly growing / shrinking dynamic bounds, vs fixed bounds where changes are intentional.

Thanks,

Stu

[Attachment Removed]

Hey Stuart,

That does makes sense, I think the example also I put would be then more efficient to make sure we only execute it at the right time, instead of constantly executing (as then that’s like automatic bounding box where it will set it every frame instead of only setting when required)

Thanks for the headsup. I think for now we can close this thread :slight_smile:

[Attachment Removed]

Yeah exactly, you want to avoid updating the bounds box as that will trigger update transforms which is what we are trying to avoid :slight_smile:

Thanks,

Stu

[Attachment Removed]