I am working with the 3D model and I am using the Scene Kit for rendering and Model I/O for loading the obj file. It works perfectly fine for the small size of obj. But now I have 250MB of file and when It starts loading it takes too much memory and lower end devices are crashing.

How can I read this obj files that is used by the scene kit or any alternate way to read this file? Below is the line of code I used for reading obj file:

MDLAsset *asset = [[MDLAsset alloc]  initWithURL:mapURL];
MDLMesh *object = (MDLMesh*)[asset objectAtIndex:0];


Is there any alternative way to load large obj files?

• use a different format that is much more compact and doesn't need post processing after reading. – ratchet freak Feb 1 '17 at 15:48
• .obj is a horrible, horrible, horrible format - yes, use something that's actually designed to be efficient. – Maximus Minimus Feb 1 '17 at 16:11
• You could write a converter that saves the .obj's parsed and processed data in a binary format that can be loaded quickly. – SurvivalMachine Feb 1 '17 at 16:49
• Thanks for suggestion but I am new in this field so can you please suggest which formate work best and gives the good performance? – DeveshM Feb 1 '17 at 17:12
• .3ds is the de fraco industry standard format. It's binary and efficient. .obj files are good because any programmer can write a parser just by looking at the ascii. However the point of writing such parser is to convert the obj file into a binary format which can be loaded faster. – Sanchke Dellowar Feb 1 '17 at 17:26