GSoC 2020: Faster IO for OBJ, STL & PLY. Feedback

Wow. This is great! I will have to test it out. I usually use FBX, but if OBJ is now 3-5x faster or more , I’ll probably have to switch. As some others said, importing / exporting in blender is often insanely slow for highpoly meshes. Sometimes taking 5,10,15 min vs 30 seconds in other apps or 1-2 min. So with what you’ve done here, maybe blender will be about the same now!? :scream:.

Although another DCC I use , exports OBJ pretty slow or quite noticeably slower than FBX, so I’ll have to compare and see what the time differences are.

6 Likes

Really looking forward to this one. Been used to exporting .obj because of ZBrush and Substance Painter by having to export high poly and low poly for baking and stuff. It was always disheartening to see Blender taking several minutes to export million poly sculpts. If that’s finally fixed, it will make me very happy. :smile:

Can’t wait to see the results in master! :partying_face:

7 Likes

I just did a test on a 16 million Tri Scene, with multiple objects.
It took about 35~ seconds to export with the new obj option and almost 2 minutes with the FBX option.

Although importing an OBJ into 3ds Max is pretty slooow… It also imported all my stuff as 1 mesh and not seperate meshes.

Max imports / exports FBX quite noticeably faster than it does OBJ. Importing this OBJ into max is taking beyond 5 minutes and i ended up just killing the process. :frowning:

The FBX took about 20 seconds to import into max by comparison.

The funny thing is, I often find blender saves files way faster than max can, with collapse/dense geo. At least vs. Max 2016. It’s just importing/exporting out of blender is often slooooooow. :’(

Week 12 August 17 - 23

  • Fix overlapping nodes in the nodetree. rB0c7801fa
  • Vertex normals:
    • Parse vertex normals: vn lines. rBc583afd6
    • Decouple getting smooth groups from export parameters rB0479dc41
    • Export vertex normals if smooth shading is enabled. rB4923087d
  • Refactor:
    • Move file opening errors to constructors. rB491bd8b8
    • Add a public member function in MaterialWrap. rBc815ba0a
    • Move object creation code from constructor. rB4777a6a5
    • Remove unused uv vertex index offset. rBedd5307e
  • For polygons with holes:
    • Commit as it is ngon-tessellate. rBefab0bc7
    • Fix tessellate crash due to wrong Vector size. rB5b0cb5bb
    • Add newly creates faces to imported faces and dissolve edges. rBe76ab124
    • Edit FaceElem list outside polygon creation code. rB10e3f23b
  • Parsing
    • Use remove_prefix for easy transition to StringRef. rBae122533
    • Use blender::StringRef instead of std::string_view . rB73454388
    • Read multiple lines with “\n” line breaks. rBa662ddd7
  • Silence normal being zero warnings in mesh validate’s verbose mode. rB3f8a8d17
  • Silence mesh_validate verbose warnings. rB32fe2869

https://wiki.blender.org/wiki/User:Ankitm/GSoC_2020_Weekly_Reports#Week_12_August_17_-_21
https://wiki.blender.org/wiki/User:Ankitm/GSoC_2020_Daily_Reports#Week_12

10 Likes

Hey everyone, thank you for keeping me motivated, sharing blog posts, and feedback!
Please find the final report here: https://wiki.blender.org/wiki/User:Ankitm/GSoC_2020/Final_report
Differentials under review: D8754 , D8753

21 Likes

Awesome progress, great congrats!!
I can’t wait to try in master:)

1 Like

Wonderful achievements in this GSoC, congratulations! :beers:

3 Likes

:1st_place_medal:


2 Likes

So, what’s the status of this, dead, alive?

You can track the progress here. They are both in review:
https://developer.blender.org/D8753
https://developer.blender.org/D8754

6 Likes

Hi, do you know where I can download a build of this patch ? The link is currently dead.

The build overlord provided us with builds uptil August end (the duration of the program).
Now you may

1 Like

Thanks, I manage to build it with the patch, but it don’t seem’s to have any speedup on large OBJ import, is there a manipulation to enable the patch once build ? I have tested with different size mesh (500k, 5M, 10M and 30M) and i get same result as vanilla 2.90.

This is the build i made : https://amcgi.fr/uploads/Release.zip
MD5 : 3A2A583AD5896705CF71993D084443E8

Did you use the correct operator ? There will be two wavefront OBJ operators in the export/import menu.

Also, check that the files are present at source/blender/io/wavefront_obj/importer

I almost forgot that there’s a branch too. So git checkout soc-2020-io-performance, and then rebuild.

1 Like

Yes, I must have used the wrong .obj importer.

I recompiled from the branch you shared and it works great, it will greatly facilitate my workflow in photogrammetry on blender, thank you very much for the work done during this GSoC.

Here is the link of the build I compiled : https://blender.community/c/graphicall/tqbbbc/

3 Likes

Hi, it look like the importer don’t import the custom split normals data.
Is this an option ?
6499_firefox_Beginner_Doughnut_Renders_-_Mozilla_Firefox_22_10-20_16h27(638x178)_C1Ds

Could you provide a simple OBJ file with normal data that worked in the older one ?

Hello, I can’t share the model i’m working with you, i’m sorry, they are generated from reality capture and i don’t have the right to share it.

I can however share this model (generated from this tutorial )

Link : https://www.dropbox.com/s/jaujwnp3mtp3o2c/tree.zip?dl=0

As you can see what it look with custom normals :


And without :

1 Like

Thanks! I see the issue. Will fix it soon.

6 Likes

Hey, any update on this custom normal issue? We’ve built a version to test with from this branch and are seeing great results so far. Thanks!