June 17, 2020, 13:21 (GMT) |
Make UV coords and face normals optional to write Adds options in the UI for writing normals and UV coordinates to the OBJ file. {F8627897} As expected, calculating both of them is also skipped conditionally. However, the memory for normals is still allocated; just not used. |
June 17, 2020, 10:07 (GMT) |
Add scaling factor in geometry transform. |
June 17, 2020, 09:32 (GMT) |
Merge branch 'master' into soc-2020-io-performance |
June 17, 2020, 09:28 (GMT) |
Add forward and up axes transform in preferences. |
June 15, 2020, 17:56 (GMT) |
Fix crash: exporting object from Edit mode. |
June 15, 2020, 17:22 (GMT) |
Make all frames exportable; UI & filename changes All frames are now exportable including negative ones, instead of only 0-1000. Added checkbox for Animation for better UI {F8622012} File name doesn't contain frame name if no animation is being exported. Noticed that `source/blender/io/wavefront_obj/IO_wavefront_obj.h` is missing in the IDE's edited files list. So edited that in. |
June 15, 2020, 09:19 (GMT) |
Merge branch 'master' into soc-2020-io-performance |
June 15, 2020, 08:43 (GMT) |
Cleanup: unused headers, minor edits in comments Since fstream was removed, these headers are useless here. |
June 15, 2020, 08:04 (GMT) |
Export multiple frames to separate files. Frame 20 with mentioned filename `name` is exported to `name020.obj` It should be modified to exclude cases when a single frame is being exported to avoid overwriting what the user intended to name it. Also a filter is added to include only OB_MESH type objects for export. The limits on frames can be changed, the current limits are like this: Let's say unknowingly, the user selects the maximum 1000 frames & every file is 1 MB in size. That will quickly fill up 1 GB on the disk. More frames add to this risk. |
June 13, 2020, 14:52 (GMT) |
Cleanup: function & variable renaming; comments. |
June 13, 2020, 12:29 (GMT) |
Fix indices with offset for multiple objects. In case of multiple objects, the vertex, normal, and UV vertex indices keep adding up for every upcoming object. |
June 13, 2020, 10:52 (GMT) |
Export mutiple objects; remove unused fstream. Adds support for multiple objects to be exported from a frame. Also checks for them to be OB_MESH types. More object types need to be supported yet. Renamed data_to_export to more fitting, object_to_export of which we use vector to contain all exportable objects. Remove unused fstream based file writer since fprintf is consistently faster. Also reduce function calls of fprintf since lengthy arguments were already removed. |
Revision 387d962 by Ankit Meel (soc-2020-io-performance) June 12, 2020, 14:11 (GMT) |
Merge branch 'master' into soc-2020-io-performance |
June 11, 2020, 17:26 (GMT) |
Change export time resolution to milliseconds |
June 11, 2020, 17:23 (GMT) |
Fix out of bounds assert and crash in UV vector. |
June 11, 2020, 15:42 (GMT) |
Export UV vertex coordinates & their indices. This commit adds support for UV vertex coordinates in the form: `vt u v` for all vertices in the texture map. Also, their indices are exported as per file format specification [1,2] `f */vt1/* */vt2/*` for all polygons. The text written by this and the python exporter has different order of coordinates and thus their indices too. So direct diff of the two files will not work. Minor comments about 0-based/ 1-based indices are also added. [1]: https://en.wikipedia.org/wiki/Wavefront_.obj_file#File_format [2]: http://www.martinreddy.net/gfx/3d/OBJ.spec |
June 10, 2020, 18:51 (GMT) |
Comment about mvert normals memory allocation. Readability: Replace integers to indicate axes with AXIS_{X,Y,Z}. Consistency: Use uint with indices, like the vectors of the indices themselves. |
June 8, 2020, 18:57 (GMT) |
Add faster fprintf writer, remove unused headers Changes here: Reverted temporarily to std::vector to keep working, instead of waiting for D7931 to get committed in master. Adds an forced inline function for calculation of face/ polygon normals by averaging vertex normals. I will look for an existing method. This way, the allocated memory in `data_to_export->mvert[i].no` is actually used. Also, `BLI::Vector<uint> face_normal_index` is not needed anymore since we loop over the same polygon list while writing normals, so their indices will be the same. Adds a writer method option, `fprintf`, which is faster than `fstream`. With fstream, 478 MB of an ico-sphere with 8 subsurf takes 22 seconds. with fprintf, the same takes 13 seconds. With fstream, a 44 MB of cube with 8 subsurf take 2.3 seconds. with fprintf, the same takes 1.4 seconds. Adds timing info of the full export directly in console. Removed unused and repeated headers from `wavefront_obj.cc`. Differential Revision: https://developer.blender.org/D7959 |
June 8, 2020, 15:56 (GMT) |
Move iteration variable inside the loops. To limit the scope & for better naming, moved the variables `MVert *vertex` and `const Polygon &polygon` inside the loops. |
June 8, 2020, 14:54 (GMT) |
Formatting, edit comments, remove extra io::obj Changes here: Made variables `vertex` & `polygon` for better readability in writer. `data_to_export->mvert` `data_to_export->polygon_list` Edited comments as per review in D7918. Removed extraneous `io::obj::` being used in the same namespace. |
|