All,
I’ve developed an application for loading architectural building models from the web for viewing on the iPhone using Unity. Using the WWW class, I read text files from the web and construct the meshes, and apply materials at load time.
The problem is this. The models download really quickly, but the mesh building process take several minutes. I’ve been careful to keep my models under 16k faces approx. The models are monolithic meshes (to reduce draw calls) with approx. 6-10 textures per mesh (using sub meshes). The meshes are created by deleting and rebuilding the mesh attached to an existing pre-fab. There is always only one mesh in the scene and one light.
The computation of normals and uv coordinates also happens during the build process. The texture assets are all max 512x512 PVRTC compressed images that are loaded with the app, so nothing texture related is being loaded from the WWW.
It’s hard to get a handle on which process is taking the longest because, when testing in the Unity editor, the models load almost immediately.
Each of the processes, downloading, mesh building, parameterization and texturing is a coroutine that runs in sequence.
Once loaded, everything performs flawlessly. The mesh building duration is the one problem that is keeping this app from being fantastic.
Any suggestions would be greatly appreciated.