Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

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. mangax

    mangax

    Joined:
    Jul 17, 2013
    Posts:
    334
    am glad to this getting updated, But.. it gives errors in latest unity 2019.3.12f1

    when trying to build project .. it fails with 2 errors says:
    Shader error in 'Hidden/VolumetricLightBeam1Pass': undeclared identifier '_DynamicOcclusionDepthTexture' at Assets/Plugins/VolumetricLightBeam/Resources/Shaders/VolumetricLightBeamShared.cginc(340) (on gles3)

    Shader error in 'Hidden/VolumetricLightBeam1Pass': undeclared identifier '_DynamicOcclusionDepthTexture' at Assets/Plugins/VolumetricLightBeam/Resources/Shaders/VolumetricLightBeamShared.cginc(340) (on vulkan)
     
  2. techsalad

    techsalad

    Joined:
    Oct 9, 2017
    Posts:
    376
    Hum...
    For which platform are you trying to build?
    Are you using the legacy render pipeline, URP or HDRP?

    EDIT:
    I tried to export a PC and Android build with Unity 2019.3.12 and VLB 1.81, but couldn't reproduce the issue.
    Sometimes Unity messes some files when updating assets from the store. Could you please try to reimport the asset to make sure it's clean, by following these steps: http://saladgamer.com/vlb-doc/troubleshooting/#how-to-solve-it

    Thank you
     
    Last edited: May 4, 2020
  3. mangax

    mangax

    Joined:
    Jul 17, 2013
    Posts:
    334
    am using URP.. my target build is android.. am only targering platforms that supports gles3 or vulkan ..

    i am aware of unity's sometimes do glitchy installs.. i deleted the downloaded version from my PC so i can download it again.. still shows same error on build.

    although it just works fine with editor/play mode with no erros or warnings on shaders.. Only at build it gives these errors , and shader shows these messages>>
    unityissue.PNG

    this is my settings.. is there something am doing wrong?
    unityissue2.PNG

    thanks
     
  4. techsalad

    techsalad

    Joined:
    Oct 9, 2017
    Posts:
    376
    Thanks for the info.
    Would it be possible to share your project with me please by PM or email? You can probably delete all the assets except the VLB folder of course. There is probably a specific configuration in the project that I missed and didn’t test that could produce this error.
    Thank you and sorry for the inconvenience.
     
  5. mangax

    mangax

    Joined:
    Jul 17, 2013
    Posts:
    334
    yes, i tried a new project now and it seems it doesn't generate error on build.. am going to investigate this more and let you know what i can find, this is very big project i have.
     
    techsalad likes this.
  6. mangax

    mangax

    Joined:
    Jul 17, 2013
    Posts:
    334
    hi, i tried to clean up my project and remove some old assets.. then i ported the project into a new clean project.. then of course rebuilding library.. upon builing android build.. the build process is not getting inturrupted.. but it still throws error.. this time.. it's a different error:
    Capture.PNG
    failed to open source file: 'Packages/com.unity.render-pipelines.high-definition/Runtime/ShaderLibrary/ShaderVariables.hlsl' Compiling Vertex program with VLB_SRP_API
    Platform defines: UNITY_NO_DXT5nm UNITY_NO_RGBM UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_NO_CUBEMAP_ARRAY UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF3 UNITY_NO_FULL_STANDARD_SHADER SHADER_API_MOBILE UNITY_HARDWARE_TIER1 UNITY_LIGHTMAP_DLDR_ENCODING

    i have no idea why it tries to open up hdrp?? there are no HDRP assets/packages in my project at all.
     
  7. techsalad

    techsalad

    Joined:
    Oct 9, 2017
    Posts:
    376
    Ok thanks. Your previous issue should be related to some data corrupted in the library and simply fixed by library update. I am glad it's gone now!

    Regarding the new error mentioned, it's a known issue on my side. But like you said it doesn't interrupt the builds which are exporting fine with the volumetric beams visible.
    To give you more details, the SRP shader has a part for URP and a part for HDRP. The part for HDRP requires a specific include from the HDRP package. It doesn't make any problem in editor, but generates this error when exporting a build if you don't have the HDRP package installed.
    Having a plugin supporting the legacy render pipeline, the URP and the HDRP is a real pain in the ass because of things like this.
    I will investigate to fix it, but it was honestly not a top priority since it doesn't actually break anything, it's just annoying!
    Sorry for the inconvenience anyway!
    Thanks
     
  8. mangax

    mangax

    Joined:
    Jul 17, 2013
    Posts:
    334
    thanks for insight.. i hope you find a fix for this.
    Not that it's a major issue currently, but who knows if unity in near future would make new update to the engine that halt building because of such an error or like it occures at build time.. Unity indeed stopped me from building before cleaning library.
     
    techsalad likes this.
  9. grimmgames

    grimmgames

    Joined:
    Jan 11, 2011
    Posts:
    50
    Hi. I'm working with a fresh install with a multiseat license and am seeing the following error when attempting to build:

    Error building Player: Shader error in 'Hidden/VolumetricLightBeam1Pass': undeclared identifier '_DynamicOcclusionDepthTexture' at Assets/Plugins/VolumetricLightBeam/Resources/Shaders/VolumetricLightBeamShared.cginc(340) (on d3d11)

    Compiling Vertex program with INSTANCING_ON VLB_GPU_INSTANCING VLB_OCCLUSION_DEPTH_TEXTURE
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_FULL_HDR
     
  10. techsalad

    techsalad

    Joined:
    Oct 9, 2017
    Posts:
    376
    Hi,
    It looks like you are having the same issue than @mangax (see his post just above). Like mentioned, I never managed to reproduce this error and it looks related to file corruption in the library, since rebuilding the library fixes it. Could you please try to close unity, delete the library folder of your project, and reopen it: the library will be fully rebuilt.
    Please let me know how it goes.
    Thanks
     
  11. grimmgames

    grimmgames

    Joined:
    Jan 11, 2011
    Posts:
    50
    Just deleted the library and went through reimporting. Build attempt resulted in the same error.
     
  12. mangax

    mangax

    Joined:
    Jul 17, 2013
    Posts:
    334
    that won't be enough..i tried that alone and it didn't work ..
    i went as far as importing the project into new project template.. then of course it must rebuild a clean new library..
     
    techsalad likes this.
  13. techsalad

    techsalad

    Joined:
    Oct 9, 2017
    Posts:
    376
    Thank you for the feedback. And thanks @mangax for the info.

    Please try to do following steps to properly reimport the plugin: http://saladgamer.com/vlb-doc/troubleshooting/#how-to-solve-it

    If it still doesn't work, do you think it would be possible to share your project with me (by email) so I could have a look please?

    Please let me know
    Thanks
     
  14. grimmgames

    grimmgames

    Joined:
    Jan 11, 2011
    Posts:
    50
    Unfortunately this is a company project that I am unable to share. The errors only happen on the first build attempt and then stop on subsequent builds during the same session. Not a show stopper.
     
    techsalad likes this.
  15. techsalad

    techsalad

    Joined:
    Oct 9, 2017
    Posts:
    376
    Thank you for the feedback.
    I am glad you can make it work. In case you find more info or manage to reproduce this issue in a "shareable" project, feel free to reach me again.
    Thanks
     
  16. zIyaGtVm

    zIyaGtVm

    Joined:
    Dec 27, 2017
    Posts:
    131
    Hi, I’m running the latest version VLB in Unity 2019.3 Universal Render Pipeline.
    I found only some VLBs could be instanced.
    I checked the info on http://saladgamer.com/vlb-doc/optimization/ just can't figure out why they were batched partly.
    They are totally under same configuration, made by "Ctrl+D".
    (No post processing ,No 3D Noise state, NoDynamic Occluding)
    gpuinstancing.png
    Would you please tell me what else can cause the problem? Thanks.
    Btw, will SRP version shader support SRP Batcher in the future?
     
  17. techsalad

    techsalad

    Joined:
    Oct 9, 2017
    Posts:
    376
    Hi,
    Thank you for the feedback.
    That's strange. It might be a limit on the vertex count.
    Would it be possible to share your test project with me by sending me an email so I could try on my side please?
    Regarding SRP batcher that's definitely something I plan to investigate in a future update. AFAK Unity plans to deprecate all other batching solution in favor of the SRP batcher for SRP projects in a near future anyway. Last time I checked it was still in a very experimental stage, and basic features like integration in the editor was still not done, making it very hard to debug.
    Thanks
    TS
     
    Last edited: May 16, 2020
  18. zIyaGtVm

    zIyaGtVm

    Joined:
    Dec 27, 2017
    Posts:
    131
    I just found the reason is real lighting, there're several pointlights in this scene so that the VLB meshes instancing were interrupted. Is it possible to make them ignore the lights' influence then still batch together?

    light.png

    Wow good news, is there a repository to track the progress?
     

    Attached Files:

    Last edited: May 16, 2020
    techsalad likes this.
  19. techsalad

    techsalad

    Joined:
    Oct 9, 2017
    Posts:
    376
    It might be related to this Unity known issue: http://saladgamer.com/vlb-doc/optimization/#real-time-lighting
    There is a workaround suggested. Please give it a try and let me know if it works.
    Thanks
     
    Last edited: May 16, 2020
    zIyaGtVm likes this.
  20. techsalad

    techsalad

    Joined:
    Oct 9, 2017
    Posts:
    376
    Thanks to your test scene I tried on my side, and the suggested workaround works fine.
    Screenshot_71.png

    It means this batching issue is definitely related to this Unity problem: Unity adds an additive forward drawcall per transparent object overlapped by different realtime lights, and this breaks the batching. So I would encourage you to use the workaround because there is nothing I can do about it since it's a limitation of Unity.

    It's very weird that the frame debugger doesn't give more information about why the batching is broken when using the URP. It gives a way more useful tip with the built-in render pipeline!
    optim_realtime_light_debug.png
     
  21. zIyaGtVm

    zIyaGtVm

    Joined:
    Dec 27, 2017
    Posts:
    131
    That's true, I'm currently using your layermask workaround.
    Where could I find them?
     
    techsalad likes this.
  22. techsalad

    techsalad

    Joined:
    Oct 9, 2017
    Posts:
    376
    I don't remember where I saw this info.
    Regarding when I will add the support of SRP batcher in the plugin, I'll let you know here.
     
    zIyaGtVm likes this.
  23. mangax

    mangax

    Joined:
    Jul 17, 2013
    Posts:
    334
    hi @techsalad , just wanted to inform you that the bug is back again.. i can't make builds..
    all what i did is upgrading unity from version 2019.3.13f to 14f .. and now Unity won't allow me to build.. you gotta solve this man. :(
     
  24. techsalad

    techsalad

    Joined:
    Oct 9, 2017
    Posts:
    376
    I think I found what it is. I'll send you a fix tonight.
     
  25. mangax

    mangax

    Joined:
    Jul 17, 2013
    Posts:
    334
    thanks for the fix, it worked!
     
    techsalad likes this.
  26. techsalad

    techsalad

    Joined:
    Oct 9, 2017
    Posts:
    376
    Last edited: May 26, 2020
    zIyaGtVm and Lars-Steenhoff like this.
  27. Zyblade

    Zyblade

    Joined:
    Jul 1, 2014
    Posts:
    140
    Does anyone else can't get dynamic occlusion to run? Added a screenshot from the demo scene.
    Fresh import. Unity 2019.3.7f1, Win10, gtx1050ti.
    I didn't change anything in the scene, beside the color of the beam for better seeing the problem and moved and scaled the block a little. The Scaling doesn't change anything. Unscaled, the problem also occures.

    edit: seems I looked at the wrong example, just a second
     

    Attached Files:

    Last edited: Jun 13, 2020
  28. techsalad

    techsalad

    Joined:
    Oct 9, 2017
    Posts:
    376
    Hi,
    The Dynamic Occlusion feature is not enabled by default, and is not activated on this beam in the sample scene. To activate it, you have to add either the Dynamic Occlusion (Raycasting) or the Dynamic Occlusion (Depth Buffer) component on your beam. Here is how. And here is the documentation to help you choose between the 2 occlusion techniques.
    Please let me know it it works, and sorry if the documentation wasn't clear enough.
    Thanks
    TS
     
    Zyblade likes this.
  29. Zyblade

    Zyblade

    Joined:
    Jul 1, 2014
    Posts:
    140
    Heh, you replied pretty fast :D I just looked at the wrong example, everything works =)
     
    techsalad likes this.
  30. netpost

    netpost

    Joined:
    May 6, 2018
    Posts:
    388
    @techsalad

    Hi,

    I am using Unity 2019.3.13f1 and importing the volumetric light beam asset does not seem to work in a HDRP project. I haven't find any HDRP installer in the package. Basically, the animation is running but not light beam works and all shaders are pink. I also tried to upgrade all materials to HDRP without succes.

    Any help would be greatly appreciated. Thanks!
     
  31. techsalad

    techsalad

    Joined:
    Oct 9, 2017
    Posts:
    376
    Hi,
    No you don't have to upgrade the materials, the plugin has custom shaders.
    Have you follow these steps http://saladgamer.com/vlb-doc/compatibility/#scriptable-render-pipelines ?
    Basically you have to change the "Render Pipeline" property in the plugin's config.
    Screenshot_1.png

    Thanks
    TS
     
  32. netpost

    netpost

    Joined:
    May 6, 2018
    Posts:
    388
    @techsalad

    Thank you for the quick reply. The info and video link for the tutorial helped a lot. Everything works great now.

    Thanks again.
     
    techsalad likes this.
  33. ash4640

    ash4640

    Joined:
    Jan 19, 2018
    Posts:
    66
    Great tool, have been using it in 2019.3 versions it was fine but just moved my project to LTS.
    Imported and installed Vol Lights in 2019.4.3 after the installation I get this warning, there are 100s of them generated
    - TLS Allocator ALLOC_TEMP_THREAD, underlying allocator ALLOC_TEMP_THREAD has unfreed allocations, size 39082
    is it do with the editor and if so how to fix it
     
  34. techsalad

    techsalad

    Joined:
    Oct 9, 2017
    Posts:
    376
    Thank you for notifying me the issue. Are you sure the errors come from the plug-in? You don't have them if you remove it from your project?
    I'll investigate but I won't be able to give it a try until Tuesday, sorry for the delay.
    Thanks
     
  35. ash4640

    ash4640

    Joined:
    Jan 19, 2018
    Posts:
    66
    Ok let me try just deleting Vol Lights (can dele just the Vol lights folder right? no other scripts or dependencies?) and check, cause as far I remember I keep my console window open when importing assets always to check for any warnings after import assets, just happened to note this after Vol light importing, but will double-check and let you know.
     
    Last edited: Jul 12, 2020
  36. techsalad

    techsalad

    Joined:
    Oct 9, 2017
    Posts:
    376
    Yes you can simply try to delete the folder Assets/Plugins/VolumetricLightBeam.
    If you created a config override, you'll also have the delete the VLBConfigOverride.asset located by default in Assets/Ressources: http://saladgamer.com/vlb-doc/config/
     
  37. EpicMcDude

    EpicMcDude

    Joined:
    Apr 15, 2013
    Posts:
    117
    Hi techsalad,

    I just bought the asset but the particle system doesn't seem to work, I've messed around will sorts of parameters but the particles never show up, could you provide assistance? Even in the Scene view only the outline shows up, but the actual particles are invisible.

    I'm using HDRP Unity 2019.3.15f1.

    Thank you
     
  38. ash4640

    ash4640

    Joined:
    Jan 19, 2018
    Posts:
    66
    Oh ok false alarm :) I did delete the
    Hi I guess it's a false alarm don't bother, after I deleted the Vol Light 2 folder still the error persists. Wondering what is causing it.
    There is not much info that error too on Unity Forums.
    Also I hope Vol Lights is compatible with Aura2, Ambient Skies and Enviro in the project.
     
  39. techsalad

    techsalad

    Joined:
    Oct 9, 2017
    Posts:
    376
    Thank you for notifying me. I never tried to combine the asset with the others, but I don't see why it wouldn't work since Volumetric Light Beam doesn't use complicated features that could go wrong with multiple uses.
     
  40. techsalad

    techsalad

    Joined:
    Oct 9, 2017
    Posts:
    376
    Hi,
    Thank you for your message and sorry for the issue. It's supposed to work fine, I will check on my side, thank you for the info. I won't be able to get back to you until Tuesday night though, sorry for the delay.
    Thanks
     
  41. EpicMcDude

    EpicMcDude

    Joined:
    Apr 15, 2013
    Posts:
    117
    I actually got it working last night, changed the particle material to the HDRP/Lit but it doesn't seem to be working as intended as it only shows up when the camera is really up close to the beam? I also had to put an emissive colour on the material to make the particles visible as they were black.

    If you can let me know if I'm doing something wrong on my part :)

    Thank you
     
  42. techsalad

    techsalad

    Joined:
    Oct 9, 2017
    Posts:
    376
    Thanks for the info. I'll let you know.
     
  43. techsalad

    techsalad

    Joined:
    Oct 9, 2017
    Posts:
    376
    Hi,
    So I tried to setup some beams with the dust particles in a HDRP project, but I didn't manage to reproduce the issue. I used Unity 2019.3.15, and I tried with the HDRP package 7.3.1 and 7.4.1.
    Screenshot_18.png

    FYI, when importing the Volumetric Light Beam package in a HDRP project, the particle material uses the Legacy particle shader:
    Screenshot_17.png

    Which version of the HDRP package are you using?
    Could you please try to create a beam with dust particles in a basic scene to see if it works?
    Thanks
    TS
     
  44. techsalad

    techsalad

    Joined:
    Oct 9, 2017
    Posts:
    376
    Hi guys,

    I am super happy to announce the release of Volumetric Light Beam 1.83.

    This release integrates a complete rewrite of the shaders handling. Before, all the different shaders and variants were shipped in the plugin package. With 1.83, it ships without any shader at all: instead, the proper shader for your configuration is generated in the editor. It has the benefit of generating only the necessary shader variants needed, resulting in faster build export time.
    It also fixes a bunch of annoying shader warnings that would have been nearly impossible to fix without this new approach. The shader variants keywords are now declared in local and do not contribute towards Unity’s global keyword count limit anymore. The refactor also allowed the implementation of a new feature: full support of SRP Batcher for URP/LWRP and HDRP.
    It doesn't only make the plugin cleaner, but most importantly way more versatile and flexible for the future.

    Additionally, I simplified the setup required for URP/LWRP and HDRP. The current render pipeline is detected and the proper setting is set in the plugin. The only requirement is to enable the Depth Texture property in your URP Render Pipeline asset. Everything is explained here:


    I did tone of testing on a lot of platforms to make sure the update would go as smooth as possible for everyone.
    However I don't have the control on weird things that could happen during a plugin update in Unity, such as old files remaining or new file missing. So if you encounter issues after updating, please try to remove it from your project before reinstalling it from scratch. If it still doesn't work, please contact me.

    I hope you'll appreciate all the work put in this update.

    Thanks
    TS
     
    John-G and Lars-Steenhoff like this.
  45. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,521
    Great work! appreciate the continued support and updates!!
     
    techsalad likes this.
  46. Personuo

    Personuo

    Joined:
    Mar 19, 2014
    Posts:
    129
    Hi, I now want to create volumetric light formed by sunlight passing through a window, your very early video 2018 mentioned in creating this feature, but after purchasing the plugin I found that it is still not supported in 2020.
    Did you give up that feature?
     
  47. techsalad

    techsalad

    Joined:
    Oct 9, 2017
    Posts:
    376
    Hi,
    FYI I never worked on sunlight simulation. This asset has always been about spotlights only. But yes I posted a video showing volumetric shadows support a couple months/years ago, I guess that’s what you are referring to.
    I never managed to make this feature work with good enough performance. So yes we could say that I gave up on it.
    I am sorry if it was misleading for you. If you cannot use the plugin because of that, no hard feelings I could grant you a refund. In this case please contact me.
    Thanks
     
  48. Personuo

    Personuo

    Joined:
    Mar 19, 2014
    Posts:
    129
    In fact, I ended up manually fogging the lights and using Gradient transparency to simulate the effect of sunlight, which is nice!

    But I found that srp batcher doesn't seem to be supported?
     

    Attached Files:

  49. techsalad

    techsalad

    Joined:
    Oct 9, 2017
    Posts:
    376
    I am glad you managed to achieve the desired effect. It looks very nice indeed!
    Yes SRP Batcher is fully supported from version 1.83. Have you set the "Rendering Mode" property to "SRP Batcher" in the Config asset?
     
  50. techsalad

    techsalad

    Joined:
    Oct 9, 2017
    Posts:
    376
    Hi dear users,
    We are aware of an issue introduced by the newly released Unity 2020.1.3 causing a shader compilation error in the plugin when using URP with Vulkan.
    We are working on a fix to release an update quickly.
    If you are encountering the problem, please get in touch with me so I could send you the fix ASAP.
    Sorry about the inconvenience.
    TS