Hans Goudey 94ca3aea83 OBJ: Use mesh normals domain properly for normals storage
- Only calculate the necessary normals based on smooth/flat/mixed shading
- Use cached face normals instead of computing them
- Use a `VectorSet` for deduplication instead of a `Map`
- Deduplicate vertex normals and store indices in separate loops
- Avoid unnecessary duplication of face normal indices
- Inline simple function for slicing index span

Export time (ms) of 1.8m vertex mesh:
| Normals Domain  | Before | After |
| --------------- | ------ | ----- |
| Face (flat)     | 559    | 469   |
| Vertex (smooth) | 659    | 466   |
| Corner (mixed)  | 656    | 640   |

The change of using normals from different domains and using a
VectorSet for de-duplication change the order of normals in the OBJ
files. Other than that, the results should be unchanged.

Fixes #117510

Pull Request: https://projects.blender.org/blender/blender/pulls/117522
2024-01-26 18:54:58 +01:00
2024-01-03 21:23:24 +01:00
2023-12-08 13:28:13 +11:00
2024-01-16 17:30:38 +11:00
2023-08-16 19:29:47 +02:00

Blender

Blender is the free and open source 3D creation suite. It supports the entirety of the 3D pipeline-modeling, rigging, animation, simulation, rendering, compositing, motion tracking and video editing.

Blender screenshot

Project Pages

Development

License

Blender as a whole is licensed under the GNU General Public License, Version 3. Individual files may have a different, but compatible license.

See blender.org/about/license for details.

Description
No description provided
Readme 841 MiB
Languages
C++ 78%
Python 14.9%
C 2.9%
GLSL 1.9%
CMake 1.2%
Other 0.9%