Search Unity

  1. We would like to hear your feedback about Unity and our products. Click here for more information.
    Dismiss Notice

[RELEASED] Hx Volumetric Lighting

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

  1. Alex_May

    Alex_May

    Joined:
    Dec 29, 2013
    Posts:
    147
    Matter of fact, the image effects only seem to be working on one camera
     

    Attached Files:

  2. Alex_May

    Alex_May

    Joined:
    Dec 29, 2013
    Posts:
    147
    After investigating, it seems like this is a problem with Unity, not the asset. Image effects are only applied to the last camera that rendered.
     
  3. Gua

    Gua

    Joined:
    Oct 29, 2012
    Posts:
    307
    When I use 3d noise, with any noise texture. I see strange lines on the sky. Here's screenshot with high 3d noise contrast. How can I get rid of it?

     
  4. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,817
    Back in 2016, the response to a similar issue was that the noise scale is too low; try increasing it.

    Let us know if that helps.
     
    wetcircuit likes this.
  5. Gua

    Gua

    Joined:
    Oct 29, 2012
    Posts:
    307
    Thanks for reply. It does help with that specific issue. But it's impossible to achieve visual effect, that I want with height scale.
     
  6. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,817
    Well, you might post a picture that resembles the effect you're looking for, and see if anyone has any idea of how to get that look.
     
  7. Gua

    Gua

    Joined:
    Oct 29, 2012
    Posts:
    307
    Did some more experiments. Came to the conclusion that Hx Volumetric Lighting is probably not the beast tool for that effect. I wanted to achieve small barely visible clouds that move around player mostly above ground. . Issue number one I've described before. And with higher scale this effect is impossible to achieve. But there's another issue. When I look at the sky I can see some noise that goes away only after 2 seconds.

    High fog is not the option, cause I want this effect everywhere on the location.
     
  8. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,817
    Use fog particles?
     
  9. Gua

    Gua

    Joined:
    Oct 29, 2012
    Posts:
    307
    I use those over the lake. But I think it will be a performance coast of using it all over my huge 2km x 2km level, will be too high.
     
  10. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    4,817
    IDK. It sounds to me more like what you need. If you haven't done so yet, search the forums. There's been plenty of people puzzling over how best to do ground fog effects, and a few solutions discussed in the forums and available in the store.

    I'd think the highest resolution and most active fog needs to be close in the camera view. Distant fog can probably be low res and scaled up.
     
  11. Alex_May

    Alex_May

    Joined:
    Dec 29, 2013
    Posts:
    147
    This is fixed. It was because I had not added the HxVolumetricImageEffect script to the second camera.
     
    hopeful likes this.
  12. gamitCRS4

    gamitCRS4

    Joined:
    Feb 13, 2018
    Posts:
    4
    Hi i'm using HDRP pipeline for a VR project in high definition with the 2019.1.0b8 version.
    I get this error:

    Assets\Plugins\VolumetricLightBeam\Scripts\BeamGeometry.cs(83,17): error CS0123: No overload for 'OnBeginCameraRendering' matches delegate 'Action<ScriptableRenderContext, Camera>'

    Any solution?
     
  13. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    278
    Yes a very simple one. Don't use HDRP.
     
    iddqd likes this.
  14. gamitCRS4

    gamitCRS4

    Joined:
    Feb 13, 2018
    Posts:
    4
    That's not fair :(

    Anyone have the same problem?
     
  15. rasto61

    rasto61

    Joined:
    Nov 1, 2015
    Posts:
    278
    Why not?
    You are using a preview feature in a beta version of unity with an asset that does not support that feature (as far as I know);
    So you really have 2 options:
    1. Dont use hdrp
    2. Dont use hx lighting.
    well, 3;
    3. Wait until hdrp is stable and hx supports it.

    Everyone will have the same problem if they do the same thing.
     
    Last edited: Apr 2, 2019
    gamitCRS4 likes this.
  16. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,174
    HDRP is a completely different rendering system. No asset that does clever rendering stuff or stuff with shaders is going to work with HDRP without the developer rewriting chunks of it. And many developers are not going to do that, especially when HDRP is in preview. I'm sure many will not do so later either, especially if the functionality their asset store package provided is already built into HDRP in some form. HDRP already has its own volumetric lighting system, which I am mostly very happy with, so alternative volumetric lighting systems are not exactly high on my list of assets that I expect to see converted to work with HDRP in a timely fashion (although perhaps a few might, not all of my assumptions are completely safe).
     
    glenneroo likes this.
  17. Rotecks

    Rotecks

    Joined:
    Dec 17, 2014
    Posts:
    53
    I tried it in my project. Looks like a bug was found:
    https://yadi.sk/i/Lsx9lRuWk6UIRA

    It had tested on mac, graphics API: OpenGLCore.
    If graphicAPI is Metal, looks like everything works fine.
    If I chose OpenGLCore, some lights are disappear (look in the video).

    How to fix it?
     
  18. gamitCRS4

    gamitCRS4

    Joined:
    Feb 13, 2018
    Posts:
    4
    I totaly agree with that and yes HDRP owns is Volumetric System to render fog and volumetric light but for now Vr doesn't support that in 2019.1.0b9 and in 2019.2 so i was asking if anyone have try that in order to make it works.
    I find a little solution with this assets to render voumetric light in hdrp but it's still a bit buggy.
     
  19. Nathan_D

    Nathan_D

    Joined:
    Oct 10, 2013
    Posts:
    31
    I've read in an interview with the makers of Black Future 88' that they use HX Volumetric lighting to great effect, but needed to make some modifications to it. I want to buy the asset as soon as possible but I want to make sure my 2.5D game which uses an orthographic camera can properly use the asset. Would love to hear that it does
     
  20. benthroop

    benthroop

    Joined:
    Jan 5, 2007
    Posts:
    131
    Hi Lexie,

    Any thoughts on LWRP support? You could own the volumetric lighting market on LWRP if you went for it. Keep us posted, we're motivated to help.

    Cheers,
    Ben
     
  21. Benjamin_Overgaard

    Benjamin_Overgaard

    Joined:
    Jul 20, 2015
    Posts:
    13
    Hey Lexie,

    When using HX with Temporal Anti-Aliasing from the Post Processing Stack, I'm getting some artifacts. As you can see in the video below, the volumetric effect jitters as it obstructs geometry. Maximize the video and look at the grating in front of the light.



    If I use opaque mode for HX, the problem is solved, probably because it then renders before TAA and gets the same jitter as the geometry. However, that messes with the transparent effects in our game. The problem could instead be solved by injecting HX into the post processing stack as a custom effect and rendering it before the stack, but that seems like a lot of work.

    Do you have any ideas of how to get around this issue?
     

    Attached Files:

    Last edited: Apr 15, 2019
  22. sebastien-barry

    sebastien-barry

    Joined:
    Dec 18, 2013
    Posts:
    51
    Hi, I'm using HxVolumetric Light since multiple years, it's a great tool.
    Actually I use it on a project, and I have the following problem : as soon as I use more than one camera that use HxVolumetricCamera script; i get the following error :
    Dimensions of color surface does not match dimensions of depth surface
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    The problem comes from camera with different rendering size.

    Any idea ?
     
    Last edited: Apr 17, 2019
  23. Gua

    Gua

    Joined:
    Oct 29, 2012
    Posts:
    307
    I'm using 2018.3.0. Everything work fine in the editor, but in a game everything is bright. Issue disappears when I delete hx components from camera. But it doesn't go away if I just disable those components. Does anyone know how to fix this?

    Update: I've fixed it. Removing and adding hx camera components helped for some reason,

     
    Last edited: Apr 19, 2019
  24. Lexie

    Lexie

    Joined:
    Dec 7, 2012
    Posts:
    619
    Go into your quality settings and enable shadows for every performance pre-set. You are currently running the game with shadows disabled. See if that fixes the problem.
     
    hopeful likes this.
  25. Gua

    Gua

    Joined:
    Oct 29, 2012
    Posts:
    307
    Removing and adding hx camera components with same setting solved issue for some reason.
     
  26. sebastien-barry

    sebastien-barry

    Joined:
    Dec 18, 2013
    Posts:
    51
    Hi, still the issue when rendering multiple cameras with differrent resolutions or viewport size ? Any news ?
    A correction or an answer should be nice !
    Dimensions of color surface does not match dimensions of depth surface
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     
    Last edited: Apr 20, 2019
  27. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    818
    Hi there!

    I'm testing HxVL in my prototype, Unity 2019.1.0f2, Windows 10, Deferred, Linear color space, default rendering pipeline.

    Used right out of the box, I get a black screen.

    Tinkering with the settings, I found "Render Order", which I couldn't find in the docs.

    Using "Image Effects Opaque" seems to work fine. Yet, I have this bad feeling that the other option was the one I was hoping to work.

    It's about rendering everything above the transparent layer, isn't it?

    If setting it to "Image Effects" is going to save me from the work of adapting all transparent shaders, I'd love to have more info about this, and how to solve the full black rendered image.

    Could you please help me?
     
  28. Lexie

    Lexie

    Joined:
    Dec 7, 2012
    Posts:
    619
    Ill look into, are you running any other image effects? I'm working on a little update for some compatibility fixes now.
     
    RickF and NeatWolf like this.
  29. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    818
    Yes, mostly the PP Stack v2. Sometimes Prism.

    Would it be possible to add an option to rotate the noise(or sync it with a Transform)? I have a Sun/directional light, and feels a bit weird when the (slightly stretched - beam like) noise is oriented and moves from a direction that is different than that of the sun :)
    (mostly because the noise scaling happens in world space)
     
  30. HenryChinaski

    HenryChinaski

    Joined:
    Jul 9, 2013
    Posts:
    77
    Hi,

    I am using HxVolumetricLighting now for several years and never had any problem with it. Now I am facing an issue I can't solve.
    I have several point lights in my scene, all with HxVolumetricLight components attached. In some instances, the volumetric light shines dimmed through geometry. Mostly the issue can be fixed by moving the camera in a way to face the light from a different direction. Obviously, this is no solution. I have no idea what causes the bug and tried many things:

    - Deactivating another (already disabled) camera with HxVolumetricCamera component attached.
    - Obstruct the light with the built-in cube mesh.
    - Checked for all the settings (e.g. Shadow range, shadow intensity, HxVolumetric settings, etc.)

    Any idea what could be causing the issue? If needed I could provide screenshots via PM.

    Regards,
    Daniel
     
  31. HenryChinaski

    HenryChinaski

    Joined:
    Jul 9, 2013
    Posts:
    77
    Problem still persists. Could it have something to do with the asset "Bakery", that generates Lightmaps? I am not sure when it started.
     
  32. Anticleric

    Anticleric

    Joined:
    Dec 15, 2013
    Posts:
    4
    Hey, I have a weird issue where in a build (Unity 2018.3.13f), being inside density particles makes all of the HX effects disappear. As soon as I walk out of the density particles, the effects return.

    Everything is working properly in the editor (on play), but the effects are missing (inside density particles)when the scene first loads. The appear again in the game view after playing the scene once. The problem is always present in a windows build.

    I've tried deleting the HXusedShaders assets, reinstalling the entire HX package from the store and preloading the HxUsedShaderVariantCollection. Im out of ideas (aside from just turning off density particles).

    I'm using single pass VR, deferred.
     
    Last edited: May 16, 2019
  33. mdotstrange

    mdotstrange

    Joined:
    Sep 23, 2013
    Posts:
    201
    Hello- love the asset! Just had a performance question-

    I'm using quarter resolution with a sample count of 8 with a blur count of 4- this looks good to me and doesn't seem to causes performance issues using the profiler-



    Is using quarter resolution with a lot of blur less demanding than a high resolution with less blur?

    Just wanted to know in case I'm negating the performance gains from using quarter resolution- thank you.
     
  34. maxaud

    maxaud

    Joined:
    Feb 12, 2016
    Posts:
    161
    When using this in Single Pass on the PSVR I don't see rays of light, it simply looks like bright blobs of light on the screen. Any suggestions for more desirable results?
     
  35. romanpapush

    romanpapush

    Joined:
    Sep 20, 2012
    Posts:
    14
    Quick question. Will Hx Volumetric Lighting work on Mac with Metal disabled? (Unity 2019)
     
  36. HenryChinaski

    HenryChinaski

    Joined:
    Jul 9, 2013
    Posts:
    77
    Problem still persists.
     
  37. awesome_suri

    awesome_suri

    Joined:
    Dec 10, 2016
    Posts:
    2
    Hey guys! I've just bought this asset earlier to use it for our VR project.I've got a problem with transparency. I'm using a custom transparent water shader. I've set up an HX volumetric image effect on the camera with height fog, so that the fog is under the water surface. When I'm underwater, it looks fine. But when I'm above, the fog is somehow rendered above the surface, that I can't see the reflections of the water. With normal cameras, I just had to set transparency support to true. But this doesn't work on a vr camera.

    hxvl cam.png (Normal camera with transparency support enabled. Here you can clearly see the reflections on the water surface. You can even see that underwater, the fog gets denser over distance.)

    View attachment 429430 (VR camera. The fog is added after the water is rendered. Looks like if there is a small layer of fog above the surface.)

    hxvl cam vr ts.png (VR camera with transparency support enabled. It's even worse. Now the fog is kinda before the sky as well.)

    I'm using:
    - Unity 2018.3.11f1
    - Stereo Rendering Mode: Single Pass
    - OVR Plugin v1.36.0

    Does anyone know this problem?
     

    Attached Files:

  38. Grungi_Ankhfire

    Grungi_Ankhfire

    Joined:
    May 14, 2014
    Posts:
    4
    Hi Lexie (and others, in case anyone has some pointers!)

    First off, love HxVolumetric, it saved our bacon when our previous system was not able to handle the effects we needed for our game.

    It's an asymmetrical VR game where the VR player is 30 times bigger than the PC player, and both need to see volumetric lights for gameplay reasons. It works perfectly on the PC side (which is at scale 1), but Hx renders volumetric light in different positions for the eyes of the VR player, making it really headache-inducing.

    It's not a clipping issue, but really a matter of not rendering the lights at the same spot. We are using single-pass rendering, and the standard render pipeline, so normally we should be good. Do you happen to know any way we could solve our problem? (especially because changing the scale of the game is not really feasible). I can provide a small project reproducing the issue if that helps, but I could do it by simply scaling the camera up in the demo scene (not scaling the scene itself). Thanks in advance!
     
  39. Lexie

    Lexie

    Joined:
    Dec 7, 2012
    Posts:
    619
    Ill look into it. Must be a matrix calculation issue in VR when the transform is scaled up.
     
    Grungi_Ankhfire likes this.
  40. RickF

    RickF

    Joined:
    Sep 12, 2012
    Posts:
    21
    Hi all. Lots of helpful info in this forum. I'm just trying to clarify compatibility with HX and PostProcessingStack2.0. Sounds like there is some conflict with render order.

    Following neatwolf's comments i changed the Render Order to "Image effect Opaque", and it appears to work correctly (in the simple scene I currently have). If Render Order is set to "Image Effect" the game camera is essentially black (with exception of the actual volumetrics).

    Is this expected behavior? Or is there a deeper conflict with HX and Stack2.0?

    Note I am currently running in 2019.1.5
     
  41. Deckard_89

    Deckard_89

    Joined:
    Feb 4, 2016
    Posts:
    167
    Sounds more like a Unity 2019 issue. I'm using Hx with PPStack 2 in Unity 2018.3.14 and it seems to be okay.
     
  42. RickF

    RickF

    Joined:
    Sep 12, 2012
    Posts:
    21
    Thanks for the info. Good to know.

    Previous comments note some compatibility issues, so im searching for any answers. Tried using legacy PPStack from the asset store, but ran into other console errors.
     
    Deckard_89 likes this.
  43. RickF

    RickF

    Joined:
    Sep 12, 2012
    Posts:
    21
    Also note enabling "transparency support" works for fixing the default 'black' problem, but it looks like it essentially does the same thing (enables/ attaches Image Effect Opaque Script. Trying to get the volumetrics to draw over some transparent water, is there a way to force the render order back for volumetrics?

    I know there are modified standard shaders for other simplier objects but does anyone have a solution for water (using the Calm Water asset store water
     
  44. HenryChinaski

    HenryChinaski

    Joined:
    Jul 9, 2013
    Posts:
    77
    The problem still persists.
    You can recreate it by creating a new scene, deleting the Directional Light and adding a point light + HX Light component. I increased the intensity and mie scattering to make the hx effect more visible. Then you put a standard cube mesh above the point light scale it so that no light from the point light could ever reach the upper side and place the main camera in front of it with a downwards angle (in my case 36 degrees).

    Here are some screenshots:
    https://ibb.co/SnYpYTD
    https://ibb.co/4ZnRfPL

    There are no other effects on the camera. It is the same for forward or deferred.
    It doesn't matter if I select image effect or opaque.
    Unity Version is 2018.1.1f1

    No one else experiencing this?
     
  45. Deckard_89

    Deckard_89

    Joined:
    Feb 4, 2016
    Posts:
    167
    @HenryChinaski I think you might be better off making a video, I don't really understand what's happening in those screenshots. Also, are you sure it's not just indirect light bouncing around with GI?
     
  46. Major-Idea

    Major-Idea

    Joined:
    Jul 26, 2012
    Posts:
    12
    Is there a way to make this work with any kind of reflections?

    I've tried and failed using reflection probes, screen-space reflections and planar reflections.
     
  47. HenryChinaski

    HenryChinaski

    Joined:
    Jul 9, 2013
    Posts:
    77
    Yeah maybe I should do but its always so much work.
    I just position the camera in a downwards angle and obstruct the point light by a stretched cube. The second image shows what the camera sees, The light should definitely not shine through. This was a simple test scene with no baked GI or anything, but thanks for the tip. It really seems to be bug for me but strange that no one else reported it. On the other hand I heavily increased the intensity to make the problem better visible. In our game, it took us some time to even realize what was the problem and why things looked washed out.
     
  48. zackblack

    zackblack

    Joined:
    May 17, 2015
    Posts:
    8
    Been waiting for LWRP support for over a year now. I'm about to purchase Aura 2 - Volumetric Lighting & Fog from the asset store because it says it supports it. Any reason to keep waiting for an update?
     
  49. ryanreptoid

    ryanreptoid

    Joined:
    Aug 12, 2012
    Posts:
    82
    It's on their roadmap, but they do not support it as of now.
     
  50. ryanreptoid

    ryanreptoid

    Joined:
    Aug 12, 2012
    Posts:
    82
    I can see volumetrics in game-view fine, but they never show in scene-view. Is there anything I can do about that?