-
Notifications
You must be signed in to change notification settings - Fork 2
Unity Optimization
JungSu Kim edited this page Jan 27, 2016
·
1 revision
- http://docs.unity3d.com/Manual/OptimizingGraphicsPerformance.html
- http://docs.unity3d.com/Manual/MobileOptimisation.html
- http://blogs.unity3d.com/2012/03/23/shadowgun-optimizing-for-mobile-sample-level/
- http://malideveloper.arm.com/downloads/Unite_2013-Optimizing_Unity_Games_for_Mobile_Platforms.pdf
- http://blogs.unity3d.com/wp-content/uploads/2011/08/FastMobileShaders_siggraph2011.pdf
- http://developer.android.com/reference/android/opengl/ETC1Util.html
- https://developer.android.com/guide/topics/graphics/opengl.html#textures
- http://malideveloper.arm.com/develop-for-mali/tutorials-developer-guides/partner-tutorials/mobile-graphics-with-enlighten-and-unity-5/
- http://malideveloper.arm.com/engage-with-mali/events/unite-2014/
- http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.100140_0100_00_en/Chunk533423422.html
- http://www.slideshare.net/agebreak/141206-42456391?qid=71709ebf-8ffe-475b-bef5-619e1ab3df48&v=qf1&b=&from_search=1
- http://www.uzoo.in/?mid=master_codesnippet&order_type=desc&document_srl=539&listStyle=viewer
- http://unityindepth.tistory.com/
- http://www.slideshare.net/MrDustinLee/ss-27739454?related=3
- http://www.slideshare.net/olambdao/unity3d-2d-20130424?related=1
- http://www.slideshare.net/hnam7/unite-2013-optimizing-unity-games-for-mobile-platforms-37933478
- http://smilemugi.net/wordpress/archives/227
- http://www.slideshare.net/AlexanderDolbilov/google-i-o-2014?related=1
- http://www.slideshare.net/flashgamm/unity-internals-memory-and-performance?related=2
- http://techholic.co.kr/archives/17907
- https://github.com/keijiro/ChromaPack
- http://en.wikipedia.org/wiki/Chroma_subsampling
- https://developer.apple.com/library/ios/documentation/3DDrawing/Conceptual/OpenGLES_ProgrammingGuide/BestPracticesforShaders/BestPracticesforShaders.html
- http://ozlael.tistory.com/32
- Unity manual : Mobile Optimisation -http://docs.unity3d.com/kr/current/Manual/MobileOptimisation.html
- Unity manual : Practical Guide to Optimization for Mobiles -* http://docs.unity3d.com/kr/current/Manual/MobileOptimizationPracticalGuide.html
- Unity manual : Optimizing Graphics Performance -http://docs.unity3d.com/Manual/OptimizingGraphicsPerformance.html
- Optimizing unity games (Google IO 2014) -http://www.slideshare.net/AlexanderDolbilov/google-i-o-2014
- Unity Internals: Memory and Performance (Moscow, 2014) -http://www.slideshare.net/flashgamm/unity-internals-memory-and-performance?related=2
- 그래픽 최적화, 어디까지 가봤니 (Unite 2015 Seoul) -http://cafe.naver.com/unityhub/21021
- 유니티 그래픽 최적화, 어디까지 해봤니? (NDC15) -http://ndcreplay.nexon.com/NDC2015/sessions/NDC2015_0039.html#k%5B%5D=%EC%9C%A0%EB%8B%88%ED%8B%B0
- Fast mobile shaders or rather Mobile! Fast! (siggraph2011) - http://aras-p.info/texts/files/FastMobileShaders_siggraph2011.pdf
- Unity: iOS and Android - Cross-Platform Challenges and Solutions (siggraph2012) -http://www.realtimerendering.com/downloads/MobileCrossPlatformChallenges_siggraph.pdf
- Performance Optimization Tips and Tricks for Unity (unite 2012) -https://www.youtube.com/watch?v=jZ4LL1LlqF8 SHADOWGUN: OPTIMIZING FOR MOBILE SAMPLE LEVEL (2012) -http://blogs.unity3d.com/kr/2012/03/23/shadowgun-optimizing-for-mobile-sample-level/
- 유니티 최적화 테크닉 총정리 (Unite 2015 Seoul) - http://cafe.naver.com/unityhub/22631
- Defense Technica post-Mortem (DevTree 14) -http://www.slideshare.net/illustor/devtree-illu optimizing unity games for mobile platforms (Unite 2013) -http://www.slideshare.net/hnam7/unite-2013-optimizing-unity-games-for-mobile-platforms-37933478
- "14일만에 0에서 60프레임 만들기" Unity3D를 사용하여 우리의 게임을 최적화시키면서 배웠던 것들 -http://unityindepth.tistory.com/30
- 유니티3D 게임 리소스 최적화? 3가지만 기억해라 -http://techholic.co.kr/archives/17907
- Unity3D :: 게임 최적화 기법 - http://vallista.tistory.com/entry/Unity-%EA%B2%8C%EC%9E%84-%EC%B5%9C%EC%A0%81%ED%99%94-%EA%B8%B0%EB%B2%95
- [Unity] 유니티 프로그래머가 알아야 할 최적화 코드작성법 - http://geekcoders.tistory.com/56
- Unity and C# : Performance Optimisation tips -http://www.codeproject.com/Articles/804021/Unity-and-Csharp-Performance-Optimisation-tips
- https://software.intel.com/sites/default/files/managed/a8/0c/Unity_Doc_CCEFinal.pdf
- 삼국지조조전 Online의 unity3D 아트 리소스 최적화 기법들 - http://ndcreplay.nexon.com/NDC2015/sessions/NDC2015_0062.html#c=NDC2015&t[]=%EB%B9%84%EC%A3%BC%EC%96%BC%EC%95%84%ED%8A%B8%26%EC%82%AC%EC%9A%B4%EB%93%9C
- http://unitycoder.com/blog/2014/04/23/unity-optimization-tips/
- http://ozlael.tistory.com/32
- 예측하지 말고 계측하라!
- 프로파일러로 어플리케이션을 측정하라(Take measurements of your application with a profiler.)
- 병목지점을 분석하라(Analyze the data to locate the bottleneck.)
- 어떤부분의 최적화를 적용할지 결정하라(Determine the relevant optimization to apply.)
- 최적화된 작업을 검증하라(Verify that the optimization works.)
- 최적화 작업된 결과가 만족스럽지 못하다면 Step1로 돌아가라(If the performance is not acceptable return to step 1 and repeat the process.)
- 스크립트(Script)
- 에니메이션(Animation)
- 그래픽스(Graphics) / 쉐이더(Shader)
- 물리(Physics)
- 플랫폼 종속 부분(Platform Specific)
- 도구
- 유니티 프로파일러
- AP벤더별 프로파일러(Adreno, Nvidia, ARM, PowerVR)
- Android Studio Monitor
- Xcode Instruments
- 확인내용
- 모델 렌더링 시간 확인
- 포스트 이펙트 시간 확인
- 이펙트 시간 확인
- LOD(Level of Detail)
- Occlusion Culling
- LightMap
- Static/Dynamic Batching
- Combined Mesh
- SharedMaterial
- SharedMesh
- Procedural Mesh
- Procedural Material
- Mesh Baker
- Texture Compression
- Imagination Technologies
- PowerVR
- Series 5, 5XT, 6, 6XT, Wizard
- ARM
- Mali
- Utgard (Mali400), Midgard (Mali T624)
- Qualicomm
- Adreno
- Adreno 2xx, 3xx, 4xx
- nVidia
- Tegra
- Tegra 2, 3, 4, K1
- 눈에 잘보이는? 최적화 설정을 사용하라(Use more eye-candy on higher performance configurations)
- 적정 해상도(Resolution)
- Post-processing
- MSAA(Multisample anti-aliasing) : http://en.wikipedia.org/wiki/Multisample_anti-aliasing
- Anisotropy : http://en.wikipedia.org/wiki/Anisotropy
- 쉐이더(Shaders)
- Fx/particles density, on/off
- 모바일 개발자 체크리스트(Mobile Developer Checklist)
- Keep the number of materials as low as possible.
- This makes it easier for Unity to batch stuff. Use texture atlases (large images containing a collection of sub-images) instead of a number of individual textures.
- These are faster to load, have fewer state switches, and are batching friendly.
- Use Renderer.shaderedMaterial instead of Renderer.material if using texture atlases and shared materials.
- Use light mapping instead of realtime lights where ever possible.
- Adjust pixel light count in quality settings. Essentially only the directional light should be per pixel, everything else - per vertext. Certainly this depends on the game.
- Experiment with Render Mode of Lights in the Quality Settings to get the correct priority.
- Avoid Cutout (alpha test) shaders unless really necessary.
- Keep Transparent (alpha blend) screen coverage to a minimum.
- Try to avoid situations where multiple lights illuminate any given object.
- Try to reduce the overall number of shader passes (Shadows, pixel lights, reflections).
- fully opaque objects roughly front-to-back.
- alpha tested objects roughly front-to-back.
- skybox.
- alpha blended objects (back to front if needed.)
- Post Processing is expensive on mobiles, use with care.
- Particles: reduce overdraw, use the simplest possible shaders.
- Double buffer for Meshes modified every frame:
void Update()
{
// flip between meshes
bufferMesh = on ? meshA : meshB;
on = !on;
bufferMesh.verticles = vertices; // modification to mesh
meshFilter.sharedMesh = bufferMesh;
}
- Avoid alpha-testing shaders; instead use alpha-blended versions.
- Use simple, optimized shader code (such as the "Mobile" shaders that ship with Unity).
- Avoid expensive math functions in shader code (pow, exp, log, cos, sin, tan, etc). Consider using pre-calculated lookup textures instead.
- Pick lowest possible number precision format (float, half, fixedin Cg) for best performance.
- Don't use more than a few hundred draw calls per frame on mobiles.
- FindObjectsOfType (and Unity getter properties in general) are very slow, so use them sensibly.
- Set the static property on non-moving objects to allow internal optimizations like static batching.
- Spend lots of CPU cycles to do occlusion culling and better sorting (to take advantage of Early Z-cull).
- Physics can be CPU heavy. It can be profiled via the Editor profiler. If Physics appears to take too much time on CPU:
- Tweak Time.fixedDeltaTime (in Project settings -> Time) to be as high as you can get away with. If your game is slow moving, you probably need less fixed updated than games with fast action. Fast paced games will need more frequent calculations, and thus fixedDeltaTime will need to be lower or a collision may fail.
- Physics.solverIterationCount (Physics Manager).
- Use as little Cloth objects as possible.
- Use Rigidbodies only where necessary.
- Use primitive colliders in preference mesh colliders.
- Never ever move a static collider (ie a collider without a Rigidbody) as it causes a big performance hit. It shows up in Profiler as "Static Collider.Move" but actual processing is in Physics.Simulate. If necessary, add a Rigidbody and set isKinematic to true.
- On Windows you can use NVidia's AgPerfMon profilling tool set to get more details if needed.
- UNITE Conference
- Unity5 Features
- Unity 2D
- Unity AI
- Unity Animation
- Unity AR(Augmented Reality)
- Unity Assets
- Unity Build
- Unity Cache Server
- Unity Crypto
- Unity Debug
- Unity Easing
- Unity Editor
- Unity Effects
- Unity External Device
- Unity Game Decompile
- Unity Game Logic
- Unity Graphics
- Unity Hardware
- Unity HoloLens
- Unity Library
- Unity Lighting
- Unity Live2D
- Unity Networking
- Unity Optimization
- Unity Particle System
- Unity Physics
- Unity Precedural
- Unity Profiler
- Unity Rendering
- Unity Service
- Unity Shader
- Unity Testing
- Unity Variation
- Unity Windows
- Unity Things