Prevent Indoor Snow (Niagara)

Greetings,

What’s the best way to keep slow moving NIAGARA particles (because most of the videos available are still for CASCADE) from entering a building, when the effect is following the player?

To be clear, I have attached the Snowing system to a component that hovers over my character’s head.

When he enters a building, I need the snow to continue, not suddenly die… because, you know, windows.

I thought about disabling the effect upon entering any building, and then enabling a separate effect that is not attached to my character, but I doubt that will work because even when I raised his component above the height of the building, snow still made its way inside.

Hey there @Leomerya12! You could technically use collisions for it, but you’ll have to tweak the distance culling for them, because if it get’s too far from you or out of the view frustrum they will fall through the floor/roof.

Disclaimer: One or more of these links are unaffiliated with Epic Games. Epic Games is not liable for anything that may occur outside of this Unreal Engine domain. Please exercise your best judgment when following links outside of the forums.

2 Likes

Thank you!

This definitely helped… but it only works with opaque surfaces. The moment I apply a transparent material, the particles go right through.

Oh, game dev.

Oh yes that’s a problem with using the depth. GPU particles use depth buffer, so you’d have to make your translucent material apply to the depth buffer. Try adjusting the material’s setting Enable Separate Translucency.

1 Like

Sorry, where is Enable Separate Translucency? I see “Mobile Separate Translucency”.

Apologies, that setting was changed out back in 4.13. Try setting translucency pass to before DOF and try both disabling and enabling the depth test.
image

1 Like


Firstly, my thanks submitting your valuable time!

So you got me most of the way there. However, the particle still passes through translucent objects even with those settings.

Just to make sure that it wasn’t because the object was a 2D Radial Translucent Plane (too thin), I applied the material to a cube and it still went through (with your suggestions).

I decided to put a one-sided plane, with shadows disabled, on the roof, and it works.
Perfectly, in fact, BUT, I fear that there may come a time that I won’t be able to get away with this (ie: meshes that are at the character’s height/level: windows, exterior display cases, etc.)

With windows, I can cheat by setting visibility to FALSE when the player is outside, but if there’s a glass display case (for an artifact or merchant good), then I’m out of luck.

I used to hate one-sided geometry, but boy oh boy, the better I get at Unreal, the more useful they become!

Any other suggestions?

GPU particles are a bit harder to handle collisions with, so if this isn’t satisfactory I’d usually recommend faking it when possible. It’ll take a it more effort but instead of collisions, you can just have triggers when you enter your buildings to swap from the player tethered system to a system that just drops snow in front of the windows of buildings. This would just basically be trading which system is active at which time, and would be handled much like instance loading.

1 Like

My friend, this is exactly what I’ve resigned myself to (faking it).

Every time I encounter a new snag, I go through denial, frustration, bargaining, anxiety, and acceptance. Then I get back to work.

You helped get me through the middle three, so thanks for that!

It’s often better to fake it for performance reasons, while we could just stop all particle culling and make sure the collisions occur by swapping them to CPU but there’d be WAY less of them and it’d be expensive.

Though with GPU particles, since they require rendering depth your workaround would work in 90% of cases, but it still requires it to be rendered to handle the collisions, so you may very well turn around with snow landing behind you inside.

Correct me if I’m wrong, but extending the emitter’s fixed bounds should prevent that, no?

I could always lower the spawn rate… or increase the kill rate if performance becomes an issue.

Spitballing with you now, so I’m armed when I inevitably face something like what you mentioned in the future.

You can definitely play with the bounds but that’d require you to change it whenever you come across a different building type, but the core issue of determining when to kill a particle when it’s not being rendered will still occur.

1 Like