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

You might but @Howard_Trickey or @sybren might have a more precise answer. Also, there is Native STL importer .

Thank you! I will contact them.

I figured maybe this giant thread would need an update on current status of the OBJ exporter/importer, and future plans.

  • New OBJ exporter has been in Blender since 3.1; labeled “experimental” in the menu item. The new exporter is ~10x faster than the old one. The old one is still available.

    • Since Blender 3.2, the new exporter is another ~10x faster, meaning it’s ~100x faster than the old exporter.
    • Currently there are three known issues (bugs/regressions) about the new exporter: incorrect vertex groups export (T96824), issues exporting Poly curves (T97095) and missing Path Mode setting (T96399). I’m fixing them as we speak.
  • New OBJ importer has been in Blender 3.2 alpha since 2022 April (commit), generally between 5x and “many many times” faster than the old one.

    • Additional speedup of the new importer is in progress (D14586).
    • The new importer likely also has some bugs or regressions, any & all bug reports are welcome! Both the new one (“experimental”) and the old one will keep on being available for quite a while.

After both the new exporter & importer are solid & good, I think it would make sense to do some OBJ feature improvements. Largest ones that come to mind: 1) support for vertex colors, and 2) improved support for PBR materials (clearcoat maps, anisotropy etc.).

22 Likes

now-thats-what-im-talking-about-wiggle

Also I hope you guys go for the widely accepted obj with vertex colors support format (like the one from zbrush). All major dccs can read it. :v:

Which one is the more widely accepted? (I know of two vertex color formats: “xyzrgb” where vertex colors are 3 extra numbers after vertex position and “MRGB” where vertex colors are a long string of hexadecimal characters)

MRGB seems to be the one.

1 Like

@aras_p
I’m planning on sending the first of two PLY patches this afternoon via the Diff upload page. I had a couple of questions:

Should I tag you in it at that time or later?
Do you also want the new .py file and/or link to git where it’s stored?

The first patch fixes compatibility and is one file. The second adds vert/color import and requires adding a function to init.py as well. For the second part, I assume a .diff is needed for each file?

Thank you!

A single diff/patch can totally change multiple files. What I typically do is either export a single git commit as a patch and then submit that, or create a diff of two git branches (git diff master..my-branch-name) and submit that.

Thank you @aras_p, I’m still new to this process! Ok, I’ll just send the one diff, there’s not that much that’s been added.

Hi @aras_p
The OBJ importer in Blender 3.1.2 currently generates duplicate materials for each import:
afbeelding

I would love to see an option to use existing scene materials if they share the same name. That way, it is not necessary to reassing materials for imported objects.

Also, I have just been testing exporting files from Revit and they come accross as heavily teselated. Is it possible to merge coplanar faces on import (to create quads and Ngons) and/ or to process the entire mesh with tris to quads?

E: Just came across a C++ Blender OBJ exporter on Github, may be worth taking a look at?

4 Likes