Search Unity

  1. Unity 2019.1 is now released.
    Dismiss Notice
  2. We've opened up a space to discuss, share feedback, and showcase everything related to the Unity Shader Graph! Come show us what you've made.
    Dismiss Notice

Unity stutters and hitches even in empty scenes, Unreal does not

Discussion in 'Editor & General Support' started by rawalanche, Jan 9, 2019.

  1. rawalanche

    rawalanche

    Joined:
    Aug 26, 2017
    Posts:
    17
    Hi,

    I've been recently playing with both Unity and Unreal, comparing both for the use for realtime VFX. One thing that keeps bothering me is that my Unity editor constantly stutters and hitches, regardless of the scene complexity. The stuttering and hitches are equally severe in the empty 3D template scene, empty HDRP scene or full, complex scene.

    The reason this disturbs me so much is that there is no reason this should be happening. I have i7 5930k, 64GB of RAM and GTX1080Ti with latest drivers. I tried to disable every other windows program that was not completely essential to running windows, and even the, Unity editor still stutters even in empty scene. Alongside that, I can run UE4 editor with completely overkill scene intended for non interactive VFX, and it still runs butter smooth.

    I tried to record the difference on a 60FPS video, unfortunately I succeeded only partially. While the video does show stuttering and hitches of Unity editor, when it's showing UE4 editor, the recording is not nearly as smooth as the actual interaction I saw was.



    Does anyone know why this is happening and if there is a fix? Unity seems to have quite a few things going for it in my comparison, but unfortunately lack of workflow smoothness is a big downside.
     
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    3,914
    At what point in the video should we be looking for the issue? All looks quite smooth to me!
     
    Joe-Censored likes this.
  3. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    3,002
    @JeffDUnity3D my guess is that he's talking about around 0:18 when he's yanking the entire scene around, it's stuttering a little bit.

    @rawalanche I do not know what kind of camera control are you using, but you really should write a better one, Unity is capable of moving the camera perfectly smoothly, of course you need to actually develop it that way
     
  4. rawalanche

    rawalanche

    Joined:
    Aug 26, 2017
    Posts:
    17
    It's a bit harder to see on the video unfortunately, but it's just not smooth. It hitches all the time.

    @Lurking-Ninja
    It doesn't happen only in play mode. In fact it happens in play mode a lot less. It mainly happens when navigating scene view in editor. Obviously, I am not able to rewrite that :)

    Here's my attempt at better example. I have recorded the video at 120FPS, and then re-exported at 60FPS. So it still runs 60FPS at 50% the speed. It should be more obvious now.

    Unity:


    Unreal:


    On unity example, you can clearly see that while mouse cursor movement is perfectly smooth, the actual rendered scene movement framerate is inconsistent. It may be harder to see but it's very easy (and uncomfortable) to feel. Unfortunately, Unreal hides mouse cursor during scene view navigation, but you still can see it's significantly smoother.

    I am really confused about this, as my hardware is more than powerful enough, and I am at the end of my wits when it comes to eliminating any software interference. Especially when Blender, 3ds Max, Unreal and all the other similar 3D software runs absolutely fine.
     
    Quatum1000 and Lurking-Ninja like this.
  5. Peter77

    Peter77

    Joined:
    Jun 12, 2013
    Posts:
    3,345
    We experience the same problem, across several Windows 10 PC's and different Unity versions (5.6, 2017.4 and 2018). Enabling "Animate Materials" in the Scene View reduces the problem for us a little, but it's not fixing it.
     
  6. rawalanche

    rawalanche

    Joined:
    Aug 26, 2017
    Posts:
    17
    Alright, I was able to push it even further, and record at 240FPS, then re-export at 60, getting 4 frames out of one realtime frame. Now the issue is very obvious:

    Unity:


    Unreal:


    The difference of framerate consistency between Unity and Unreal is significant. Unity is really only piece of 3D software or a game on my PC that ever did anything like this.
     
  7. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    5,055
    you can also try profiling the editor, maybe it shows some spikes.
     
  8. rawalanche

    rawalanche

    Joined:
    Aug 26, 2017
    Posts:
    17
    I guess I could. Unfortunately I am not really a developer, just an artist. I know basics of profiling in UE4, but I've never used Unity profiler so I really don't know what to look for and how to interpret the data (yet). I tried just opening the profiler panel, clicking profile editor button and selecting one of the frames with the spike. I have no idea what what to read from it though. :/

    upload_2019-1-10_9-12-31.png
     
  9. rawalanche

    rawalanche

    Joined:
    Aug 26, 2017
    Posts:
    17
    Just shooting from the hip here: Do any of those computers have one of these?:

    GTX1080Ti
    Oculus Rift connected
    Mouse with 1000hz polling rate
    Sound Blaster sound card
    Google Backup and Sync client
     
  10. rawalanche

    rawalanche

    Joined:
    Aug 26, 2017
    Posts:
    17
    So I take it no solution?
     
  11. Atair

    Atair

    Joined:
    Oct 16, 2015
    Posts:
    42
  12. Peter77

    Peter77

    Joined:
    Jun 12, 2013
    Posts:
    3,345
    I have a NVIDIA Quadro K620 on this PC.

    No VR related hardware connected at all.

    It's a Logitech M-U0007, which seems to have 1000hz according to my research.

    No, Realtek High Definition Audio.

    No.
     
  13. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    5,508
    I think maybe this was a mac only issue but, what is the polling rate of your mouse?
     
    bjarkeck likes this.
  14. bjarkeck

    bjarkeck

    Joined:
    Oct 26, 2014
    Posts:
    243
  15. rawalanche

    rawalanche

    Joined:
    Aug 26, 2017
    Posts:
    17
    @Atair
    Hey. Unfortunately I can not test that. I do have 3ds Max, but only 2016. I ended by maintenance at that version, so I don't have access to any newer ones. That being said. I don't have HiDPI screen nor do I run any DPI scaling in windows. It's regular 1920x1200 screen with 100% scaling.

    @bjarkeck
    Yeah, I think it may be related. As @Peter77 wrote, he has also high polling rate mouse (1000hz). I wonder if unity is actually trying to process all those 1000 mouse events each second.
     
  16. Vectorbox

    Vectorbox

    Joined:
    Jan 27, 2014
    Posts:
    134
    I'd be surprised if it's the source of the problem, but just in case, does Logitech SetPoint offer control of the polling rate ?

    Logitech
    SetPoint (Windows / Mac)
     
    Last edited: Jan 14, 2019
  17. rawalanche

    rawalanche

    Joined:
    Aug 26, 2017
    Posts:
    17
    Vectorbox likes this.
  18. bjarkeck

    bjarkeck

    Joined:
    Oct 26, 2014
    Posts:
    243
    Yup you're right, can confirm as well. I have a steelseries keyboard and mouse, both was at 1000hz, lowered them to 250 and it felt a lot smoother.

    Even though this fixes it, there are still way more events than necessary firing in the editor IMO. Easy optimization for Unity to make in order to make the editor feel a lot more smooth on a lot of PC's .

    Here is how it looks at 125hz:
    125hz.png

    And already at 250hz it starts looking like this:
    250hz.png
     
    Last edited: Jan 14, 2019
    Quatum1000 likes this.
  19. rawalanche

    rawalanche

    Joined:
    Aug 26, 2017
    Posts:
    17
    Let's hope for a fix then :)
     
  20. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    5,508
    Nah, it's been that way for a while.
     
    joshcamas likes this.
  21. rawalanche

    rawalanche

    Joined:
    Aug 26, 2017
    Posts:
    17
    I'd like to think that it's because no one really bothered to notice, or noticed and did not bother to report, or noticed, and reported, but did not bother to investigate. Now that we exactly know what causes it, I don't see a reason why it wouldn't be fixed.
     
  22. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    3,002
    I think it would be the best if you submit a bug report about the issue. You can incorporate @bjarkeck's findings as well. I'm pretty sure the devs will pay attention to it once they get a report of it with measurement and cause.

    And if you do and post the case number here, I'm sure @JeffDUnity3D would pass along to them.
     
    LeonhardP likes this.
  23. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    5,508
    Too lazy to look it up now, but I think it has been reported already. Like 9 months ago.
     
  24. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    3,002
    Whatever then, I have a low-rate mouse, so it does not apply to me.
     
  25. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    5,508
    Exactly. That's an AMAAAZING attitude. In Greek we have a saying that roughly translates to "Do good and throw it in the sea". Seems appropriate for submitting bug reports to Unity.
     
    Last edited: Jan 15, 2019
    joshcamas and WildStyle69 like this.
  26. bjarkeck

    bjarkeck

    Joined:
    Oct 26, 2014
    Posts:
    243
  27. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    5,508
    Cool :)

    As a sidenote: You may not want to link to fogbugz directly. It's not a big issue, but we can see your other reported issues from there as well and you may have info in the bug report you don't want the public to see.

    Generally just the case number is enough.

    (and maybe later a link to the issue tracker. bugs usually get on the issuetracker after QA has confirmed the bug)
     
    LeonhardP and bjarkeck like this.
  28. bjarkeck

    bjarkeck

    Joined:
    Oct 26, 2014
    Posts:
    243
    Thanks for the heads up, good to know! Did it from an old account it seems, so luckily don't have anything in particular in there.
     
  29. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    1,337
    Thank you for submitting the bug report! QA was able to reproduce the behaviour and the devs are going to look into it.

    You can vote for the resolution of this issue and follow the resolution process here: https://issuetracker.unity3d.com/issues/input-polling-rates-drastically-decreases-editor-performance

    As far as I can tell it had not been reported before, although we recently fixed a similar issue in the Linux editor: https://issuetracker.unity3d.com/is...asset-pack-and-mouse-with-1000hz-pooling-rate

    Fortunately, there are quite a few fishermen here at Unity.
     
  30. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    5,508
    So it all works out in the end, cool :)
     
  31. rawalanche

    rawalanche

    Joined:
    Aug 26, 2017
    Posts:
    17
    They are apparently not very fast fishermen though. It's been a while, 2019 beta got out, but this is still not fixed :)
     
  32. rawalanche

    rawalanche

    Joined:
    Aug 26, 2017
    Posts:
    17
    Hi,

    I'd just like to congratulate to Unity Technologies for the 2 month anniversary of this (still unfixed) bug. Great job! Keep it up! :)
     
    nxrighthere and e199 like this.
  33. nxrighthere

    nxrighthere

    Joined:
    Mar 2, 2014
    Posts:
    444
    That's great what about the fish factory? 2 months of silence is not how we get tasty sushi.

    But seriously, it's impossible to switch the polling rate from 500Hz to 125Hz on my mice (as many other people can't do this I presume). These stutters are quite annoying.
     
  34. rawalanche

    rawalanche

    Joined:
    Aug 26, 2017
    Posts:
    17
    3 month anniversary coming up! :)
     
  35. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    1,337
    Some fish are bigger than others. But it looks like we have a potential fix in sight.
     
  36. rawalanche

    rawalanche

    Joined:
    Aug 26, 2017
    Posts:
    17
    According to the bug report it's now fixed, but the fix is still not even in 2019.1.0f2. Very disappointing :/