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.
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.
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!
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.
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.
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.