Unity-Technologies / AutoLOD

Automatic LOD generation + scene optimization
https://blogs.unity3d.com/2018/01/12/unity-labs-autolod-experimenting-with-automatic-performance-improvements/
Other
1.85k stars 215 forks source link

Simulated Mesh Simplifier #4

Closed chanfort closed 6 years ago

chanfort commented 6 years ago

Firstly, nice work as for the first release.

While others are talking about Simplygon and InstaLOD, I noticed that there is also provided here the Simulated Mesh Simplifier. This one, different from other two, does not seem to require any external plugins and seems to be written from scratch.

I was trying to test a bit recently by importing high-polycount icosphere from Blender to Unity. The AutoLOD creates two additional LODs nicely. When I drag it into the scene, the main gameObject gets two child gameObject, where these two LODs are working. But when I zoom-in and out, the sphere disappears on LOD1, and appears back on the main LOD0. Is something not working here?

amirebrahimi commented 6 years ago

What you are seeing is by-design. The "Simulated" part of SimulatedMeshSimplifier is to simulate what a 50% reduction per LOD would bring. This simplifier essentially just punches polygons out at random until the target quality is met. This was created for testing purposes in order to iterate on AutoLOD and is still potentially useful for estimates. However, an actual LOD generator/simplifier needs to be used for production.

chanfort commented 6 years ago

Fair enough. Just a though that it might be still good if Unity would provide at least one its own simplifier. It should be quite easy to try some decimation algorithms, like average/median vertex clustering.

amirebrahimi commented 6 years ago

Yes, we had started work on a GPU-accelerated simplifier using QEM, but it was not robust enough to release.

chanfort commented 6 years ago

I guess these things takes time. I would imagine the first step could be non-optimised single threaded, second step multi-threaded CPU, and final step GPU-accelerated. Anyways, looking forward where this project will evolve.