Search Unity

Light Beams

Discussion in 'Assets and Asset Store' started by username_unity_of_my, Dec 2, 2015.

  1. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    Hello

    I released small, performance cheap light beams shader pack.
    Use them for light shafts / beams or laser beams or else.
    You can control fading distance and light shaft intensity and softness.
    Also you can combine it with script which prevents wall penetrations.

    Asset Store Page: LINK

    Videos:





    Few pictures.






    Thank you.
     
    Last edited: Jan 17, 2016
  2. shkar-noori

    shkar-noori

    Joined:
    Jun 10, 2013
    Posts:
    833
    and where can we get this?
     
  3. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    You can get it at: LINK
    ( and edited first post )
     
    Last edited: Dec 3, 2015
    shkar-noori likes this.
  4. Gametyme

    Gametyme

    Joined:
    May 7, 2014
    Posts:
    618
    How performance on mobile?
     
  5. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    Well, its transparent shader so it has its dificulties. Its not using lighting though.
    I uploaded .apk package on dropbox so you can check for yourself:
    Dropbox Link
     
    Last edited: Jan 17, 2016
  6. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    Here is another video with setup tutorial
    And I updated to new version with some improvements.



    [And edited first post]
     
    Last edited: Jan 17, 2016
  7. khos85

    khos85

    Joined:
    Jul 21, 2013
    Posts:
    541
    Hi, I am interested in this asset, I'd like to ask a question first if that is ok: If there is an object blocking the volume light/beam will the light stop or pass through the object? Will this true/false also if the object only is partialy blocking the light beam?
     
  8. khos85

    khos85

    Joined:
    Jul 21, 2013
    Posts:
    541
    Apologies also, to ask will this work the now older unity 4.6?
     
  9. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    There is a script in the package which prevents passing through blocking objects.
    Its not working for partial blocking ( at least for now. ).
     
  10. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    I'll get back to you on this.
     
  11. khos85

    khos85

    Joined:
    Jul 21, 2013
    Posts:
    541
    Thanks for your reply, I'd like to use this for a car's headlights, so lampoles etc could be passing in front of the lights, I'm hoping or partial blocking, maybe if I bunch your volume lights into one then this could be achievable?
     
  12. khos85

    khos85

    Joined:
    Jul 21, 2013
    Posts:
    541
    Many thanks, much appreciated :)
     
  13. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    Partial blocking on pixel level is in my future update plans, but for now it is how it is :/
     
  14. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    OK, all shaders work.



    Only you'll have to delete all Unity 5 generated stuff, only keep models, shaders, textures and beam control script.
     
    Last edited: Jan 20, 2016
  15. khos85

    khos85

    Joined:
    Jul 21, 2013
    Posts:
    541
    Awesome, thanks for testing!
     
  16. mkg2w

    mkg2w

    Joined:
    Aug 19, 2013
    Posts:
    54
    We're having a problem with the shaders on Kindle Fire devices.

    Notice the lightbeam from the headlight below, looking patchy with the abrupt gradients.

    Are there suggestions for a fix ?

    patchy_shader.png
     
    Last edited: Sep 14, 2016
  17. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    Can we please continue on private inbox or email.
    What Unity version are you using?
    Kindle Fire is android, yes?
    What graphic API are you using?
    Are the scenes in the package working ok?
    Are you using some post processing effects?
    What rendering path?
     
  18. khos85

    khos85

    Joined:
    Jul 21, 2013
    Posts:
    541
    My 0.2 cents..Hmm, isn't that just a kindle graphics gpu issue, have you tried the game on android, does do the same thee, just wondering.
     
  19. mdpimmersive

    mdpimmersive

    Joined:
    Jun 12, 2017
    Posts:
    1
    I'm getting compiler errors right after importing the asset, in Unity 5.6.1f1. For example:

    Assets/_LightBeams/Standard Assets/ParticleSystems/Scripts/WaterHoseParticles.cs(41,48): error CS0619: `UnityEngine.ParticleCollisionEvent.collider' is obsolete: `collider property is deprecated. Use colliderComponent instead, which supports Collider and Collider2D components.'
     
  20. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    That is standard assets incompatibility errors between multiple versions. I'll remove standard assets folder and submit update.
    Until I update you can use standard assets from your version of unity or remove scripts which are not in use ( like waterhose script in error message) or fix errors.
     
  21. ericmarodon

    ericmarodon

    Joined:
    May 23, 2017
    Posts:
    2
    Hi, I just bought your asset. as I needed a "light" volumetric effect. It's very nice from the sides, but disappears when viewed upfront. Is there a workaround for that? Thanks.
     
  22. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    That may happen when light beam is narrow and looked upfront, yes. You can widen the beam to fix this.
     
  23. Meltdown

    Meltdown

    Joined:
    Oct 13, 2010
    Posts:
    5,822
    Hello, does this work on Windows Store and WebGL builds?
     
  24. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    Yes, here is mobile ( android build ) example DROPBOX LINK.
     
    Last edited: Jan 28, 2019
  25. BradleyHean1

    BradleyHean1

    Joined:
    Apr 27, 2015
    Posts:
    4
    Hi, does this still work in 2018.3 ?
     
  26. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    Yes, it does
     
  27. pdinklag

    pdinklag

    Joined:
    Jan 24, 2017
    Posts:
    154
    Thanks for this, working fine in 2019.1! :)

    What I'm wondering: Why is "HideInInspector" set on the shader's Color property? What's the intended way of setting the color and is there any problem with removing that attribute and editing it right in the Inspector?
     
  28. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    Because there is custom inspector editor which displays HDR colors.
     
  29. Trueboy1992

    Trueboy1992

    Joined:
    Jun 21, 2020
    Posts:
    3
    is it also possible in unity 4.5.4 ? have already chewed the asset but it doesn't work and the shaders are pink even if I add a material Lg


    undeclared identifier 'UnityObjectToClipPos'
     
    Last edited: Jul 18, 2020
  30. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    Unity 4.5.4? Oh boy!
    I think you need to replace 'UnityObjectToClipPos' with manual calculating of clip space ( or equivalent function from that old Unity version )
     
    Trueboy1992 likes this.
  31. Trueboy1992

    Trueboy1992

    Joined:
    Jun 21, 2020
    Posts:
    3
    I use the old version because I can handle javascript very well so far. i have now also tried with 4.6.1f1 the shader swork still does not work :-( I made it as described above deleted everything that is for the unity5.
     
  32. username_unity_of_my

    username_unity_of_my

    Joined:
    Feb 24, 2015
    Posts:
    330
    Vertex shader for light beams is same as most vertex shaders - it does nothing special.
    It just transforms position.
    Try to replace 'UnityObjectToClipPos' with
    'mul (UNITY_MATRIX_MVP, In.pos);'
     
    Trueboy1992 likes this.
  33. Trueboy1992

    Trueboy1992

    Joined:
    Jun 21, 2020
    Posts:
    3
    Thank you I'll try :)
     
  34. raccoontang

    raccoontang

    Joined:
    Dec 1, 2021
    Posts:
    1
    Hi, I bought this asset today. How can I use this in URP? It looks just so pink..! Please help