I’m trying to import a large .OBJ (32mb) into Unity and no matter what it just crashes each time. The mesh is properly split into multiple chunks so why is there such a slow import process? This takes about 10 seconds to import into Blender. Do I need to extract each chunk and import the chunks 1 by 1? I surely hope not as that’d take ages to accomplish. For those curious it’s an entire level designed outside of Unity as Unity doesn’t have a voxel terrain editor I had to do it manually.
How big is the .obj for it to be 32mbs!? Im not familar with the .obj format but I think it’d be too bog of a file or the inability to support it? I know it should support it. You could import it manually as a mesh.
It already is a mesh. .OBJ format is just a container almost like a zip file for multiple meshes, their coordinates, textures, and materials. If I have to import 1 by 1 then I have to apply the texture and material to each object as well as move and placed them 1 by 1 which seams pretty silly. If I can import it the way Unity does (material folder, etc…) outside of Unity that’d fix the issue as the problem seams to come from it creating a material in the Material folder 1 by 1 for each chunk (which is 100’s), which is silly as I have a .mtl for my .obj so Unity doesn’t have any need to generate materials. This is a 4096x4096 terrain made of voxels split into chunks, LOD wise performance is fine (only tested outside of Unity)… problem is strictly the import crashing.
It might seem like to me the shear size of it but you could always send a bug report to Unity. Or use a different export format.
Size shouldn’t matter, Unity is memory leaking when handling the materials and just endlessly consumes memory. I’ve watched it happen over 20 times now. I understand a large import would be slow, but it should clean up after it self and continue forward. Will crash it a few more times and generate bug reports, but that doesn’t help me now.
If it’s the Materials then you’ll either have to decrease the amount of materials which in your case isn’t useful and I believe it crashes to prevent harm to your computer with the leak, Unity should really have an option where you don’t automatically create animations or materials for objects. ![]()
Exactly what’s erking me off; I have the materials safely packed in a .mtl file. Unity creating them is absurdly pointless and inefficient. I’m basically stuck at this point… can’t create my level in Unity without duplicating a block over and over… can’t import my map designed externally… Unity really doesn’t want me making a game I guess.
I’ll try exporting out of Blender as .fbx as it combines the object and material into a single object… I end up with an object 3 times the normal size, but if it works I guess it works… in theory Unity should be able to handle GBs worth of imports like it was nothing.
Was finally able to get a basic plane imported. I had to avoid splitting it outside of Unity then let Unity split it itself. I guess there were too many chunks and the material creator chokes up. No idea how well this will do with more complicated meshes. It’s significantly more efficient when split into proper chunks externally as I can implement an LOD properly… uhg. I also can’t apply collisions without it locking up.
Unfortunately looks like the best approach for me is to rebuild my terrain inside of Unity by using generic chunks of blocks (1x1,1x10,1x50,1x100, etc…) then arranging them on a grid… I ended up with only 32 draw calls for a 4000x4000 sized terrain. This is due to duplicating the same chunk and arranging on a grid so it’s 1 draw call for 1 generic piece even though it’s used dozens of times. This will reduce further once a combine mesh is ran on the chunks.
Hey @Krileon
Please file a bug report to us via Help → Report a bug! There is no size limit in Unity for import of assets for OBJ files. Please ensure you attach the OBJ to the bug report.
Thanks,
Chris
Ok, just upgraded to Unity4; will give the import a shot in it to see what happens later today.
Ok, it’s not crashing now, but it gets stuck endlessly swirling. I left it for half an hour and still wouldn’t work properly. I managed to get a 640x640 terrain imported, but soon as I tried adding collision it endlessly swirled again.
Does anyone know a good tool for quickly splitting a mesh into even chunks along a grid? I could just chop it into 64x64 and it’ll work fine.
This is exhausting. I really do not want to procedural generate my voxel world. I want it hand crafted so it can be a unique and guided experience with towns and various other aspects. Is there no way for me to import my voxel models and have Unity not completely freak out on me? Do they need to be smaller? I’m using Qubicle Constructor to create the chunks of 64x64 from 640x640 terrain.
Hi Krileon,
I know you need a solution now, but in the mean time please submit a bug which includes a repro project / mesh and some specific steps, at least allow us some time to investigate this end and fix the problem if needed.
Thanks,
Chris