UE4 particle normals

Hey guys,

Do you know how can I set normals for GPU particle emitters?
In ideal how to keep UV position from emittion surface.

But currect big issue that particles (all of them) changing color depend on camera position, looks like shading is something like N = Camera vector. I want to eliminate brightness changing and keep it more stable.

Thanks!

Sorry for late reply…

A couple of things, first… why this happens.

By default, particles are not camera facing, they are inverse camera vector parallel. So as you look around, the orientation of each particle is changing. The defualt material mode for particles… “Volumetric Directional”, with no normal passed into it… gives you stright normals pointing parallel to the camera vector. So if you are looking right into the sun… All particles are facing, opposite sun. If you look opposite sun, the particles normals will be pointing directly at it, and will be their brightest.

A few things you can do.

  1. Change the material to “volumetric non-directional”. They will no longer have normals and just take the average incoming light from the spherical harmonics. Now, no matter where you move, or which direction you look… the particles will stay a constant brightness. Tradeoff… you no longer get a normal map.

  2. Leave the material Volumetric Directional, but tune the Translucency -> “Directional Lighting Intensity” number to more or less lerp between “normal based” vs. “all directional” lighting contribution. Doesn’t solve the problem, but gets you some of both approaches and is a semi counter to the tradeof of approach 1.

  3. Change your particles Screen Alignment from PSA Square to PSA Facing Camera Position. It changes the particle from “Inverse Camera Vector Parallel” to “Camera Facing”. Now… as you look around, your particle no longer change orientation, and will therefore have stable lighting. But they will change as you move around. This is generally the fix for very large, distant particles… like clouds, where motion parallax is minimal.

  4. Setup normals that are independant of the particles verts/positions/facing. There can be some math tricks passed into the normals of a vert. For example, a normalized subtraction of the emitter position from the particle position, in world space. Will give you a general… “which direction has the particle moved, compared to the emitter” as the normal. It is particle orientation independant, it will light the particles (compared to the emitter center) that are toward the sun brighter, and away from the sun darker.

There isn’t really a direct fix to your problem, as we’re not doing (yet) the thing that would be the proper fix… volumetric raymarched rendering. Video cards are just not able to handle that in large quantities yet. Give it another 15 year, and we will be. Short of that, we are using approximations, none of which are quite right, but for any given case… there’s probably a best set of options that will get you close enough.

What is your case? That might help inform the solution. Though, this question is a few years old now.