Blender Git Commits

Blender Git "opensubdiv_compare" branch commits.

May 26, 2020, 10:42 (GMT)
OpenSubdiv: Only store edges topology for non-smooth edges

This change makes it so vertices of edge are only stored when edge
has non-zero crease. This allows to lower memory footprint of 1.5M
faces from 78 MiB to 54 MiB in the case all creases are zero.

Meshes with crease are more hard to predict due to array-based
storage, so it all depends on index of edge with crease. Worst case
(all edges are creased) still stays at 78 MiB.
May 26, 2020, 10:37 (GMT)
OpenSubdiv: Allow any order of edge topology/sharpness assignment

Makes it possible to set adjacent vertices after edge sharpness.

Initially it seemed like useful sanity check, but with time it
became rather a burden.
Revision f1941ee by Sergey Sharybin (opensubdiv_compare)
May 26, 2020, 09:08 (GMT)
OpenSubdiv: Optimize faces storage in mesh topology

Avoid per-face pointer and allocation: store everything as continuous
arrays.

Memory footprint for 1.5M faces:

- Theoretical worst case (all vertices and edges have crease) memory
goes down from 114 MiB to 96 MiB (15% improvement).

This case is not currently achievable since Blender does not expose
vertex crease yet.

- Current real life worst case (all edges have crease) memory goes
down from 108 MiB to 90 MiB (17% improvement).

- Best case (no creases at all) memory goes down from 96 MiB to 78 MiB
(19% improvement).
Revision 02c353d by Sergey Sharybin (opensubdiv_compare)
May 26, 2020, 08:49 (GMT)
OpenSubdiv: Add regression tests for mesh topology

While this looks trivial it already allowed to catch issues in one
of previous attempt to optimize memory usage. It will totally be
useful for an upcoming refactor of face topology storage.
Revision 61fc5d5 by Sergey Sharybin (opensubdiv_compare)
May 26, 2020, 08:01 (GMT)
OpenSubdiv: Hide individual topology elements

Move all API to happen via MeshTopology.

This is a preparation for an upcoming memory optimization.
Revision 1278bd1 by Sergey Sharybin (opensubdiv_compare)
May 26, 2020, 07:10 (GMT)
OpenSubdiv: Keep explicit storage of base mesh faces

Allows to perform comparison by doing linear comparison of indices.

Before cyclic match was used to deal with possibly changed winding from
OpenSubdiv side.

Speeds up comparison (and hence improves FPS), makes code more reliable
nut uses more memory.
May 26, 2020, 07:10 (GMT)
OpenSubdiv: Add move semantic to the namespace
Revision 21fcd29 by Sergey Sharybin (opensubdiv_compare)
May 26, 2020, 07:10 (GMT)
OpenSubdiv: Compare edge topology

This change makes it so topology refiner comparison will check vertices
of all existing/provided edges.

The initial claim that due to manifold nature of mesh there is no need
in "deep" edges check was wrong: some areas might only provide edges
with non-zero creases. So if crease of one edge goes changes from 1.0
to 0.0 and crease of other edge goes from 0.0 to 1.0 the old comparison
code would not have caught it.
Revision 23b73e4 by Sergey Sharybin (opensubdiv_compare)
May 26, 2020, 07:10 (GMT)
OpenSubdiv: Cleanup, remove unused code

There is no need in edge map anymore.
Revision 2712d86 by Sergey Sharybin (opensubdiv_compare)
May 26, 2020, 07:10 (GMT)
OpenSubdiv: Refactor, move mesh topology comparison to own file

Makes it easier to follow and extend.
Revision 2d14313 by Sergey Sharybin (opensubdiv_compare)
May 26, 2020, 07:10 (GMT)
OpenSubdiv: Allow use of regular ordered map
Revision b0b5de8 by Sergey Sharybin (opensubdiv_compare)
May 26, 2020, 07:10 (GMT)
OpenSubdiv: Move preliminary geometry counters check to mesh topology
Revision 73817d3 by Sergey Sharybin (opensubdiv_compare)
May 26, 2020, 07:10 (GMT)
OpenSubdiv: Add explicit storage for mesh topology

The idea is to use this explicit storage for topology comparison rather
than using base level. While this will have memory overhead it allows
to simplify comparison of such things as:

- Vertex sharpness (where base level from topology refiner will have it
refined, meaning it will be different from what application requested
for non-manifold and corner vertices).

- It will allow to simplify face-vertices comparison, where currently
O(N^2) algorithm is used due to possible difference in face winding.

- It will also allow to avoid comparison-time allocation of edge map.

Currently no functional changes, just preparing for development which
will happen next.
Revision bb6dd4a by Sergey Sharybin (opensubdiv_compare)
May 26, 2020, 07:10 (GMT)
OpenSubdiv: Use explicit storage for edge sharpness

Similar to previous change in vertex sharpness, explicitly store value
provided by the converter.

Allows to avoid rather fragile check for boundary edges.

Also allows to avoid need in constructing edge map. This lowers memory
footprint of the comparison process and avoids memory allocations
during the comparison (which is an extra benefit from the performance
point of view).
Revision c36726c by Sergey Sharybin (opensubdiv_compare)
May 26, 2020, 07:10 (GMT)
OpenSubdiv: Add TODO avoid checking face-varying topology for equality
May 26, 2020, 07:10 (GMT)
OpenSubdiv: Refactor, pass higher level object through comparison
Revision d1c8c8e by Sergey Sharybin (opensubdiv_compare)
May 26, 2020, 07:10 (GMT)
OpenSubdiv: Refactor, move comparison to own file
Revision f795f57 by Sergey Sharybin (opensubdiv_compare)
May 26, 2020, 07:10 (GMT)
OpenSubdiv: Compare sharpness based on converter

This change starts the transition of topology refiner comparison
to compare actual values given by the converter, which will not be
affected by the refinement or face winding synchronization steps.

Currently is only implemented for vertex sharpness, but will be
extended further as followup development.

Fixes T71908: Subdiv: Incorrect topology comparison, leading to poor performance
May 26, 2020, 07:10 (GMT)
OpenSubdiv: Refactor creation of topology refiner

Consolidate it inside of the topology refiner implementation class,
which would allow to store extra data acquired during construction
of the OpenSubdiv's object.
May 26, 2020, 07:10 (GMT)
OpenSubdiv: Refactor, move topology refiner factory to topology folder
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021