Jump to content

Importing 35 mb .obj file crashes browser on mobile


Numa
 Share

Recommended Posts

Hi there, 

I'm trying to load a 35mb obj file. on mobile it crashes the browser (on an iphone 6, chrome/safari). I monitored the memory and it looks like when parsing the file memory goes up to 200+mb ? Is that normal? Is there a way to "stream" the data?

Just to make sure I'm not doing anything silly with it I'd like to test it in the playground, how can I do that?  the file is here: https://dl.dropboxusercontent.com/u/28007926/gg/bigModel.obj

My obj data comes in as a string then I'm using sceneLoader.Append().

 

Thanks

 

Link to comment
Share on other sites

@Numa : I downloaded your .obj file and took a look at it in Blender as @Kesshi suggested. :)

It imported into Blender fine, but as there is no .mtl file all the 96 meshes have no materials!!:o

I added a light and camera (that can be done in javascript code if you wish) and exported it as a .babylon file. The exporter gave me 96 "warnings" about the export ( the lack of materials)

Anyway, I opened the .babylon file in the BJS Sandbox - see image below.

If you want either the .blend file or the exported .babylon file so that you can test the.babylon file on a mobile device - I can post them here.

cheers, gryff :)

 

 

numobj1.png

Link to comment
Share on other sites

Thanks a lot, yeah I converted it into a .babylon file and it was about half the size, that worked better on mobile :) Also I know about the materials, I don't need them in my project.

 

Now I need your opinion, we're going to move away from obj at this point as it is just too heavy to work with (and doesn't have bones) and I'm still unsure which format to use to keep files as small/fast loading as possible.

We have a very specific workflow. People bring 3d models from all formats into our program (build with unity), edit the models in unity, save them out to our server, which then displays them in babylon.

so the workflow is:

upload any format to server --> server converts to our format of choice to be read by Unity -> unity saves back to the server to format of choice --> view in babylon.

 

Do you recommend any format? It must have :

- a robust unity importer/exporter
- a robust babylon importer
- support skinned meshes / bones
- be as light / fast as possible :) 

I was going to go with GLTF but it sometimes produces files larger than obj's so I'm not sure.

Link to comment
Share on other sites

@Numa : not sure I can be much help with your workflow as I tend to work with Blender.

All I can suggest is you have a look at the Unity exporter to.babylon. As you mentioned the .obj format "doesn't have bones ", you might want to check how well the Unity Exporter exports rigs (and animations?).

Just one final thought, if the end viewing device is "mobile", you may want to watch out for rigs with a lot of bones. @JCPalmer, I think, recommends less than 30 bones for mobile devices. Now I have some character rigs with 90+ bones which don't work well on a desktop PC - so could be a disaster on a mobile device .

You might want to perhaps start a new thread on finding out more about the export of rigs from Unity to BJS.

Good luck.

cheers, gryff :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...