Search Unity

Volumetric Light Beam - Volumetric Lighting solution compatible with Mobile, VR and WebGL

Discussion in 'Assets and Asset Store' started by techsalad, Oct 9, 2017.

  1. aleksandarpopovic

    aleksandarpopovic

    Joined:
    Jun 1, 2018
    Posts:
    3
    First of all thank you for making this great asset.

    I have a problem with moving light... if you set 3d noise speed 0 the noise become static, but if you move a light noise seems to move... is there a way to make 3d noise move with light? so it stays static even if the light moves?
     
  2. techsalad

    techsalad

    Joined:
    Oct 9, 2017
    Posts:
    208
    Hi and thanks.
    You are right, when you move the beam, the noise effect seems to moved too because it's static in world space. But I could definitely add an option to make it static in local space so it will look like you expect.
    TS
     
    aleksandarpopovic likes this.
  3. aleksandarpopovic

    aleksandarpopovic

    Joined:
    Jun 1, 2018
    Posts:
    3
    please if you can :)

    I've tried to calculate velocity of object and than control the velocity vector of noise to invert of velocity and it works but it's jittery
     
    techsalad likes this.
  4. techsalad

    techsalad

    Joined:
    Oct 9, 2017
    Posts:
    208
    Hi,
    I made a prototype of this feature. I can send it to you so could give it a try and give me some feedback. Please send an email.
    Thanks
    TS
     
    Lars-Steenhoff likes this.
  5. aleksandarpopovic

    aleksandarpopovic

    Joined:
    Jun 1, 2018
    Posts:
    3
    Thank you very much, I've sent you my email on PM, I'll try it out and post results :)
     
  6. DHARMAKAYA

    DHARMAKAYA

    Joined:
    Dec 1, 2014
    Posts:
    56
    Hi,

    Is that functioning on android, such as gear vr? BEEN WAITING MORE THAN A YEAR since a Unity employee pretending to be a programmer promised post processing stack v2 support for single pass stereo mode. And yes, he promised it would have been done a year ago or so, but that's what Unity gets for importing cheaper, low quality, lying employees from india.
     
    Endi24 likes this.
  7. techsalad

    techsalad

    Joined:
    Oct 9, 2017
    Posts:
    208
    Unfortunately it's still not fixed by the Unity team. Here is the issue I reported, which is still active: https://issuetracker.unity3d.com/is...th-vr-single-pass-sampling-cameradepthtexture
     
  8. DHARMAKAYA

    DHARMAKAYA

    Joined:
    Dec 1, 2014
    Posts:
    56
    There is a long complaint thread about this on github since 2016 or so I think.
     
  9. DHARMAKAYA

    DHARMAKAYA

    Joined:
    Dec 1, 2014
    Posts:
    56
  10. KamiKaze425

    KamiKaze425

    Joined:
    Nov 20, 2012
    Posts:
    205
    trying to use this plugin with the Oculus Quest. I'm using just the center anchor camera. For some reason, the volumetric light only shows up on one eye. Any ideas?
    I'm using Single Pass. Unity 2019.1.3f1
     
  11. techsalad

    techsalad

    Joined:
    Oct 9, 2017
    Posts:
    208
    Hi and thanks for your message.

    Which "Stereo Rendering Method" are you using?
    Screenshot_19.png

    Because it's a known issue of Unity: The depth sampling is broken for the right eye when Single Pass stereo mode is enabled on Android.
    More info here.
    Let me know.
    Thanks
     
  12. KamiKaze425

    KamiKaze425

    Joined:
    Nov 20, 2012
    Posts:
    205
    That solved it. Thanks! I didn't notice that in the trouble shooting section.
    Yeah I was Oculus, Android, Single Pass. I set the opaque geometry to 0 since keeping single pass is important.
     
  13. techsalad

    techsalad

    Joined:
    Oct 9, 2017
    Posts:
    208
    Glad it worked, thanks for the feedback!
    Don't forget to add your vote to the Unity issue tracker, maybe it will be fixed someday... (and a review on the asset store if you like the asset :)).
    Thanks!
     
    jashan likes this.
  14. afshinunity

    afshinunity

    Joined:
    Apr 26, 2015
    Posts:
    18
    We really appreciate your understanding of the performance. Do what is better on performance side.;)
    but you promised us 2 years ago about supporting rectangle shape to simulate volumetric area lights like windows etc. seriously when can we achieve this?
    also i just figured it out that i can't achieve "fading out beams according to the camera's distance" based your documentation. Have you deleted this feature?:eek:
     
    Last edited: Jul 23, 2019
  15. techsalad

    techsalad

    Joined:
    Oct 9, 2017
    Posts:
    208
    Hi :)
    Regarding the "rectangle shape" feature, I feed quite bad about mentioning it so early without being able to release it yet. Since the time I created this video, SRP happened unfortunately (for me!)... and supporting it is quite a nightmare: because it's still an experimental feature, it requires a lot of testing, bug fixes and time. Anyway, I can send you an early version of the rectangle shape feature if you want to give it a try.
    Regarding the feature "fading out beams according to the camera's distance", it's has been released in version 1.64: it's called fade out.
    Thanks
    TS
     
  16. AutoRotate

    AutoRotate

    Joined:
    Aug 1, 2014
    Posts:
    129
    Hi,

    Any idea why I keep getting this message? It seem to be random. I am on 2019.12, but it was happening since 2019.7 (just been ignoring it since it was not breaking the game and only shows up in the Editor)

    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. UnityEditor.GameObjectInspector.ClearPreviewCache () (at C:/buildslave/unity/build/Editor/Mono/Inspector/GameObjectInspector.cs:211)
    3. UnityEditor.GameObjectInspector.OnDisable () (at C:/buildslave/unity/build/Editor/Mono/Inspector/GameObjectInspector.cs:199)
    4. UnityEditor.AssetDatabase:DeleteAsset(String)
    5. VLB.MaterialKeywordSRP:Delete(Shader) (at Assets/Plugins/VolumetricLightBeam/Scripts/MaterialKeywordSRP.cs:64)
    6. VLB.Config:OnRenderPipelineChanged(RenderPipeline) (at Assets/Plugins/VolumetricLightBeam/Scripts/Config.cs:160)
    7. VLB.Config:OnEnable() (at Assets/Plugins/VolumetricLightBeam/Scripts/Config.cs:242)
    8.  

    Thanks!
     
  17. techsalad

    techsalad

    Joined:
    Oct 9, 2017
    Posts:
    208
    Hi,
    Yes it's a bug I already fixed and the fix will be included in the next version. Please send me an email, I could send you the updated version.
    Thanks
     
  18. Futurristic

    Futurristic

    Joined:
    Jun 21, 2016
    Posts:
    29
    has anyone able to make VL work with LWRP and Arkit? I'm facing issues with it. It's working fine in Android but in iOS it doesn't show up. thx
     
  19. techsalad

    techsalad

    Joined:
    Oct 9, 2017
    Posts:
    208
    Hi,
    last time I tried on my iOS device, I couldn't reproduce the issue. Could you please provide me more info about the LWRP package version, the ARKit version and the Unity version you are using?
    Thanks

    EDIT: Just saw you updated your review with this info: ARFoundation preview2 2.1.0, ARKit XR Plugin preview3 2.1.0, LWRP ver 5.13.0, Unity 2019.1.0f2. I will try with this setup. Thanks
     
    Last edited: Jul 31, 2019
  20. Futurristic

    Futurristic

    Joined:
    Jun 21, 2016
    Posts:
    29
    k thx.
     
  21. Futurristic

    Futurristic

    Joined:
    Jun 21, 2016
    Posts:
    29
    How soon you would be able to check and confirm?. As I'hv some demo lined up for my product so need to resolve this quickly. thx
     
  22. techsalad

    techsalad

    Joined:
    Oct 9, 2017
    Posts:
    208
    Hey,

    I should be able to test next week (I am usually able to check issues reported by users much quicker, but iOS is another story...). But I can't guarantee I will be able to reproduce it, since last time I tried I didn't manage to. On which iOS device do you have the issue btw?

    In the meantime, maybe could you give a try to the freshly released version 1.72 of the plugin, since I fixed a bug related to SRP in it.

    Otherwise, have you tried to disable the soft blending with opaque geometry (set it to 0)? It usually helps since getting access to the depth buffer is a regular problem:
    http://saladgamer.com/vlb-doc/comp-lightbeam/#opaque-geometry

    Thanks
     
    Last edited: Aug 2, 2019
  23. Futurristic

    Futurristic

    Joined:
    Jun 21, 2016
    Posts:
    29
    ------

    Devices tested on - Iphone X, iphone 6s , ipad
    yes, I tried with version 1.72 but it didn't work. Also, I tried - disable the soft blending with opaque geometry (set it to 0), this also doesn't work. Can you take a look at it on priority as my whole module is on hold because of this issue? thx
     
  24. techsalad

    techsalad

    Joined:
    Oct 9, 2017
    Posts:
    208
    Hey,
    Thanks for the info. So I spent a couple of days testing various combinations. The closer I could get to your setup was using Unity 2019.1.13f1, LWRP 5.13.0, ARKit XR Plugin 2.1.1. I ran a test project on my only ARKit compatible device which is an iPhone 5 SE with iOS 12.4. But still couldn't reproduce the issue... So I think there is only 2 options: either I am not testing with the proper iOS device, or there is something in your project which makes the plugin buggy.
    I will look to buy a more recent iPhone to be able to test with more different devices. In the meantime, do you think it would be possible to send me your project (or a subset of it which highlight the issue you are encountering), so I could test with the exact same data?
    Thank you very much.
    TS
     
  25. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    225
    Hi @techsalad -- I had a problem recently whereby my UI masks glitch out when under a beam. Is this a known issue, or is there a quick fix? I've not dug too far into yet, thought I'd ask first. Bearing in mind I'm still running the test version you sent me a while back that supports the square shaped beams.

    // WildStyle
     
  26. techsalad

    techsalad

    Joined:
    Oct 9, 2017
    Posts:
    208
    Hi,
    No it's not a known issue, but I haven't particularly tested with UI masks. Thanks for the report I will give it a try and let you know.
    Thanks
     
    WildStyle69 likes this.
  27. Futurristic

    Futurristic

    Joined:
    Jun 21, 2016
    Posts:
    29
    thx for a quick reply. My project (subset) is quite big to send; would it be possible for you to share your test project so that I can see the settings at my end replicate the same in my project. best,
     
  28. techsalad

    techsalad

    Joined:
    Oct 9, 2017
    Posts:
    208
    Hi,
    I think I found the issue which should be very specific with the version of the plugin you are using. In this version, I use the stencil buffer a lot, and the UI masks use it too. So depending on the depth of the UI masks hierarchy you have set, it might clash with the stencil ID range used for the beams. By default the range is between 5 and 255, but it can be changed in the config file. Try to increase the min bound (for example between 20 and 255).
    Screen Shot 2019-08-09 at 19.51.29.png

    Please let me know if it helps.
    Thanks
     
    WildStyle69 likes this.
  29. WildStyle69

    WildStyle69

    Joined:
    Jul 20, 2016
    Posts:
    225
    This makes sense, thanks for great support.. appreciated.

    // WildStyle
     
    techsalad likes this.
  30. Nyanpas

    Nyanpas

    Joined:
    Dec 29, 2016
    Posts:
    50
    Is it possible to just have the shaft without using the light component? All I am interested in is to be able to use the shaft itself and through shader magic use that to fake lighting.
     
  31. techsalad

    techsalad

    Joined:
    Oct 9, 2017
    Posts:
    208
    Hi,
    Yes of course, having a light component is not mandatory. You can simply add a VolumetricLightBeam component to any GameObject, with or without Light. More info here: http://saladgamer.com/vlb-doc/#create-your-first-light-beam
    Thanks