Jump to content
  • Advertisement
Sign in to follow this  
racarate

Particle Lighting 101

This topic is 725 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've never used anything but self-lit particles...  I'm going through this talk here and there a lot of references to lighting the particles to fit the scene:

 

http://www.slideshare.net/guerrillagames/the-production-and-visual-fx-of-killzone-shadow-fall

 

Also, later on they mention baking out the normals from their Houdini smoke sim.

 

I'm curious if there is a simpler place to start with particle lighting.  For example, what is the easiest possible way to make the lighting of particles fit a scene?  Everything I find is either self-lit or way too advanced.  This isn't for a particular project, I'm just trying to learn.  Specifically, I think I am missing the intuition behind how a particle has a normal.

 

 

Nick

 

 

 

Share this post


Link to post
Share on other sites
Advertisement

I would think a particles "faces" all directions at once since it is supposed to be an extremely small....well particle.

 

So if I were lighting a particle from external light sources, I would figure out the strength (color) of the light at the particle point and then apply it to the whole particle.  Blending multiple lights if necessary.

Share this post


Link to post
Share on other sites
The method they use for in that game is simpler than they let on. The normals they baked out are just for the sprites to give them more volume for lighting.

All they did was take sample points from each particle (generated on the CPU logic)and upload them. These sample points are just imaginary vertexes in a sudivided grid based on the particles.

After each light they would sample these points in the lighting phase. And treat them like a normal gbuffer. Though I am not sure what was used to do the particles gbufcwr due to limitations

The simplest method though is to just render each particle via forward. But it's expensive Edited by Tangletail

Share this post


Link to post
Share on other sites

Ok, I have a follow-up question.  Most of what I've found so far is just making up spherical-ish normal maps for the particles.  That seems odd to me, but I'm giving it a shot.  In this paper, this normal mapping of particles (seems to) depend on reprojecting to the so-called HL2 basis:

 

Practical Particle Lighting - Roxlu

 

If I'm understanding basis projection correctly, he is only doing this as a way of summing up the the scene's light.  I could ignore this step and just do regular normal mapping by looping through my analytical lights or looping through my environment cubes, right?  What is the point of this HL2 projection in this case?

Edited by racarate

Share this post


Link to post
Share on other sites

I don't know what HL2 is, I can't find any information on the subject except for Half Life 2.  Mind you that I am shit with abbreviations.

 

The most commons topics a google search gives me is along the lines of a sparse grid representation. So it's likely to do with indirect illumination. 

Edited by Tangletail

Share this post


Link to post
Share on other sites

Sorry, one more quick question.  In the linked article they specify a "quick and dirty" normal map generation formula to simulate a spherical particle:

 

// billboard_normal == -view_direction

half3 n = lerp(billboard_normal, normalize(corner-center), curvature_amount); – 

 

In this example, where would I get the center and corner of my particles?  I am using OpenGL point sprites.  I think they are suggesting to compute this lighting in the vertex shader, so I can't use my knowledge of the final rasterized size (via gl_PointSize) to figure this out.  Any ideas?

 

 

Nick

Edited by racarate

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!