Optimizing For Quest - How & Why [Unity]

Sdílet
Vložit
  • čas přidán 31. 03. 2021
  • Mobile headsets are WEAK, and I'm gonna show you how to avoid those weaknesses. Saving you time and a load of heartbreak. Don't gut your game. Deploy confidently!
    We're a community of game developers, join us! discord.gg/YHKCQP6REp
    #unity #gamedev #vr #optimizations
  • Zábava

Komentáře • 35

  • @dangerdom904
    @dangerdom904  Před 3 lety +4

    If you have any questions, I'm ready to answer them! discord.gg/YHKCQP6REp

  • @onerimeuse
    @onerimeuse Před rokem +1

    I've been digging for this for so long. Thanks for putting this out!

  • @praveenb-xr
    @praveenb-xr Před rokem

    Very Informative man. Subscribed!

  • @Beeshke
    @Beeshke Před 2 lety

    Hey this video is awesome thanks for making it. Very very helpful man. Watched all of it and learned a ton

  • @bugbystudios
    @bugbystudios Před 2 lety

    Thank you for this!!

  • @lxrdwander5031
    @lxrdwander5031 Před rokem

    Thanks so much for this!!!

  • @aliengarden
    @aliengarden Před 11 měsíci

    Absolute banger of a video, underrated. Instant subscribe.

  • @gtipold9009
    @gtipold9009 Před 2 lety

    thanks for the video!

  • @tzuriteshuba2704
    @tzuriteshuba2704 Před 2 lety +1

    great tips man, thanks a lot!

  • @ProjectThirdEyeVR
    @ProjectThirdEyeVR Před rokem

    A very nice video!

  • @r1pfake521
    @r1pfake521 Před rokem +2

    Random bonus tip: Be careful when you import "art assets" from the asset store. Some of them include "demo scripts" which are usually not optimized or just bad code in general. Sure if it is a dedicated code asset then read the reviews or check the code yourself, but never use code from an "art pack". I made this mistake myself, I bought a particle effect pack and a weapon shader effect pack, both of these packs insluded "demo scripts" on their prefabs with very nasty code which caused huge allocations and framedrops. Since then im very careful which components these "art" prefabs actually include.

  • @Thonder
    @Thonder Před 2 lety

    thank you!

  • @antisony2008
    @antisony2008 Před rokem

    awesome

  • @TrentSterling
    @TrentSterling Před 2 lety +1

    Good list of optimizations! Have you profiled URP vs BiRP to make sure URP really performs the best on quest?

  • @ellieelias6336
    @ellieelias6336 Před 2 lety

    since this was in 2021, i wanted to ask. in your experience of how things have come so far, with the quest 3 coming etc., in your opinion, do you think they are going to improve for the use of shadows? If so, how much do you think it might be (or how would I research this - I'm interested in shadow and lighting more specifically)? I don't know anything about this stuff, but you mentioned how shadows went from 0 use to a "maybe but be carful" I'm wondering if things have changed much for vr from a dev standpoint. I just did this week start learning about this! thank you for a great video! just subbed!

    • @dangerdom904
      @dangerdom904  Před 2 lety +3

      The go to methods for creating dynamic shadows have been the same for a long time now (shadow mapping), so really barring some sort of algorithmic breakthrough, which I doubt, we'll be relying on increasing computation for shadows for a while. This means that even if the new headsets get better it is unlikely people will put those extra computational resources towards dynamic shadows as they are easy enough to just bake in (light baking/static lighting).
      As far as researching that kind of thing there's no better way than learning some opengl and writing your own rendering engine/playing around on shadertoy. There's a bunch of good books involving rendering as well. Realtime Rendering, Physically Based Rendering, GPU Gems, Book of Shaders. What you're talking about is called graphics engineering/programming and it's a very exciting field to be in. You would also want to work on your math knowledge or the algorithms might seem intimidating.
      Nothing much has changed in VR dev except different APIs as everyone tries to sort out how to write one program for all the different headsets that are coming out. Same old same old.

    • @ellieelias6336
      @ellieelias6336 Před 2 lety

      @@dangerdom904 wow that is all very helpful!! Thank you so much! I am going to check out this stuff and look into it. I just started watching a video series to learn about using unity and blender and some other free programs too. Thank you again!!

  • @CosplayZine
    @CosplayZine Před 2 lety

    Hmm so even the weakest post processing settings will negatively effect VR? Im see people on Reddit say it can be used for certain effects such as bloom, ao, color grading and vignette. So maybe it depends on your other settings and object related optimization the amount of effect that post processing will have.

    • @dangerdom904
      @dangerdom904  Před 2 lety +1

      So basically you have a rendering budget, let's say 16ms if you're targeting 60 fps. And if you can get everything done in 10ms then you can really add whatever you want on top of that (like post processing), it's just that it's not normally worth it to take up a few milliseconds of the budget for post processing. It's also possible to write custom shaders that just do the post processing in the initial draw call, then it'd kind of be for free. Since the real problem on mobile systems is bandwidth (moving textures around), which post processing involves.

  • @bella-rp2rw
    @bella-rp2rw Před rokem +1

    Hi man,i am creating a unity3d project for VR,on unity3d it runs at more than 200fps,60 banches and nice ms.
    But when i try it on my guest 2 it runs at no more than 42/45 fps and more than 20ms,i tried all the tips in the video,and the problem is on the garbage code.
    My question is,i have exacly 270,3k of garbage code,is it enought to compromise at this level the performances or there is another problem?
    New subscribe✌

    • @dangerdom904
      @dangerdom904  Před rokem +1

      What do you mean 270k of garbage code?

    • @bella-rp2rw
      @bella-rp2rw Před rokem +1

      @@dangerdom904 min 11.0 in that screen that shows the analysis of the app,under the “GC allocate” I have 2.2kb

    • @dangerdom904
      @dangerdom904  Před rokem

      @@bella-rp2rw 2.2kb of garbage is significant yes. Especially if you're allocating that every frame. I would try and get rid of that. You never want any garbage if you can help it.

    • @bella-rp2rw
      @bella-rp2rw Před rokem

      I solved the problem

    • @dangerdom904
      @dangerdom904  Před rokem

      @@bella-rp2rw What was it?

  • @georgegonzalez5322
    @georgegonzalez5322 Před 2 lety

    How would you do outlines without post processing?

    • @dangerdom904
      @dangerdom904  Před 2 lety

      You could write a shader that checks the normal against the camera view direction in the fragment shader. This is normally how you add fresnel shading to an object. It's not going to be perfect but might be good enough. You might also be able to bake a texture that holds the pixels curvature to deal with some of the artifacts of the above strategy. You ~might~ be able to do a depth prepass and then use ddx in the fragment shader but I'm not sure about the performance implications of that.

  • @capitaljay1
    @capitaljay1 Před rokem

    I’m subscribing and going through your videos (and using metas tutorials), but where else can I find information about developing for the quest specifically?

  • @AsylumDWP
    @AsylumDWP Před rokem

    so what happens when my batches are at 712 with 2.3m tris and 5.0m verts :D

    • @dangerdom904
      @dangerdom904  Před rokem

      Lol. You play shutter mode.

    • @dangerdom904
      @dangerdom904  Před rokem

      Of course if you'd like to optimize it there are options. But that would be outside the scope of this video.