Search Unity

Probuilder question (Jerking FPS).

Discussion in 'World Building' started by N1warhead, Jun 16, 2018.

  1. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    Hello everyone. I have a question about ProBuilder.

    I've created a room for testing it out for my game.
    And I've noticed if I go into play mode, it like every 1.5 to 2 second has a frame spike.
    Is there a reason this happens? It's a big frame spike. Goes from like 400 FPS down to 80, so you can notice the jerk when walking around.

    It stops if I export it as an OBJ. But do I really have to export to OBJ just to use it?

    I'm on 2018.1.1f1
     
  2. gabrielw_unity

    gabrielw_unity

    Unity Technologies

    Joined:
    Feb 19, 2018
    Posts:
    963
    Hi! Hmm, that definitely shouldn't happen. PB should have zero effect in-game (unless you explicitly ask it to do stuff, like runtime mesh editing). Any errors, and are you able to check the profiler to see where the spike is coming from? Also, just to check- you are using the latest ProBuilder from PackageManager, correct?

    Thanks! -gw
     
  3. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884

    Thank you for responding.

    The weird part is, it don't always happen, just most of the time it does.
    Not exactly sure where it can be coming from. At first I thought perhaps it was something to do with the mouse, but it's constantly at 0.6kb of Garbage Collection. Not sporadic like the issue.

    No idea why Gfx.WaitForPresent is running (VSync is off), let alone why it's taking 41.63 ms at the peaks of this issue. (80.3%).
    Here's a profiler picture for ya.

    Profiler.png


    And this is the room, as you can tell, it's not really anything advanced.
    Just a simple room, empty with a couple lights.

    Room.png


    This is just a test scene though, nothing fancy as you can tell.
    I did run into this same issue before you guys ever bought it, so I stopped using it, figured it may have just been me, or supposed to happen.
     
  4. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    Oh and yes, it's the latest through package manager. Sorry for not saying that before.
     
  5. gabrielw_unity

    gabrielw_unity

    Unity Technologies

    Joined:
    Feb 19, 2018
    Posts:
    963
    Hi! Thanks for the extra info. I see the Vsync info...but you've turned that off...not sure what else would cause that, or how it could be related to PB. Have tried to repro here but not seeing the same. Do you see this same issue in all Unity projects that include PB? If so, it'd probably be best to file an official bug report on Fogbugz, include a test scene. Sorry!
     
  6. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    I believe I've finally nailed it down to the problem, but I can't seem to figure out which might be causing it.
    It turns out both Post Processing Stack V1 and V2, just don't like probuilder.

    Not sure which thing inside the stack is causing the hiccups.
    But if I turn the stuff off, it goes away entirely and FPS goes to a near stable 900 FPS rather than 300 FPS that jumps to 98 FPS every 1 to 1.5 seconds.

    Here's images of the setup so you can try to replicate it.

    (The tabs that aren't opened) are just regular default settings.

    POSTSTACK.png PostStack_02.png PostStack_03.png



    EDIT: I know the profiler complains about Culling issues, etc.
    PostStack_04.png

    But as you can see the Post Stack has an 80 byte GC, for no reason, never have this issue outside of Probuilder.

    Heck just the other day I was in a scene for another game with over 20 million polygons, using exact same Post Stack settings, steady FPS, not jumps. So I know it's not my Hardware.

    EDIT 2:
    I am on 2018.1.1f1
    Also am using the Substance Plugin so I can use Substance Materials. Materials are 2048 x 2048 in size, just 2 Materials), floor (Wall and ceiling share a single Material).
     
    Last edited: Jun 21, 2018