User:Ankitm/GSoC 2020 Weekly Reports

Weekly Reports for IO Performance Project:

Week 5: June 29 - July 4

Ticked exporter checkbox in the status tracker task. T68936

Week 4: June 22-27

  • Review update and cleanup in the OOP refactor(rBf2a1a66b): rB0f383a3d.
  • Support NURBS being exported in parameter form, optionally. So far, they were exported as meshes. rB31d48017.
    • Support NURBS surfaces to be exported as a regular mesh. (same as above rB31d48017)
  • Broke down files to create new ones for OBJMesh and OBJNurbs. rB6c98925d Later on, MTLWriter will also have its own implementation file.
  • Support material library export. We decided against using the existing python writer, since there were no benefits of using it except saving some time now. To extend support, one would have to edit Node Shader Utils file first. Also debugging it would be a trouble. Since nodes are already in C/C++, we have more control there, instead of in the API.
    • Export of single material per object: rB827869a4. Support for multiple materials in one object: rBfaa11ec0
  • Changes in the UI:
  • Bug fixes:
    • Duplicate texture coordinates: rBef0eff0b
    • Show red colored warning if overriding an existing file while exporting (it was a wrong flag) rBc39128ca
    • Fix socket vector being read as socket RGBA rB7685d9e4

Remaining tasks

  • Smooth groups (and bitflags) & Vertex groups
  • Start with importer. I'm already lagging here User:Ankitm/GSoC_2020_Proposal_IO_Perf#Project_Schedule. But since the refactor I had planned for week 7 (along with profiling) won't take long, I feel that I have a good buffer to work in.

Week 3: June 15-19

  • Animation: Allow all frames to be exported, instead of 0-1000. Also filenames are also edited with frame number only if there are multiple frames. rB45461012
  • Worked on exposing more settings in the UI:
  • Add support for curves to be exported after converting them to meshes.
  • Refactor the code upto now to object-oriented style. (commit [todo], in review D8089)
    This allowed us to have minimal memory overhead with no timing cost. UV vertices, however, have to be allocated on heap and thus show a peak while exporting.

Unfortunately, I couldn't finish some goals at time: Material library, NURBS and grouping settings. So the goal for next week is to finish them as soon as possible and start with importer.

Week 2: June 8-13

  • The OBJ exporter now exports Texture Coordinates. rBf01a7d50. Not the MTL file yet. It's a goal of Week 3.
    Here's a table of comparison of a single object to one file which includes UV coordinates too.
Object File Size (There's a little difference due to the extra info like MTL in python )
(C++/ Python + MTL)
Export Time (fstream/fprintf)
Export time Python
Default cube + 8 subdivision surface levels 61.6 MB / 63 MB 3.1 / 1.9 s 20 s
Default cube + 9 subdivision surface levels 257.3 MB / 262 MB + 229 bytes MTL 10.7 / 6.7 s 82 s
Ico-sphere + 8 subdivision surface levels 663.1 MB / 674 MB + 124 bytes MTL 27.7 / 19 s 210 s
  • Since fstream is not adding any benefits and is slower too, it was removed.
  • It also exports multiple objects in the same file. But so far only OB_MESH object types are supported. rB40736795.
  • Multiple frames can also be exported now, in individual files. rB6d088bdd.
  • Progress is now shown on per-file basis in Terminal and timing in the end. It should be improved to act on per-object basis when there is a single frame.
  • The windows build to test is up:

Planned for Week 3

  • Curves, Axes transform, Scale transform.
  • Object Grouping, Indices (absolute is already there, will discuss about relative.)
  • Materials, Triangulation.

Week 1: June 1-6

  • Received a lot of input from the mentors regarding coding style, comments, documentation, and file structures. Spent quite some time on cleaning the hastily committed rB485cc433. See current version at Diffusion
  • Currently the exporter exports vertices, face normals, and face indices. In world coordinates.
  • It's lacking in (1) multiple objects, (2) texture coordinates (3) Axes transformation. If you compare obj txt files written with python & C++ , you'll see differences in vertex order, and some coordinates with opposite sign. But the shape is correct.
  • Did a comparison between the old & new exporters. Release configuration, lite build + opensubdiv, default cube with 9 subsurf modifiers. See images: F8586987 & F8586984. We're checking the time taken by wm_handler_fileselect_do function.
Object File Size (note that vt are not there in C++ yet so C++ file size is smaller.)
(C++/ Python + MTL)
Export Time (fstream/fprintf)
Export time Python
Default cube + 8 subdivision surface levels 48 MB / 63 MB 2.4 / 1.47 s 20 s
Default cube + 9 subdivision surface levels 186 MB / 262 MB + 229 bytes MTL 7.6 / 4.6 s 82 s
Ico-sphere + 8 subdivision surface levels 478 MB / 674 MB + 124 bytes MTL 22 / 13 s 210 s

Planned for Week 2

  • Textures, multiple objects in the same file.
  • Modifiers, Curves, Multiple frames , Axes transform, Progress logging

Week 0: before June 1

  • Updated the goals to move OBJ in the beginning & PLY in the end. See timeline:
  • Set up the branch soc-2020-io-performance : See on diffusion
  • Project status tracker and design discussion task on Phab: T68936
  • Get familiar with gperftools, see gperftools installation and use
  • Set up UI and file-handler API for both exporter & importer (OBJ).

Planned for Week 1

  • Export vertex coordinates, vertex normals, faces & texture coordinates.