EloiStree / CodeAndQuestsEveryDay

Regular research on the Quest for developers.
http://codeandquests.page.link/discord
32 stars 3 forks source link

Code Question: What are the performance and optimisation tips and tricks for Quest ? #204

Open EloiStree opened 5 years ago

EloiStree commented 5 years ago

Quest and optimisation

Default Alt
https://youtu.be/JvMQUz0g_Tk

EloiStree commented 4 years ago

image https://developer.oculus.com/blog/tech-note-unity-settings-for-mobile-vr/

Color Space A linear color space produces more realistic looking lighting. The option of linear or gamma is often stylistic. Linear color space on mobile only works with OpenGL ES 3 or above.

Auto Graphics APIM Uncheck Auto Graphics API, set the Graphics API to OpenGLES 3. OpenGLES 3 is supported on all Mobile devices Oculus VR currently runs on. Other settings, such as linear color space require OpenGLES 3 as the graphics API.

Multithreaded Rendering This should be checked, Multithreaded Rendering will move graphics API calls from the main thread to a separate worker thread. The effects of this will be most noticeable for applications with high CPU usage.

Static Batching Static batching will combine meshes marked as static into one big mesh so long as they share the same material. When multiple meshes are batched together, they can be drawn with a single draw call. This comes at the cost of additional memory and storage space. Turning static batching on is recommended.

Dynamic Batching Similar to static batching, dynamic batching combines non-static meshes into one big mesh. For meshes to dynamically batch, they need to have the same material, contain less than 900 vertex attributes (this often translates to as little as 300 vertices), and not have multi-pass shaders.

There is some CPU overhead for every vertex that is dynamically batched. Because the criteria for dynamic batching is so strict and because there is a CPU cost associated with dynamic batching, dynamic batching might need to be turned off. However, in most cases turning this dynamic batching on is recommended.

GPU Skinning This option should be checked. GPU skinning is supported for VR applications running with OpenGLES 3. GPU Skinning will move the skinning of an animated mesh to the GPU, this should free up CPU resources.

Graphics Jobs Keep this option disabled. Currently, graphics jobs don't work with Dynamic batching.

EloiStree commented 4 years ago

My previous workshop (FR/Eloi)

image

EloiStree commented 4 years ago

Default Alt
https://youtu.be/w0n4fuC4fNU

  1. Don't make realistic game
  2. Don't use post-processing
  3. Adjust Project setting
  4. Turn GPU instancing on materials
  5. Combine your meshs (easy combine & Mesh Gamer)
  6. Use Google Seurat
  7. Amplify Impostors
  8. Use Static lighting & Baking
  9. Occlusion Culling
  10. Remove Detail When needed
  11. Use More Effective Coroutine More
EloiStree commented 4 years ago

ECS: Entity Component System:

Default Alt
https://youtu.be/j4rWfPyf-hk

EC what ?

Default Alt
https://youtu.be/TeyTdbqkHmE image

https://unity3d.com/fr/learn/tutorials/topics/scripting/introduction-ecs


Out of subject: MVC

image

EloiStree commented 4 years ago

Compute Shader

Default Alt
https://youtu.be/i1r0Dv5uZc0

EloiStree commented 4 years ago

One Mesh Pool

image

Example

Default Alt
https://youtu.be/BCLsgSMQo10

EloiStree commented 4 years ago

What is a profiler ?

Default Alt
https://youtu.be/fROTtgZK-Zs

EloiStree commented 4 years ago

Mesh Baking

Example

Default Alt
https://youtu.be/HvJP8IahwIY

EloiStree commented 4 years ago

Top 10 Modeling tip for VR

Default Alt
https://www.youtube.com/watch?v=Djx5WltmTUU

  1. Build to scale
  2. Think like a designer
  3. Pixels over Polygons (Reduce Poly Count) Exception transparency
  4. Sharing data is caring
  5. Use Event texel density
  6. Careful with normal maps
  7. Don't count on reflection
  8. Cut it out with the cutouts (Transparent)
  9. Bake Everything
  10. Use LOD Recap
EloiStree commented 4 years ago

Don't

EloiStree commented 4 years ago

GPU Instancing

Default Alt
https://youtu.be/l3Unh6FE1-s?t=66

EloiStree commented 4 years ago

Draw call

image https://docs.unity3d.com/Manual/DrawCallBatching.html

EloiStree commented 4 years ago

Must know

Occlusion Culling

Default Alt
https://youtu.be/OmuQmydipGg

LOD: Level of detail

Default Alt
https://youtu.be/ifNyVS2_6f8

EloiStree commented 4 years ago

Vertex Coloring

Default Alt
https://youtu.be/swLJV4u1Q2A