DJousto Posted March 17, 2016 Share Posted March 17, 2016 Hi, I wonder if particles can interact with light ? I've read that particles are 2D and so have no normals and no specular or diffuse light, am i right ? for example if I want to represent snow that is falling under a street light, or the lights of a car, how can I do ? Have I to write a specific shader ? Thanks Quote Link to comment Share on other sites More sharing options...
jerome Posted March 17, 2016 Share Posted March 17, 2016 Yep, standard particles aren't affected by the light. You can either write your own shader, either use a Solid Particle System (SPS) what can handle as well 2D or solid shapes : http://doc.babylonjs.com/overviews/Solid_Particle_System The SPS is a standard BJS mesh, so it's impacted by light reflection, you can texture it, etc. Quote Link to comment Share on other sites More sharing options...
DJousto Posted March 17, 2016 Author Share Posted March 17, 2016 thanks, i'll test SPS, if ever I had performance issue i'll try to write a shader. here is my snow without light for the moment http://www.babylonjs-playground.com/#1GQNGL#0 Pryme8 and iiceman 2 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted March 17, 2016 Share Posted March 17, 2016 Couldn't he use godrays and particles? I might be wrong but I thought godrays can be broken up by mesh particles. Quote Link to comment Share on other sites More sharing options...
jerome Posted March 17, 2016 Share Posted March 17, 2016 waaaoww nice snow 15000 is a big amount, maybe you could reduce it knowing that only the visible particles matter : so compute and display less particles but handle their positions so this lower bulk is always visible... just an idea Quote Link to comment Share on other sites More sharing options...
Dad72 Posted March 17, 2016 Share Posted March 17, 2016 Your snow scene is cool. but the fps was 45 The fps should be better here : (60fps) http://www.babylonjs-playground.com/#1GQNGL#1 RaananW, eboo, NasimiAsl and 1 other 4 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted March 17, 2016 Share Posted March 17, 2016 Love it! I could see myself using this in several settings. Quote Link to comment Share on other sites More sharing options...
DJousto Posted March 18, 2016 Author Share Posted March 18, 2016 thanks for all this snow, I didn't see much this winter i'll post my snowing scene in some days Quote Link to comment Share on other sites More sharing options...
iiceman Posted March 18, 2016 Share Posted March 18, 2016 That looks pretty neat, can't wait to see the SPS version with light! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.