Performance / Memory Issues when loading OBJ Files > 2MB

Software: Away3D 4.x

pool338, Jr. Member
Posted: 03 January 2012 02:39 PM   Total Posts: 37

Hello,
i wrote a simple viewer for OBJ Files, which i want to use on a homepage. The viewer works fine, as long as the obj file isn’t bigger than ~2MB.

If the file is bigger, then i get errors during parsing/rendering and the model doesn’t appear complete. In addition the flash player / flash plugin consumes all my memory till there is no memory left and then freezes.

I put my code and 1 example obj file to this thread.

Will be very thankfull for any hints.

 

File Attachments
src.zip  (File Size: 480KB - Downloads: 187)
   

Avatar
Fabrice Closier, Administrator
Posted: 04 January 2012 10:01 AM   Total Posts: 1265   [ # 1 ]

About the memory I can’t tell, as I do not have this issue myself while using obj’s quite a lot. But regarding the >2mb files: This has nothing to do with file size, but rather the fact that if a mesh has more than 65535 vertices, the actual parser doesn’t build subgeometries as it should.
This is already fixed and will be pushed very soon to git.

 

   

pool338, Jr. Member
Posted: 04 January 2012 10:16 AM   Total Posts: 37   [ # 2 ]

Hi, thank you for the reply. Did you test my application with the given obj/mtl file? Did you get the same issues than me? And will it work correctly with the fixed parser?

 

   

Avatar
Fabrice Closier, Administrator
Posted: 04 January 2012 01:11 PM   Total Posts: 1265   [ # 3 ]

Just tested in Prefab 2.0. It does parse and display, but there are issues regarding faces indices. Prefab catches a few geometries errors to display something, but it’s obvioulsy incorrect.

If I do try to load the model in MeshLab, the app crashes. AC3D loads and displays it as it should. A quick test shows the geometry is “poluted”. There are loads of unused vertices in there. A simple clean up, gives me a “10917 vertices removed” as result… This means probably the same amount for normals and uv’s.

In short, this file will be a nice test case for me!
If you have more obj files with issues, please send then offline to me. Ideally a model with very little data would be awesome.

 

   

Avatar
Fabrice Closier, Administrator
Posted: 04 January 2012 01:21 PM   Total Posts: 1265   [ # 4 ]

little update: I noticed after applying texture to it that it’s also incorrect in AC3D.Lots of faces are missing. I guess its the way the app handles indices issues. If I export the model from there I get exact same obj in Prefab with zero errors reported.

btw, note that on the image of previous reply the model looks like exploded. Its not once loaded! Its just that I have dragged the meshes appart to inspect them.

 

   

pool338, Jr. Member
Posted: 04 January 2012 01:40 PM   Total Posts: 37   [ # 5 ]

Here’s how the rendered file looks in Rhino V4.0. There u can see, that it is build from many smaller parts (1xleft, 1x right and severil middle parts).

P.S. I wrote u an email.

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X