[Bug?] Particle does not occlude fast enough when quickly turning camera

I have a particle with Fixed Bounding Box, and Occlusion set to CustomBounds (same values as fixed bounding box), along with a material applied to it with Disable Depth Test enabled. It is otherwise a very simple particle, just one sprite.

This setup results in something alike the Unreal Engine 1 coronas and works great. It renders flares on top of lamps, and has the flare extend over nearby geometry so it feels like it glows.

However when quickly turning the camera around (in particular up and down) I can see the coronas through the walls for very brief periods of time. The occluder seems to be slightly delayed and needs about half a second to catch up with occluding the correct particles. This makes my entire setup worthless.

I tried various seemingly related settings but nothing helps. Is there any way I can force it to handle its occlusion better? Any fixes possible from your end?

Alternatively, is there a proper lensflare system planned like UE3? The automated lensflares offer very little control, and will very quickly look old once they appear in every UE4 game.

You’re seeing this because our occlusion system is always one frame behind what you see. The reason is that we render the bounding box of the primitive against the scene and then ask the GPU if it would have rendered any pixels for it. Obviously that means we are always using occlusion information from the previous frame.

So what you’re seeing here is this:

  1. The emitter is offscreen. It fails the frustum check and so we do not render it.
  2. Next frame, the emitter is on-screen. We don’t have occlusion information so we assume it needs to render. We draw it an issue an occlusion query.
  3. The next frame, we get the occlusion query result back and see that it is occluded and no longer render it.

We don’t have any plans right now to add a lens flare system like that in UE3.

Hi Sjoerd,

Thank you for your report. I am attempting to reproduce this issue on my machine, but would like a few more details. Could you provide a screenshot of your scene, so that I can see the placement of the particle in the level? Make sure to include an image with “show bounds” turned on in the viewport.

With lens flares, what is not available for you in UE4 that was in UE3? Is there a specific function that you would like to see changed or added? I would be happy to further assist with this or create a feature request if needed.

Thank you,

Alexander

Hi,

Lensflare wise, the entire UE3 system is missing and is what I am after. Alternatively I’d be happy with the basic UE1 system also.
As far as I can see, the only thing I can do in UE4 is to use post processing for lensflare? But that limits me greatly in terms of shape, size, location, etc.
Lensflares like for example this on, top right in the tower: http://www.ps3news.de/wp-content/gallery/unreal-tournament---24072007/19.jpg
Would be impossible to do I believe right now. That is very limiting for me.

That is why I tried to hack together my own, which works somewhat if it weren’t for the mentioned possible bug.