Search Unity

How can I make particles receive light? (Not HDRP or LWRP)

Discussion in 'General Graphics' started by Reverend-Speed, Aug 24, 2019.

  1. Reverend-Speed

    Reverend-Speed

    Joined:
    Mar 28, 2011
    Posts:
    284
    Hey folks. Working on a VR project (forward render) where it would be useful to perceive light being cast over the player's shoulder and onto smoke particles in front of the player.

    I'm running into trouble getting this to work with Shuriken - I'm playing around with the Renderer and Light settings, but nothing seems to be getting me close to my target (I can't even seem to get the particles to cast shadows!).



    Can anybody suggest a solution? Many thanks in advance.
     
  2. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    What shader are you using?
     
  3. Reverend-Speed

    Reverend-Speed

    Joined:
    Mar 28, 2011
    Posts:
    284
    Hi @richardkettlewell, thank you for taking a look at this.

    When I first posted I was using the default particle material provided by a new Particle System, therefore 'Standard Unlit'. =/ Sorry for wasting your time there, and thank you for pointing me in the right direction. I was hoping you might answer some more related questions, however?

    The project colour space is set to Linear.

    upload_2019-8-26_21-22-11.png

    upload_2019-8-26_21-33-14.png

    I've chosen an additive shader with relatively low smoothness and this seems to help pick out a slightly tighter area of particles for display - however, I'm running into a couple of problems. (I have turned off all other scene lighting other than these lamps for the example (turned off skybox ambient lighting etc).

    1) It seems difficult if not impossible to cast a tight cone of light onto a specific piece of particle fog.

    2) When the light reaches a certain distance from the particle column, the lighting just... snaps off. (see second light to the right in the Scene view, which is not contributing ANY light to the column). This is fairly distracting and I'd like to avoid this binary effect, if possible.

    I was thinking this might have to do with the limitations of forward realtime rendering, but I've just realised that that would be if more than three lights were hitting a single billboard. So I guess I'm confused again.

    3) With the system for the Particle System set to receive shadows and the lights set to cast hard shadows, there are no shadows to be seen. These aren't vital to the project, but I'm unsure of why I can't see them.

    Leaving aside jokes about 'shining some light on the topic' and 'illumination', I could really use some help here. Thank you in advance...!

    --Rev
     
  4. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    1) the light contribution is quite approximate in order to be fast. Sharp edges on cone lights etc will be lost. You could use your own custom lit shader to get around this, eg something more like the regular Standard Shader with Vertex color Support if you need it.

    2) perhaps Light Probe Proxy Volumes could help with this. Worth prototyping it if you haven’t already (google for docs pages)

    3) Transparent objects cannot receive shadows in the built in renderer. HDRP and friends maybe have something for this. maybe :)
     
  5. Reverend-Speed

    Reverend-Speed

    Joined:
    Mar 28, 2011
    Posts:
    284
    1) Boo but I understand the reasoning. Will investigate the custom shader, time permitting.

    2) Light Probe Proxy Volumes - Wilco! This looks interesting, thank you!

    3) Understood! Not a critical issue, good to know.

    Thank you so much for your responses. Have a wonderful day!
     
    richardkettlewell likes this.