Particles Depth Of Field in Unreal Engine

0 like 0 dislike
87 views
Hi Guys! I want to reproduce the example SpatialLayers_NthQuery7 in unreal engine.. I've imported the particle system in unreal engine and it works perfectly, but obviously the Depth of Field is not calculated.. I'm trying to obtain the same result with the DOF present in unreal engine (Post Process FX) but i'm having some problem.. All particles are blurred or all the particles are in focus.. I can't obtain different layers of focus/blur on the same particle system,.. is it normal? it's because is a post process effect?Am i missing something? Thanks a lot in advance!
asked Nov 2, 2017 by simonemilano87 (150 points)

1 Answer

0 like 0 dislike
 
Best answer

I think UE's depth of field for translucent geometry uses the depth of the solid object just behind to compute the DOF effect, so you indeed cannot have the proper result.

But, you could create bokeh manually with PopcornFX, but you'll need to get your hands dirty.
You can take a look at the ReleaseHighlight pack, Particles\v160\BokehScript.pkfx , it used pre-computed bokeh at different depths in a texture, and the script use the view functions to compute the TextureID, Color, and Size of the particles.

answered Nov 6, 2017 by Jordan (14,550 points)
Hi Jordan, thanks for the answer! I think you're right: i've tested various configurations and with translucent materials the compute of DOF in UE depends on what you've behind the particle system.. If i change the material in opaque mode instead the DOF is computed properly, but the particle system looks not very nice.
Your solution seems very interesting! I don't care if it's complex.. I want to obtain a good looking particle system (in your engine looks very beautiful)! I'll update you with the result! Thanks a lot!
You're welcome. I'm marking it as best answer to close the question, don't hesitate to create a new one if you have other questions.
...