Sign in to follow this  
DJousto

particles and light

Recommended Posts

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.