Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Graphical errors with HDRP Motion-Blur

Discussion in 'High Definition Render Pipeline' started by CortiWins, Mar 21, 2020.

  1. CortiWins

    CortiWins

    Joined:
    Sep 24, 2018
    Posts:
    150
    When i have hdrp-motion blur activated, it leads to a glitch-like flittering back and forth on models.
    The movement is the camera rotating around an object. Its the CinemachineFreeLook component. The flicker does not only appear on the model that is the target of focus but also round them. It seem to be related to the rotation.
    • Unity 2019.3.4f1
    • HDRP Version 7.18 & 7.3.1 tested.
    • Glitsch exists on both an imported model and the HDRP example hammer.
     

    Attached Files:

  2. CortiWins

    CortiWins

    Joined:
    Sep 24, 2018
    Posts:
    150
    I still got the problem. I can't be the only person using HDRP-MotionBlur and CinemachineFreeLook, am i?
     
  3. fildax

    fildax

    Joined:
    Apr 7, 2017
    Posts:
    37
    You are not alone. I have very similiar problem. No idea how to fix it though.
     
  4. M4dR0b

    M4dR0b

    Joined:
    Feb 1, 2019
    Posts:
    108
    Feel you, same problem for 2019.3.5f1 and no idea what to do. For now I just put a very small value in the Volume Override so it's less noticeable.
     
  5. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,437
    I noticed in more recent HDRP versions, a lot (or all) of the post-process settings are enabled by default. I had to specifically place motion blur in my post-process volume override settings and set the motion-blur to zero in order to have no motion blur.

    In previous HD package versions this was not necessary. I'm just throwing that out there, I don't know if it would fix your problem though.
     
  6. Tomas-Kiniulis

    Tomas-Kiniulis

    Unity Technologies

    Joined:
    Apr 27, 2017
    Posts:
    55
    Hey CortiWins,

    If you are using 7.3.1, try expanding the advanced settings cogwheel on your Motion Blur override and adjust the Camera Rotation Velocity Clamp until the result is satisfying. This should address your flickering issue while orbiting around an object. There has been a recent fix for this https://github.com/Unity-Technologies/ScriptableRenderPipeline/pull/5973 so if you use 7.1.8 the slider might not work
     
  7. Sheynes

    Sheynes

    Joined:
    Mar 27, 2017
    Posts:
    66
    I had this same problem https://gyazo.com/3f1bc843bcd0f265e25048592937e9fa
    Unfortunately the camera rotation velocity only helped a bit, since it cannot go futher than 0.2.
    Though, overriding the blur effect by deactivating it totally solved the issue.
     
  8. francescoc_unity

    francescoc_unity

    Unity Technologies

    Joined:
    Sep 19, 2018
    Posts:
    193
    Hi,

    It looks like the velocities that your object produce are wrong for some reason. Motion blur here is probably showing you the issue of incredibly large velocities being rendered.

    Can you please file a bug so we can verify?
     
  9. zeropointblack

    zeropointblack

    Joined:
    Jun 8, 2020
    Posts:
    199
    did you just suggest that completely disabling motion blur is the solution to better motion blur? or do you mean disabling something else?

    because i, (probably like everyone else) am also experiencing this issue. have been for the last year.

    i can get convincing background motion blur, but no matter what settings i change, (even the secret cog settings), the slightest touch of my camera rotating around my player causes my player to look like its been sucked through a black hole.

    so, has anyone found a solution to this problem yet? better question, is this considered "normal" for HDRP motion blur? i dont recall it being this bad before with the standard pipeline motion blur.
     
  10. zeropointblack

    zeropointblack

    Joined:
    Jun 8, 2020
    Posts:
    199
    hi, does anyone who works for unity know how to get proper motion blur with HDRP? what settings do you commonly use? because a lot of us really need to know if our project is broken/glitched, and if we need to give up or find another solution.
     
    oleg_v likes this.
  11. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    Hey, could you please file a bug as Francesco suggested above?

    There can be many reasons for corrupted motion vectors on certain assets. Without a good repro project, it can be difficult to help. For instance, are you using custom shaders? Did you activate motion blur on them? Do you use Skinned Mesh Renderers? Etc.

    It's also a good start to look into the current debug view for motion vectors, see: https://docs.unity3d.com/Packages/c...der-Pipeline-Debug-Window.html#RenderingPanel
     
  12. zeropointblack

    zeropointblack

    Joined:
    Jun 8, 2020
    Posts:
    199
    that sounds great. better yet, is there a way to get REAL motion blur, instead of whatever this crap is doing?

    like, for example, i dont know, cant we take 2 frames, maybe 3 or more, and just store them in a cache somewhere and interpolate between them, or something like that? or is that just too expensive? would at least fix the Z depth issues, not to mention this velocity thing.

    or any way to get the lerp or whatever is going on to TRAIL BEHIND instead of pulling from both sides? can we get into the code to modify it?

    motion blur 2.png
    I almost cant believe the intensity is at 1 either.


    motion blur 1.png
    NOTICE BACKGROUND IS ALMOST NOT BLURY ^ ^ ^ camera rotating around player.

    motion blur 6.png
    this would almost pass as good, if it werent for the fact that the camera is almost not moving at all. good for background, bad for foreground.

    no matter what settings i try, i basically cant get the background and foreground to produce a realistic result. either one is off or not working and one is passable, then its the other way around. its pretty awful.

    before i waste time filing a bug, is this NOT normal?
     
    oleg_v likes this.
  13. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    Hey, as said above, a bug report with a small repro project will be more helpful, so that we can look into it. It's impossible to judge the issue on static screenshots, as we have no idea how fast you're moving the camera. You might be moving the camera at very high speed and taking a screenshot and expecting a movie-quality accumulation motion blur that cannot be achieved in real-time, or you might be having a problem with the asset itself that corrupts the motion vectors (and the motion blur as a consequence). Also, we don't know which version of HDRP and Unity you're using.

    Looking at your second screenshots with the motion blur settings, a value of 40.15 for the intensity indeed isn't going to work well at all, because the velocities will be insanely high, so I'm not really surprised you feel like the objects are "sucked through a black hole". Also, the more intensity you want, the more sample you should use, to minimize artifacts. Increasing the Depth Comparison Extent will also help with leaking between foreground and background btw.

    It would also be good to know what your expectations are. If you want a cinematic butter-smooth low-shutter speed motion blur when moving the camera at very high speed, you will have a hard time finding a real-time game engine able to produce these at the moment. ;)

    Playing with it in the HDRP template for a minute or two, it's perfectly achievable to get smooth good quality motion blur even when moving the camera left and right extremely fast, with reasonable settings, and very few artifacts as a result. Compared to other motion blurs I've used in the past in other game engines, the one in HDRP 10 delivers good results.

    Frame taken from an OBS recording:
    upload_2021-1-9_15-58-43.png
     
    Last edited: Jan 9, 2021
  14. zeropointblack

    zeropointblack

    Joined:
    Jun 8, 2020
    Posts:
    199
    what you have provided in that screenshot is exactly what we want and expect from real-time motion blur. it sounds like you may not have run into what the rest of us are complaining about. we want the object in the middle of the rotation to not blur, while things around it, blurring very heavily. thats perfect. instead we are seeing the exact opposite. also, if i do manage to get something close to that, with the COG settings, the blur on the character jumps to black hole mode immediately after speeding up camera rotation just a touch. so very bad results that way as well.

    also, if you notice, my first screenshot shows an intensity of 1 with 64 samples, but the problem persists; even with moving the camera slowly around the players. (ive tried two different players.)

    i am using:

    UNITY - 2019.4.14f1 LTS
    HDRP - 7.3.1

    i wont waste yours or my time trying to fix it in this old, LTS version of unity. it looks like it may be worth it to attempt upgrading yet again (which usually ruins my projects, but ill be sure to backup and try again).


    question:

    i notice that screenshot says 2021.1.0b, am i to assume this is a beta version? also, not very stable? is it not advisable to upgrade to this version? any idea the most stable release of both items with the latest motion blur settings? it looks like we need those extra settings, or at least should give a newer release a try, because, without an upgrade, what could fix the velocity data for the objects in the middle of the screen? can we tweak this ourselves?
     
  15. zeropointblack

    zeropointblack

    Joined:
    Jun 8, 2020
    Posts:
    199
    update: I have noticed in the scene viewport, i can get proper motion blur rotating around the player IF i have the viewport MORE than a 16:9 widescreen ratio (like in your screen shot. id like to see if its the same in the GAME view). anything square or closer to vertical completely destroys the motion blur. so that seems to be part of the issue. BUT, this doesnt help the game window which stays glitchy no matter the ratio. strange.


    motion blur 7.png
    here is an example of it almost working in the scene view, but checkout whats happening to that tree...
     
    Last edited: Jan 9, 2021
  16. pierred_unity

    pierred_unity

    Unity Technologies

    Joined:
    May 25, 2018
    Posts:
    433
    Hey, thanks for the precision about the version you use. This explains many of the issues you see.

    The version of HDRP I use in my capture is HDRP 10.2.2, it's available in the Final release of Unity 2020.2 (public), and it contains a ton of improvements and stability fixes.

    (I'm using Unity 2021.1 for some other tests at the moment, but it's the same HDRP version as the one available in Unity 2020.2)

    HDRP 7.3.1 is fairly old, and there have been many improvements to motion vectors/TAA/motion blur for HDRP 10, so I would recommend testing your project with a more recent version if you can.
     
    Last edited: Jan 10, 2021
    zeropointblack likes this.
  17. zeropointblack

    zeropointblack

    Joined:
    Jun 8, 2020
    Posts:
    199
    so i tried the new versions. it still looks terrible. you guys definitely need to work on it some more. specifically whatever is going on with the velocity data, and things directly in the middle of the camera rotation which are basically not moving at all, or very little, looking too blurry, no matter what settings i try.
     
  18. zeropointblack

    zeropointblack

    Joined:
    Jun 8, 2020
    Posts:
    199
    im wasting too much time trying to get good results with HDRP motion blur. how are the motion vectors / velocity data calculated? is this world space position and rotation, or post screen space Z buffer type stuff?

    have you confirmed your motion blur works on a 3rd person character? if so, is there any video proof of this? id like to see it, and your settings.

    the closest thing i can get to usable motion blur on both first AND third person, is to clamp motion and rotation to the ridiculously low .02, which basically has the motion blur turn ON and OFF like a switch to a set low amount of blur, completely removing any dynamic acceleration of intensifying blur as the camera is moved or rotated more quickly.

    any number higher than that completely breaks the effect. its unusable. if you can show me the effect working on a character, in a real world game scenario, i will provide a sample project for you to check. can we agree on that.

    edit: there appears to be a problem with how the object movement motion blur and camera rotation/movement motion blur are computed together. i can get pretty good results with one or the other active (by as far as i can tell, disabling object motion blur with a max velocity 0 clamp), on a 3rd person player, but so far not together. and when one or the other is off, the background wont blur. so cant use this method.
     
    Last edited: Jan 18, 2021
  19. francescoc_unity

    francescoc_unity

    Unity Technologies

    Joined:
    Sep 19, 2018
    Posts:
    193
  20. Enigma229

    Enigma229

    Joined:
    Aug 6, 2019
    Posts:
    136
    Is motion blur in HDRP still an issue for users?