Search Unity

[RELEASED] Hx Volumetric Lighting

Discussion in 'Assets and Asset Store' started by Lexie, Aug 1, 2016.

  1. Lexie

    Lexie

    Joined:
    Dec 7, 2012
    Posts:
    646
    Add the line [ImageEffectAllowedInSceneView] to HxVolumetricImageEffect, HxVolumetricImageEffectOpaque and HxVolumetricCamera

    Here is what the HxVolumetricCamera script would look like
    Code (CSharp):
    1. [ExecuteInEditMode]
    2. [ImageEffectAllowedInSceneView]
    3. public class HxVolumetricCamera : MonoBehaviour
     
    ryanmillerca likes this.
  2. Lexie

    Lexie

    Joined:
    Dec 7, 2012
    Posts:
    646
    I've been out of office during E3, I'm back now so ill get to fixing any bugs with newer version of unity/vr.

    I'm doing some preliminary work into a cut down version that is compatible with the light weight render pipeline. LWRP and HDRP both render lighting differently then the legacy renderer so its not really feasible to just just plug in what I have. Ill have more news soon.
     
  3. Grungi_Ankhfire

    Grungi_Ankhfire

    Joined:
    May 14, 2014
    Posts:
    5
    Thanks for the update Lexie :)

    If you need any help in testing stuff VR-wise, feel free to ask!
     
  4. ryanmillerca

    ryanmillerca

    Joined:
    Aug 12, 2012
    Posts:
    143
    Oh my god you're a lifesaver! Works like a charm, thank you!


    I am very excited for LWRP Hx Volumetric Lighting!!
     
  5. BATTLEKOT

    BATTLEKOT

    Joined:
    Oct 2, 2016
    Posts:
    179
    Any plans for add HX Volumetric light support in LWRP and add PREVIEW ENABLED in editor window? That would be cool.
     
  6. Lexie

    Lexie

    Joined:
    Dec 7, 2012
    Posts:
    646
    both of these are addressed 3 posts up.
     
    BATTLEKOT likes this.
  7. Stopsecret

    Stopsecret

    Joined:
    Oct 31, 2012
    Posts:
    70
    This is awesome looking, great work! :D
     
  8. glenneroo

    glenneroo

    Joined:
    Oct 27, 2016
    Posts:
    231
    I was able to make some performance improvements which really help in VR by caching some of your transforms which are called every frame - according to Unity they are accessors which call GetComponent<Transform>(). I can give you my code or just tell you to search for "transform." and replace those with cached versions (also I added to HxVolumetricCamera -> MyCameraTransform). I was able to save ~1ms per frame in order to help get under 11.1ms per frame needed for smooth 90fps VR.
     
    Adam-Bailey likes this.
  9. Lexie

    Lexie

    Joined:
    Dec 7, 2012
    Posts:
    646
    Ill add it to the list for the upcoming update.

    In other news I've managed to get some basic volumetric support for LWRP with out having to modify the scriptable render pipeline. It would be easier if I could modify the renderer but it would require coding knowledge for the end user, I'm trying to get it to all slot in with out any coding/modifications. Still a lot to figure out but I have made some progress.
     
    glenneroo likes this.
  10. JohanF_TF

    JohanF_TF

    Joined:
    May 20, 2015
    Posts:
    75
    That sounds really promising, looking forward to it!

    Regarding modifiying the renderer, isn't it a option that you do?
    If you make the necessary changes to the pipeline for it to work, shouldn't you be able to ship the custom SRP along with the package, in the LWRP case being an LWRP+ which is a modified version LWRP?
    It would mean it's not pure LWRP, but it should be possible without additional work from the end user?
     
  11. maximeraymond

    maximeraymond

    Joined:
    Jul 4, 2019
    Posts:
    1
    Hey everybody, I'm pretty new here and we are experiencing weird things on a project that was made on Windows with the plugin Hx. Because now we wanted to release the Mac version and even if the game is running perfectly, we have this super weird issue with fog:

    This is the final product on PC:
    Capture d’écran (304).png

    The Mac version:
    Capture d’écran 2019-07-04 à 22.30.45.png

    PC:
    Capture d’écran (305).png

    Mac:
    Capture d’écran 2019-07-04 à 22.31.58.png

    Same UNITY version. The only thing that has an impact on it is removing the "Metal Editor Support" and "Metal API Validation" on the PlayerSettings.

    If anyone has an answer, or if I just missed an article about it, it would amazing!

    Thanks!
    Max
     
    Joe64 likes this.
  12. ryanmillerca

    ryanmillerca

    Joined:
    Aug 12, 2012
    Posts:
    143
    Word of warning for others trying this; it will slowly leak and fill up your VRAM (with rendertextures?). I would suggest only turning it on temporarily and disabling when you don't need the functionality anymore.
     
  13. Lexie

    Lexie

    Joined:
    Dec 7, 2012
    Posts:
    646
    Can you confirm that you are up to date on the plug-in? also what version of unity are you using.
     
  14. Lexie

    Lexie

    Joined:
    Dec 7, 2012
    Posts:
    646
    Because then it makes it harder for users to combine other effects that will inevitably require some other modifications to the scriptable render pipeline. If I'm able to get it working with in the image stack then its easier for people to mix and match effects.
     
  15. zackblack

    zackblack

    Joined:
    May 17, 2015
    Posts:
    76
    Very exited that you are working on LWRP support! Just today I started doing perf tests on my VR project again and was searching for alternative volumetric light assets so I will hold off and eagerly await an update :)
     
  16. Lexie

    Lexie

    Joined:
    Dec 7, 2012
    Posts:
    646
    Should have a beta for a cutdown volumetric effect for LWRP by the end of the week. It wont have as many features as the legacy version and inherits the limitations of LWRP such as the 16 light limit per camera and no shadow casting point light (LWRP does not support them yet).
     
  17. BATTLEKOT

    BATTLEKOT

    Joined:
    Oct 2, 2016
    Posts:
    179
    Can't wait =D HX Volumetric Light more optimized than Aura 2 or any other Volumetric Light solution on asset store.
    I think in future Unity will use LWRP by default render .
     
    zackblack likes this.
  18. Lexie

    Lexie

    Joined:
    Dec 7, 2012
    Posts:
    646
    I got the base system for LWRP all set up. I still need to add an ability to inject density volumes or density particles to make the fog look more interesting.



    I incorporated some of the up-sampling work from my GI stuff to make low res rendering look better then the legacy one.

    All that's really left is the ability to modulate the air's density, I was hoping to get some feedback from the community on what y'all would prefer for this. Was the density particles from the legacy plug-in enough? would it be better if it was all volume based like unity's HDRP volumetric lighting? Some feedback on this department would be great.

    I don't think I can get transparency support done for this beta, It's going to require that I edit the render pipeline and I really don't want to require users to branch the LWRP. That's just going to create headaches every time they update.
     
  19. BATTLEKOT

    BATTLEKOT

    Joined:
    Oct 2, 2016
    Posts:
    179
    I really like air's density volume from HDRP , also we will able to enable/disable HX Volumetric Light in editor window?
     
  20. Lexie

    Lexie

    Joined:
    Dec 7, 2012
    Posts:
    646
    Yeah it will be part of the post processing stack and you can toggle if the post processing stack effects the scene view in its little hotbar at the top.

    Density volumes like HDRP would require compute shader support so that would rule out any older machines such as 2014 macbooks, older Iphones and androids that don't support OpenGLES 3.1. Not sure if people will be happy with that requirement or not. LWRP is written to support all these old machines.
     
    BATTLEKOT likes this.
  21. BATTLEKOT

    BATTLEKOT

    Joined:
    Oct 2, 2016
    Posts:
    179
    ehh, then I think will be better keep volumes like at the moment in HX Volumetric Light, cuz so many people use that volumetric light for low-end hardware games.
    At the moment in market from my experience HX Volumetric Light most optimized Volumetric Light solution.
    DeepHaze was deleted from market, AURA 2 based on OWN WEIRD buffers that slow-down game performance...
     
  22. JohanF_TF

    JohanF_TF

    Joined:
    May 20, 2015
    Posts:
    75
    Ah yes, you are right of course.

    Looking promising so far, fingers crossed
     
  23. zackblack

    zackblack

    Joined:
    May 17, 2015
    Posts:
    76
    Awesome! Is the beta available to try out yet?
     
  24. BATTLEKOT

    BATTLEKOT

    Joined:
    Oct 2, 2016
    Posts:
    179
    just need to wait. He working on HXGI and HX Volumetric Light in same time. That pretty hard.
     
  25. Lexie

    Lexie

    Joined:
    Dec 7, 2012
    Posts:
    646
    Hopefully have an open beta this week.

    I managed to get parity with unity's HDRP volumetric density volume while still limiting it to shader model 3.5. trying out a few ways to speed up density injection and then I need to add temporal sampling, Should be ready once those are done.
     
    BATTLEKOT likes this.
  26. zackblack

    zackblack

    Joined:
    May 17, 2015
    Posts:
    76
    Very exciting. Will you be able to provide some form of documentation on a temporary solution to get transparency working? I know it's not ideal, but I would be willing to do the modifications myself in the pipeline - it's that important to the VR project I'm working on.
     
    Karearea likes this.
  27. EHG_Unity

    EHG_Unity

    Joined:
    May 21, 2017
    Posts:
    20


    Any idea why HX may be placing volumetrics in the bottom left quadrant? If I change the resolution it pops into full view
     
  28. Lexie

    Lexie

    Joined:
    Dec 7, 2012
    Posts:
    646
    Is this using the newest version from the asset store and what version of unity are you using?

    Looks like the res might be cached and not resetting the render texture size, although that doesn't explain why its in the bottom quadrant. If you let me know what version of the asset your using (should say in the asset store download page) and the version of unity you're using i can look into it.
     
    Last edited: Jul 29, 2019
  29. EHG_Unity

    EHG_Unity

    Joined:
    May 21, 2017
    Posts:
    20
    We're up to date and on Unity 2018.3
     
  30. Lexie

    Lexie

    Joined:
    Dec 7, 2012
    Posts:
    646
    Just a little update for LWRP support, Unity is replacing LWRP with a new render pipeline called Universal Render Pipeline. It should be similar in terms of functionality but will most likely change the way lighting is sampled in shaders.
    You can read about it here.

    This has always been my concern about adding support for a preview feature of unity. Right now I'm just optimizing the codebase and working on cleaning up the code and the editor for people to use. But Ill most likely wait till URP is released to make sure they haven't haven't changed the way lighting is sampled. The alpha for URP should be coming out shortly.
     
    glenneroo, elbows and BATTLEKOT like this.
  31. EHG_Unity

    EHG_Unity

    Joined:
    May 21, 2017
    Posts:
    20
    @Lexie any update on this?
     
  32. EHG_Unity

    EHG_Unity

    Joined:
    May 21, 2017
    Posts:
    20
    @Lexie pinging again - we have a build coming out and this is currently the largest bug we have!
     
  33. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    LWRP came out of preview with 2019.1, but in practice I dont think this really turned out to be a milestone for the system settling down, increasing the confidence of 3rd party developers etc. I consider it unfortunate that they did not come up with and do the name change before it came out of preview.

    I do consider the change to Universal to be just a name change. Yes other changes happened and are continuing to happen, but they would have happened in this version 7.x of the pipeline regardless of whether its name changed or not. So the 'moving target' issue remains for you and others looking to develop for these pipelines.

    Technically the first version of the pipeline called Universal came out a couple of weeks ago, with version 7.0.0. Version 7 of the pipelines are designed for 2019.3. Version 7.0.0 will work with alpha versions of Unity 2019.3 from a10 upwards, so it should already be possible to try it. However, package.json of version 7.0.1 indicates that alpha 12 is required. Curiously, later branches of the pipeline on github, such as master where 7.1.1 is current being worked on, still have alpha 10 as the requirement in their package file (could be an error somewhere, or some detail I dont know or understand). Anyway, its another example of moving targets since there is not much point developing for version 7.0.0 or 7.0.1 when later versions will no doubt be available and recommended once 2019.3 reaches beta and then finally release. And large breaking changes that affect your implementation seem just as likely to happen between version 7.0 and version 7.11, as between 6.x and 7.x, since 7.1.x still seems to be undergoing plenty of work right now, including changes to light limits for Universal which were committed on github just the other day.

    I suppose if it were me developing this asset, I would consider whether many of my users were going to stay with 2019.1 or 2019.2 versions of LWRP. I'd certainly be tempted to put out a publicly available test that targets 2019.2 and the associated 6.x branch of LWRP at this stage, rather than chasing the presently fast moving 2019.3/7.x target. But that would depend on user feedback, my timing/timetable, and what some of the ongoing changes in 7.x actually mean for the technical implementation details of my integration.
     
    Last edited: Aug 2, 2019
  34. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    I mean, its entirely possible that the light refactoring and limit changes that are in 7.1.1 end up being the final large change for ages, at least in terms of what affects you, and that this version will be an excellent candidate to develop for. But I dont think I actually have enough information to confidently predict that, it will only become clear with some hindsight. Some short-term clues can often be gathered by looking at various active branches and pull requests, but these things still dont really give me a vision of what is planned for the rest of the 7.x (2019.3) cycle. So, I feel your pain!

    I may as well end with a link to the master branch changelog for Universal. https://github.com/Unity-Technologi...unity.render-pipelines.universal/CHANGELOG.md
     
  35. BATTLEKOT

    BATTLEKOT

    Joined:
    Oct 2, 2016
    Posts:
    179
    Yea, not everyone will go to 2019.3 with Universal render. Maybe really lets release LWRP version early?
     
  36. RickF

    RickF

    Joined:
    Sep 12, 2012
    Posts:
    33
    are the HX volumetrics supported with Post Processing Stack 2.0? They seem to disappear anytime I activate post effect layers. unity 2019.1.5f1
     
  37. Lexie

    Lexie

    Joined:
    Dec 7, 2012
    Posts:
    646
    I sent you a DM asking for more information. Check your messages. I have not been able to reproduce the bug with my setup, asking for more info to help me get to the bottom of it.
     
  38. Pourya-MDP

    Pourya-MDP

    Joined:
    May 18, 2017
    Posts:
    145
    hx2.png

    Hi everyone
    I think the image describes the problem
    My unity version is 2017.4.1.f1 also tested on 2017.1.1f1
    But the same problem
    Hx volumetric lighting version is 1.3.6
    Any help will appreciated
     
    Last edited: Aug 7, 2019
  39. funselektor

    funselektor

    Joined:
    Oct 11, 2013
    Posts:
    105
    I'm getting this issue too.

    EDIT: Turns out enabling Transparency Support fixed it, all is well now. Using 2019.2.0f1
     
    Last edited: Aug 8, 2019
    RickF and hopeful like this.
  40. Lexie

    Lexie

    Joined:
    Dec 7, 2012
    Posts:
    646
    This is caused by the shadow bias on the light. reducing that will reduce the "floating" shadows but can also introduce shadow artifacts on surfaces if the bias is too low, by default unity has the bias turned up a lot higher then it needs.
     
  41. Pourya-MDP

    Pourya-MDP

    Joined:
    May 18, 2017
    Posts:
    145
    So much thanks for pointing it out.
     
  42. Stickeyd

    Stickeyd

    Joined:
    Mar 26, 2017
    Posts:
    174
  43. f0ff886f

    f0ff886f

    Joined:
    Nov 1, 2015
    Posts:
    201
    It looks like every single time I save a Scene with HXVolumetric lighting, the scene is getting changed with all these BlitMatrix type values:
    upload_2019-8-18_22-5-22.png

    It wreaks havoc on source control since everyone is creating conflicting changes even though we rarely touch HXVolumetricCamera's settings in the scene. any idea why this is?
     
  44. HenryChinaski

    HenryChinaski

    Joined:
    Jul 9, 2013
    Posts:
    108
    Your image doesn't work, but maybe I have the same problem.

    To the author:
    I am sorry for the trouble, but I REALLY NEED TO SOLVE THIS as soon as possible, because we want to publish a demo next month. I have the issue of volumetric light often shining through geometry for months now and already posted several times. I don't demand that you magically solve this issue but I already invested more than 20 hours solely into finding the cause of the bug. I gladly will invest another 20 hours but please at least give me a hint at where I should investigate.

    Unity version: 2018.1.1
    HX Volumetric Light version: 1.3.6e

    Example images:



    I feel like I already tried everything, like changing light settings, culling masks, removing the asset "Bakery" from our project, play with all the HX Camera settings etc.
    The images I attached were screenshotted in the specific scene where the problem occurs. I copied the whole construction + camera into a fresh scene and did not have any problem, so I assume that it has something to do with the scene itself. Still, I can't tell for sure, since the problem sometimes occurs instantly and sometimes only in certain camera angles. The one thing I can do to solve the issue is to pause the game, disable the light, enable it again and the problem is gone. Obviously, this is no solution for a published game. Sure, I could write a script that does that at the beginning of the game but I would feel very insecure about it.

    If there is anything I should tell or show you, please let me know. If you don't have any idea, maybe we could find an agreement and I would pay you for your investigations. But please look into this. I fell in love with your asset and I would hate if we would need to remove it from the project, because I really think I mastered design with it in the last years.

    Best,
    Daniel

    UPDATE:
    Ok, I added this script to all HxVolumetricLight objects for testing purposes:

    Code (CSharp):
    1.     IEnumerator ReEnable_Routine()
    2.     {
    3.         yield return new WaitForSeconds(6f);
    4.         GetComponent<Light>().enabled = false;
    5.         yield return new WaitForSeconds(1f);
    6.         GetComponent<Light>().enabled = true;
    7.     }
    I realized that the disable/enable fix only works for one light at once. So if I disable/enable a second light, the first one immediately starts making the problem again. So not even this is solution unfortunately....
     
    Last edited: Aug 23, 2019
  45. namdo

    namdo

    Joined:
    Feb 23, 2015
    Posts:
    200
    Does this work with baked light and light probes? I baked the lights in my scene but It doesnt seem like it's working anymore.
     
  46. zackblack

    zackblack

    Joined:
    May 17, 2015
    Posts:
    76
    Any possibility of getting a beta or something that works with LWRP? We are getting ready to publish a VR demo on Steam and desperately need this!
     
  47. BATTLEKOT

    BATTLEKOT

    Joined:
    Oct 2, 2016
    Posts:
    179
    Universal Render Pipeline is out in 2019.3 Beta =)
     
  48. SoyUnBonus

    SoyUnBonus

    Joined:
    Jan 19, 2015
    Posts:
    43
    I was testing the asset for future use in a game, but I'm getting a lot of light bleeding between the tiles of my level.

    LightBleeding.jpg

    The screenshot shows a lot of Density to highlight the effect, but it's very noticeable even in low Density.

    I'm using 6x6 unit tiles for my level, and almost everything (ceilings, walls) uses them.

    Plugin settings are mostly default and I'm using a box both in the ceiling and walls (so it's not a flat plane). Any idea of what could be the issue here?

    I'm using Unity 2019.2 and version 1.3.6 of the plugin (I may update next week, but I didn't saw anything related to this issue in the changelog).
     
  49. BATTLEKOT

    BATTLEKOT

    Joined:
    Oct 2, 2016
    Posts:
    179
    Or make we can get LWRP version?
    URP its too laggy and have a lot of bugs =(
     
    Last edited: Sep 3, 2019
  50. Grungi_Ankhfire

    Grungi_Ankhfire

    Joined:
    May 14, 2014
    Posts:
    5
    @Lexie Just popping in here to thank you for the VR scaled camera issue fix :)

    This is working like a charm and will be a highlight of our upcoming release! Really appreciate it!
     
    hopeful likes this.