Particles Lighting

Hi !
Has anyone tried to use the HL2 basis to light particles ? Is it worth the work (dev and design work of textures ?)
Docs:
http://www.valvesoftware.com/publications/2004/GDC2004_Half-Life2_Shading.pdf

I’m working on a particles engine supporting a gbuffer (deferred or pbr) to light them, vertex lighting is fast but gives poor results with high frequency particles…

ah that looks very interesting. Probably worth it, it’s not that much work compared to vertex lighting, since it’s just slight modifications of the vertex shader and using the new results in pixel shader

From what I understood, the normalmap must be converted to the HL2 basis too or results will be incorrect (slide 12 in the first document). :frowning:
I may create an app to convert textures to this basis if I go with this.

So if I’m right, I have to rotate the 3 vectors with the billboard to “face” the camera (like they show in the 2nd doc, slide 9), and project thanks to 3 dot products in the vertexshader.
Then again 3 dot products in the pixelshader with the normalmap to be in the same space and voilà ? :slight_smile:

They use half instead of float. I’ll compare both to see if any speed or quality loss is visible.

I wonder what algorithm is used in UE4 to light particles systems like smoke.

They have different methods, it can use vertex shading as well (pretty bad then). The default for lit seems to create a volume texture which contains light information around the particles and blend between the samples.

EDIT:
this may be of interest
https://software.intel.com/en-us/articles/sparse-procedural-volumetric-rendering

What about unreal there is unreal engine stream’s with devs on youtube, how they done something and so on…

Well, there are so many vids about particles it is hard to find the one where devs talk how they did their particles engine.
I just implicitly asked if anyone had read something about it and knew if they used a simple method or advanced one.

@kosmonautgames : this seems promising :slight_smile: but voxels without computeshaders is a waste of time for me, not fast enough.