Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Feedback HDRP Particle System Shaders

Discussion in 'Particle System Previews' started by richardkettlewell, Mar 13, 2019.

  1. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    we can resume how got hdrp particle at this time ? please
     
  2. sebastianzander

    sebastianzander

    Joined:
    Mar 22, 2018
    Posts:
    37
    Hi, I am using Unity 2019.1.10f1 with HDRP 5.16.1. An hour ago I downloaded the Unity Particle Pack assets and tried to create a simple dust storm. I then downloaded ParticlesShaders-HDRP5.7.2-2019.zip and switched the particle material shaders to ParticleLit. For the "biggest" part of the particle textures this works, however I get unpleasant looking specular spots as a reflection from the sky light:

    hdrp_particle_shader_artifacts_1.jpg

    These spots are only visible when looking into the same direction as the directional sky light is radiating. Its a rather tight viewing angle/cone - outside of it they are not visible.
    Also there is this vertex stream/shader input mismatch for the TANGENT and TEXCOORD streams. I could find and add the TANGENT stream to the particle system, but there is no TEXCOORD stream to be found. I don't even know if this is connected to the specular spot artifacts since the UV mapping of the dust texture seems to be correct. Any idea?
     
    Last edited: Jul 26, 2019
  3. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    This part is going to be a bit tricky. The old Standard Particle Shaders has a custom GUI and a button to automate setting the correct streams, but right now there is nothing for the Shader Graph shaders - instead it is down to you to know what you are using, and use the error messages to guide you.

    In general:
    * If the shader graph is using normal mapping, it will need the Tangent stream
    * If using the blended flipbooks, you'll need UV, UV2 and AnimBlend. Otherwise you'll only need UV.

    I haven't done any detailed testing of this so there may be cases that this doesn't cover.

    Sorry I've no idea about the bright spots, but the mis-matched streams may indeed be causing problems.
     
  4. sebastianzander

    sebastianzander

    Joined:
    Mar 22, 2018
    Posts:
    37
    Thank you so far. Can you give me a clue where to start? I haven't yet worked with Shader Graph but I programmed (extended and edited) two or three shaders so far. Is it possible to update the shaders that you provided and match the streams in Shader Graph or do I have to manually code this?

    As for the TANGENT stream: I do not require any normal mapping in my particles - what exactly do you mean "if the shader graph is using normal mapping?" - I don't know if it uses normal mapping. Do you even talk about the shader graph shaders that you provide?

    As for the TEXCOORD/UV stream: I assume flipbooks are this kind of sprite maps/texture atlas with multiple versions of the same particle texture. If so then I have to say yes, the dust storm examples from the Unity Particle Pack use such particle textures. I use the ParticleLitFlipbook shader now but the result is still the same - and like before the UV mapping is correct.
     
  5. djkebab

    djkebab

    Joined:
    Aug 25, 2019
    Posts:
    1
    Erh, the "Color over Lifetime" doesnt work with HDRP yet?

    I am running Unity 2019.1.11f1
    And i run HDRP 5.16.1

    And i am using HDRP/unlit material.

    But i lose control over fading via color over lifetime. Can i fade in and out another way until it's fixed?
     
  6. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    You need particle shader which has vertex color node.
     
    richardkettlewell likes this.
  7. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,437
    I noticed in HDRP the particles will be very bright at certain camera angles and camera pitches, but then can also go completely "black" at other camera angles. What causes this? And is there a way to tell the particles or the camera not to do that?

    The particles look good at a few specific camera angles, then when I "look down" with my camera the particles go completely black and it is really unrealistic.

    I tried adding in another directional light into my scene to try to keep the particles from "going black", which helped a little bit, but still doesn't fix the problem. I know it's probably a realistic camera feature with light or something, but I want my particles to stop doing that.
     
  8. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    Maybe setting the Normal Direction property in the renderer module will help, as it makes the lighting behave as though the billboards are spherical (approximately)
     
    Velo222 likes this.
  9. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    584
    Is there support for fog for the HDRP particle shaders? I read in the docs that the fog node only works with LWRP/URP.
     
  10. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    I don't know - the particle shaders are simply shader graph shaders, so it's more a question of whether it's possible to have fog via shader graph in HDRP. If the answer is yes, then fog could definitely be added to the particle shaders too. (maybe there is a checkbox in the master node settings or something - I'm admittedly not super familiar with HDRP)
     
  11. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    584
    So there is a checkbox for "Receive Fog" in the HDRP master nodes. However, it doesn't work in all cases.

    All the included HDRP ParticleUnlit* shaders have the box checked. Receiving fog works for all of them except the "ParticleUnlit" shader. That one only receives fog if you connect a Scene Depth node or a Position node set to View, which the other shaders have.

    Not sure why receiving fog doesn't get activated for that one. Perhaps some code is not included?

    I created a bug report for it: 1192876

    Hopefully someone can take a look at it.
     
    richardkettlewell likes this.
  12. marck_ozz

    marck_ozz

    Joined:
    Nov 30, 2018
    Posts:
    107
    I was using the Unity Partcle Pack in my project and then update it to HDRP and all this particles FXs started to work wird with pink looking veheivior or stoped to work at all. This new Shader Graph don't seems to fix the problem and I have tried with all of the new shadders. Any recomendation? Please Help!
     

    Attached Files:

  13. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    Are you able to submit a bug report?
     
  14. marck_ozz

    marck_ozz

    Joined:
    Nov 30, 2018
    Posts:
    107
    Aparently I don't. But if you tell me how, I can do it. Thank you!
     
  15. marck_ozz

    marck_ozz

    Joined:
    Nov 30, 2018
    Posts:
    107
    Sorry I already see the "Report a Bug" documentation. I'm working on that
     
    richardkettlewell likes this.
  16. filod

    filod

    Joined:
    Oct 3, 2015
    Posts:
    224
    it would be nice to have one official Material Upgrader script of this, tons of Unity Assets Store FX are build in legacy shader. I tried to write my own upgrader, but there is no docs, i'm quite blind scripting though.
     
  17. Ogham5tone

    Ogham5tone

    Joined:
    Jan 14, 2020
    Posts:
    4
    @richardkettlewell (or anybody who might be able to help?) - have you any advice on how to get transparent particles to sort with one another as well as the world correctly? I'm attempting to fix an FX pack that we got on the store, the shaders of which appear to work, but throw up all kinds of red errors, so I'm recreating the materials using Hdr shaders.

    The main problem I have right now appears to come from the Depth Test settings - the only one that appears to sort the particles correctly is 'NotEqual' - all others give really bad results (due to the many overlapping particles in place, they pop in and out jarringly over the lifetime).

    'NotEqual ' displays them all reasonably well, but sorts them on top of the world - see attached image where the source shader clips off at the ground, whereas the Hdr shader shows the effect beneath the ground rendered on top. Accurate sorting of the particles is not essential as they combine together, but I do need to be able to sort with the surrounding objects.

    Any advice or insights in how to approach or solve this would be greatly appreciated! -Thx!
    particlesorting.jpg

    Using Unity 2019.2.12f1
     
    Last edited: Jan 22, 2020
  18. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    I'm in the same situation, I would like an upgrade for legacy particles.
    Lots of asset store packs are using the original Particles/Unlit shader

    My test on a store pack:
    Select an effect and check its material settings in Built-in project:
    upload_2020-4-8_16-31-43.png
    Note the Albedo map set with a texture

    upload_2020-4-8_16-26-15.png

    In HDRP project change the shader type to ShaderGraph Unlit (I picked soft by mistake but that doesn't matter for the example)
    upload_2020-4-8_16-32-12.png
    The main first issue here is that it loses the Albedo map. That can be a big pain for large packs to set that manually.
    Other thing as a non expert (at all) is that the setttings are very different from just:
    Rendering Mode [Opaque/Cutout/Fade/Transparent/Additive....]
    Color Mode [Multiply/Additive/Substractive...]

    to the new settings.

    The effect at least is not pink anymore, it kind of work (project lighting is totally not the same obviously)
    Main issue so far are the shadows that are completely off:
    upload_2020-4-8_16-32-1.png *

    So, long story short is: A tutorial and most of all, a converter script (even in beta with manual selection of the materials etc) would be really great..

    @richardkettlewell if by any chance you read this I'm eager to know what the team stands for regarding this topic :)
     
  19. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    It's been a while since i'm messing with shuriken in HDRP but try to enable Alpha Clipping for the shadow issue
     
  20. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    @richardkettlewell
    Hi, I've tested HDRP shaders from the Sample package that comes with HDRP render pipeline.

    It seems like they no longer use black color from the texture as transparency. (Lit / SoftLit)
    Is that intentional, or will be changed in the future?

    Swapping black to transparent isn't a big deal for me, if its a standard now.

    Thanks.
     
    Last edited: Apr 17, 2020
  21. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    Hi, what are you comparing the behaviour against?
    An older version of HDRP, or the built-in particle shaders?
     
  22. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    Built-in.

    I was using legacy shaders (Legacy Shaders/Particles/~Additive-Multiply and Mobile/Particles/Additive) prior to the HDRP port.

    So this might've changed a while back.
     
    Last edited: Apr 17, 2020
  23. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    Also, I've noticed that rotation is respected differently when using these shaders.
    Had to rotate the actual object to fix it.
     
  24. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    Ah ok - yeah things have changed a lot since then. I would expect, as long as it is consistent with how normal HDRP stuff works, then it's correct. Because the lighting setup and authoring process should be the same for particles and non-particles stuff within HDRP.

    I don't understand how rotation can be affected by how the particle surfaces are shaded. The shaders should only affect how they look, not how they are positioned/rotated.
     
  25. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    Me neither. However, I had to turn some of them to the 270, because they were not emitting to the up direction, but rather to one of the sides after switching a shader on the material.
     
  26. valarnur

    valarnur

    Joined:
    Apr 7, 2019
    Posts:
    440
    How do I copy particle system shader and material form HDRP 7.31 preview asset?
    When I press CTRL +C and CTRL+P in my own folder nothing happens.
     
  27. sapphire790

    sapphire790

    Joined:
    Feb 1, 2018
    Posts:
    3
    Hi, I was wondering, I am possible to convert Legacy Shaders/Particles/Additive to HDRP? It is last material i cannot get to work for the WormHole tunnel. Thx
     
  28. Ultroman

    Ultroman

    Joined:
    Mar 10, 2014
    Posts:
    110
    1. Is it possible to make a particle shader that receives light? HDRP here.

    2. It's really frustrating in general not to have light info for shaders. What are we supposed to do without light nodes in Shader Graph or light info available in our custom shaders, when we're using HDRP? I still haven't found a good answer to that question, despite doing several searches in the past year. I might be using the wrong search terms, though.
     
  29. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    i think you have to use the lit master nodes in ShaderGraph for all lighting. For any feature requests relating to shader graph, if you post it in the shader graph forum you’ll get the right people looking at it :)
     
    Ultroman likes this.
  30. Ultroman

    Ultroman

    Joined:
    Mar 10, 2014
    Posts:
    110
    Thanks for answering :D

    Well, I'm actually using Amplify, so that's another story, but this "no light info available in custom, written shaders" is what is nearly forcing me to leave HDRP for SRP or whatever renderer that has light info available. I understand that HDRP is fundamentally different and thus doesn't have the same structure allowing for the same light info being available, but there must have been some thoughts as to what your users were supposed to do instead, right? Light info has always been there, and now it suddenly isn't. How do we gain the same control in our custom shaders?
     
    Last edited: Dec 20, 2020
  31. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    Ultroman likes this.
  32. radiantboy

    radiantboy

    Joined:
    Nov 21, 2012
    Posts:
    1,633
    Im using HDRP 11.0.0 where can I get the relevant particle shaders to make all my old particle systems work? are the ones in this thread still relevant?
     
  33. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    Go to Window / Package Manager and select the HDRP package. From there, you should see a link, or list, for some Additional Packages, or Additional Samples, or something like that. (Sorry for my vagueness... they keep messing with that UI, I haven't looked at it for a while myself) Anyway, the particle shaders should be in there.

    As a last resort, I think the latest ones here ought to still work too: https://forum.unity.com/threads/hdrp-particle-system-shaders.643840/ (I'd try the proper way through the Package Manager UI first though)
     
    radiantboy likes this.
  34. nevaran

    nevaran

    Joined:
    May 21, 2010
    Posts:
    247
    Why are lit versions of the shaders so extremely expensive? Especially when getting close to them they drop the framerate tenfold.
    And should the Distortion variants of the shaders be casting a supernova emission without an ability to control the strength?

    Using Unity 2021.1.12f1 (64-bit)
     
  35. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Because lit shaders are physically based with lighting, and the overdraw from particles means that it's done multiple times per pixel.

    To solve this, most games use cheaper shaders for lit particles that usually aren't PBR and also use opaque rendering, not transparent, but with screen door effect.

    Because it's pretty expensive doing full PBR with just one pass so imagine with particles not being able to prevent overdraw? With opaque rendering, there is no overdraw for depth failed pixels (stuff behind other stuff is discarded).

    I'd recommend sourcing or making a non physically based lit shader for particles. Failing that you can make it render a bit faster using the Low Resolution option under Rendering Pass, which exists because lit transparency is so slow.

    In short it's expected and you should design around it.
     
  36. nevaran

    nevaran

    Joined:
    May 21, 2010
    Posts:
    247
    So basically use it for particle systems that just need a few particles active at one time and are far from the camera?
     
  37. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I didn't say that as a basically. I said as a basically, write or find another shader that isn't PBR, like most AAA games do.

    Then you can have quite a lot more particles and it should look identical. But if you don't want to, then use the low res option under transparency to claw back some more speed.

    Particles will always be slower close up which is why both VFX and regular Particle Systems have a feature to cap how big they can get, regardless if it's an expensive shader or not, since overdraw is the big problem with transparent rendering.
     
  38. nevaran

    nevaran

    Joined:
    May 21, 2010
    Posts:
    247
    Why doesnt the examples come with the non-PBR variants? Also they are using the new visual graph thing, so im guessing it should be relatively easy to convert it to a non-PBR lit shader?
     
  39. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    can you report a bug for this please?
     
  40. nevaran

    nevaran

    Joined:
    May 21, 2010
    Posts:
    247
    I think the problem came from my used textures, though im not sure how that affects it in HDRP
     
    richardkettlewell likes this.
  41. User340

    User340

    Joined:
    Feb 28, 2007
    Posts:
    3,001
    Is it possible to have volumetric smoke in HDRP that responds to nearby lights?
     
  42. Wolfos

    Wolfos

    Joined:
    Mar 17, 2011
    Posts:
    951
    This pack sorely needs some work. These shaders are incredibly limited compared to what's available in the built-in pipeline.
     
  43. projectorgames_unity

    projectorgames_unity

    Joined:
    Oct 15, 2018
    Posts:
    107
    I'm a bit confused why you think the shipped ones would work. Distortion isn't tagged, and the Combine node isn't connected up. This is the shipped shader in the 11.0.0 sample package.

    upload_2022-2-23_0-53-58.png
     
  44. richardkettlewell

    richardkettlewell

    Unity Technologies

    Joined:
    Sep 9, 2015
    Posts:
    2,285
    I never said/thought that..

    If we could get a bug report, we'd be able to look at this.
     
  45. projectorgames_unity

    projectorgames_unity

    Joined:
    Oct 15, 2018
    Posts:
    107
    Submitted as Case 1405493.

    Honestly tho, all of the HDRP particle shaders (for 11.0.0) seem broken. The soft Unlit just doesn't work. Looking into the shader shows that you're multiplying the far plane of the camera by zero. That can't be right?

    upload_2022-2-23_16-44-17.png
     
  46. rimgro_

    rimgro_

    Joined:
    Dec 16, 2018
    Posts:
    1
    hello, are these shaders still relevant? if so, can you help me understand how to add soft particles subshader to unlit shader?
     
    TankThunderbird likes this.
  47. TankThunderbird

    TankThunderbird

    Joined:
    Nov 28, 2016
    Posts:
    2
    Is there an updated package for HDRP 12.1.6 or will the package for v.6 work?