Load large .obj file

Hi


I am working with teh 3D model and I am uses the Scene Kit for rendeing 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 toomuch memory and lower end devices are getting crash so my question is how can I read this obj files taht is used by the scene kit? 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 alternet way to load large obj file?


Thanks,

Devesh

Replies

Devesh did you end up getting a resolution to this?


I've got an app where i load some models from .dae files and I have 1 that's an .obj. The obj is about 20 MB and the .dae files are about 10 MB each, though the obj is a much higher poly model. The obj takes about 6 times longer to load than any of the .dae. Not sure if this is the file format or just the more complicated model, in my case.

I'm starting to play around with larger obj files and would like a way ahead of time to determine if a file can be loaded.

In metal you can query the recommended max working size and the largest alowed buffer using recommendedMaxWorkingSetSize and maxBufferLength on MTLDevice, but it would be very helpful to analyse a file to determine if it will fill it