- Home /
How do I import a large sized mesh(in GBs) into unity?
I have to import a textured mesh model of my campus (approx 4.2 GB in .obj format, 813MB in .fbx format) into unity to create a VR walk-through. By simply doing drag and drop of .fbx model into assets folder of projects pane , the model loads and can be seen in scene view but the textures , quality of the model are not preserved.Looks like vertices are missing.I also tried doing the same with .obj model , but unity crashed. I also tried opening my model in Blender and then saving it as .blend file in the assets folder(for automatic import), but again unity crashed. Any ideas , how to import a textured mesh with about 11,010,327 vertices and 23,755,950 faces , size(in 1.2GB) in unity and then use it to create a VR walkthrough?
Answer by NorthStar79 · Oct 09, 2017 at 11:21 AM
i highly recommend you to cut your mesh to logical pieces, (a lot of pieces) and import all of them as separate models, because there is 65k vertex limit for a mesh. and also you may want to setup some kind of Occlusion Culling, because using massive mesh as a one piece is not very performant (i mean, you cannot even launch the game in VR with that much vertex count) also, Occlusion Culling will not be enough too. probably you need some sort of world stream system to load-unload some parts.
there is a lot of work has to be done, you can not just simply fly a drone over campus with photoscan, and import it to unity and setup VR and expect to work. its very unlikely (if not impossible) to work with good performance.
Answer by Dixiepig · Oct 09, 2017 at 12:02 PM
Typically with real-time rendering like game engines, modellers have to make a few deals with the devil in order to make detailed assets with only a few thousand triangles. You can apply the same principles for your scan: hand making low poly topology and baking the fine detail onto it using textures and normal maps. OR if you're feeling lazy, you could just decimate the mesh in blender using the "Decimate" modifier. It is very resource intensive, but it will spit out a mesh with one 1/10th or 1/100th of the triangles of a lidar scanned mesh and little perceptible loss in detail. It will probably produce some glaring artifacts here and there: the algorithms are still less good than human judgement.
Answer by nishima · Oct 11, 2017 at 04:44 AM
Thanks @NorthStar79 and @Dixiepig for your responses.
@NorthStar79 :When I imported the fbx model into unity, Unity automatically split the mesh into 764 submeshes due to the 65k vertex limit.So, do I still have to explicitly split the mesh to get the original texture and mesh quality which I get on opening the same fbx model in blender? If yes, could you please tell me how to go about splitting the mesh into logical pieces .,ie any steps or which tutorial to follow because I am a noob in this.
@Dixiepig : I had already tried using Quadratic edge collapse (with textures) feature of meshlab to decimate the obj model (to reduce the number of vertices and faces) but the result was very poor.Is there any other way out?
Thanks
Your answer
Follow this Question
Related Questions
Mesh-Cutting metal Jaws-of-life 0 Answers
Unity VR Having 3D model skinned over you 0 Answers
importing model into unity causing distortion 1 Answer
Mesh deformed? Tried re-import... 1 Answer