How could I achieve somewhat accurate shadows on billboard particles? Unreal

I’ve got a pretty simple smoke shader atm which I’d like shadows to be able to be cast onto, Kind of like what you get on volumetric fog except on billboard particles.

Here’s a quick drawover of what it currently looks like, and what i’d like it to look like.
There is the sky directional light being occluded by a wall offscreen. The smoke FX is halfway in shadow, half in light.

  1. Is something like this possible to do?
  2. How would I go about finding info on how to achieve this?
  3. Is there another way to achieve this effect without true volumetric fog?

At the moment, i’d like for the effect to just be based of the shadows cast by the main directional light in the level, and it doesn’t need cast a complex shape onto the billboard particles, though control over how soft the shadows edge would be cool.

Hey,
It’s my first post, I decided to finally create account here.
You can try to make a 6 point lighting spritesheet, with proper setup you will achive something like that:
It is something extra complex? No. But definitelly it takes more instructions. Of course you can tweak the effect to avoid horrible overdraw effect or even go with some custom dither node. So with masked shading it would be more performant.
ezgif.com-optimize (1)

3 Likes

Thank you for the response - This kind of set up looks really cool.
From what i’ve read, I do believe that 6 point or even 4 point lighting might be excessive for the use case that I have, but it seems like a skill and pipeline that I should have under my belt.

1 Like

You could import VDB simulation but it would be too heavy for casual use inside the engine. On the forum, there are a lot of talented people like Neil, Bruno, and Simon. They might have enough of knowledge how to prepare different (maybe lighter) setups. Maybe by using custom modules in the particle system. Unfortunately I don’t know how to do it that way :slight_smile:

2 Likes

Hello Aaron :slight_smile:
I think if you want to make shadows on the Billboards I think as Blazej said you can use 6 points and use the Green Channel for light here is Simon Schreibt GDC

another way to smoke If you use Unreal Niagara fluids they will be heavy and cast a shadow

1 Like

That’s right. Niagara fluids are too heavy, good to know how it works but definitely try to avoid it in classic projects.

2 Likes

If you’re using Unreal, the simplest solution is to tick the “Generate Spherical Normals”. That will give you a very Basic particle Lighting.

image

Note though, that Directional lighting has to be enable for this to work.

image

Alternatively you could plug a very basic normal map into your Shader, once Directional lighting is enabled. Something like this as an example.
image

Hope this helps! :+1:

1 Like

OH that’s an interesting approach, thanks!

stripysniper’s solution is probably the fastest and easiest. Make sure your material is set to Default Lit for lighting, change lighting mode to Volumetric Directional, include a normal map or turn on Generate Spherical Particle Normals, make sure you have something going into Base Color that isn’t too dark value-wise.

Now I don’t know if this has been fixed in newer versions of Unreal, but there used to be an issue with Spherical Particle Normals that if your particle sprites were non-uniform/rectangular, it would cause bad shadow results on your particles. Not sure if that’s still the case, but keep it in mind with a grain of salt