Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. We are looking for feedback on the experimental Unity Safe Mode which is aiming to help you resolve compilation errors faster during project startup.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    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:
    881
    we can resume how got hdrp particle at this time ? please
     
  2. sebastianzander

    sebastianzander

    Joined:
    Mar 22, 2018
    Posts:
    22
    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:
    1,592
    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:
    22
    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,401
    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:
    1,592
    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:
    504
    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:
    1,592
    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:
    504
    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:
    8
    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:
    1,592
    Are you able to submit a bug report?
     
  14. marck_ozz

    marck_ozz

    Joined:
    Nov 30, 2018
    Posts:
    8
    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:
    8
    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:
    124
    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:
    3
    @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:
    440
    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,422
    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:
    2,316
    @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:
    1,592
    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:
    2,316
    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:
    2,316
    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:
    1,592
    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:
    2,316
    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. valarus

    valarus

    Joined:
    Apr 7, 2019
    Posts:
    190
    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:
    2
    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
     
unityunity