Search Unity

Light-Affected Particles

Discussion in 'General Graphics' started by mittense, Mar 17, 2015.

  1. mittense

    mittense

    Joined:
    Jul 25, 2013
    Posts:
    168
    It seems like fairly old tech for Unity to not support particle lighting, but that... seems to be the case? Am I just missing something or does it not support lights affecting particle color?

    (If it doesn't support it, is there anything on the asset store that would replicate the behavior?)
     
    ThermalFusion likes this.
  2. varfare

    varfare

    Joined:
    Feb 12, 2013
    Posts:
    227
    They do not react to lighting. I am currently working on set of shaders which accept ambient light and one, strongest affecting light correctly. They support self-shadowing and shadowcasting but they don't receive shadows (because Unity does not have transparent shadow receivers). Stay tuned.
     
  3. mittense

    mittense

    Joined:
    Jul 25, 2013
    Posts:
    168
    If you ever want any testing... :]
     
  4. mittense

    mittense

    Joined:
    Jul 25, 2013
    Posts:
    168
  5. varfare

    varfare

    Joined:
    Feb 12, 2013
    Posts:
    227
    So I have created this sample scene to show off my product. You may check it out. Feedback is always welcome :)
    http://goo.gl/6S3zO9
     
    Last edited: Mar 17, 2015
  6. mittense

    mittense

    Joined:
    Jul 25, 2013
    Posts:
    168
    Looking good! I'll expect it on the asset store tomorrow. :D
     
  7. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,792
    They do if you use them with a shader that supports lighting (for example, vertex-lit blended works, but you could even use the standard shader etc).
     
  8. varfare

    varfare

    Joined:
    Feb 12, 2013
    Posts:
    227
    Yea, but using vertex-lit will cause sudden "pop" due to forward rendering pass nature.
     
  9. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,792
    Use the standard shader then. Or write your own. In short, it's not a feature that's missing from unity. It's just that the default shader that doesn't support lighting.

    (also, I'm not sure what you mean by "pop", I'm not seeing it, but I'll take your word for it)
     
  10. mittense

    mittense

    Joined:
    Jul 25, 2013
    Posts:
    168
    I'd say it's a feature missing from unity with other engines specifically call it out as a feature they support.
     
  11. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,792
    I got it now, you meant that "soft particles" doesn't work with the vertex lit ones, right? Then yes you are right.
     
  12. IronDuke

    IronDuke

    Joined:
    May 13, 2014
    Posts:
    132
    2x votes. This would be a very cool thing to have!

    --IronDuke
     
  13. ctp

    ctp

    Joined:
    Apr 21, 2013
    Posts:
    9
    The link doesn't seem valid anymore. How are the shaders coming along? Looking forward to seeing them on the Asset Store.
     
  14. ctp

    ctp

    Joined:
    Apr 21, 2013
    Posts:
    9
    Although the Standard shader allows particles to be affected by direct lights and ambient light (but not point lights, and still doesn't allow particles to receive shadows), it sadly seems that it doesn't respect the "color over lifetime" feature, used to fade particles in/out at birth/death. A quite crucial feature!
     
  15. varfare

    varfare

    Joined:
    Feb 12, 2013
    Posts:
    227
    Sorry. Old link is not active. New link to webplayer with working lit particles:
    https://f7b68234c0a29922610b35d8270...wBSLUWrntTbcDRldm5GRmpnT2c/30032015_2254.html

    I am hardly working on getting everythig as polished as possible. I also found a way to receive lightning from all lights, not only directional light. Unfortunately it is not possible for me to create lit particles accepting shadows from other object as Unity does not have built-in transparent-shadow receiver solution. Creating my own would be an overkill.
     
  16. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,686
  17. varfare

    varfare

    Joined:
    Feb 12, 2013
    Posts:
    227
    Not really. From what I can see CORE Framework does not have transparent shadow receiving shaders. I've read a post by Aras (Unity Dev) where he mentions that Unity 5 will get transparent shadow receivers somewhere in post 5.0 release cycle.
     
  18. ctp

    ctp

    Joined:
    Apr 21, 2013
    Posts:
    9
  19. ArchVizPRO

    ArchVizPRO

    Joined:
    Apr 27, 2014
    Posts:
    457
    Wonderful! Any ETA for Asset Store ?
     
  20. varfare

    varfare

    Joined:
    Feb 12, 2013
    Posts:
    227
    I can't say for sure but it should appear on the asset store this month. I am currently testing which version of Unity 4 supports my shaders. I have already tested them with Unity 5 and they are working like a charm.
     
  21. varfare

    varfare

    Joined:
    Feb 12, 2013
    Posts:
    227
  22. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,686
    Just to be clear, you are talking about more than simply turning off shadows in the Renderer portion of the particle system? Or is that all you need to do?
     
  23. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,686
    When you click on your particle system and view it in the inspector you should see something like this:



    Go to the part at the bottom titled "Renderer" and click on it to expand ...



    And make the necessary changes.