Blender Git Loki

Git Commits -> Revision e12c311

Revision e12c311 by Sybren A. Stüvel (master)
April 14, 2017, 13:26 (GMT)
Alembic import: greatly improved curve/hair import performance

The U-resolution of the imported curves was kept at the default value
of 12, which is way too high for imported hair. We export hair at a
fairly high resolution already, so it's not needed to subdivide even
further when importing.

Of course this may have an impact on other curves that do require this
U-resolution to be higher. In that case the resolution can be
increased after importing.

I removed the default nu->orderu = num_verts, as that allowed every
point to influence the entire spline, which was more expensive for the
CPU, and unlikely to be needed. The orderu computations had off-by-one
errors in the curve importer, which are now also fixed. The correct
values are:

- Linear: orderu = 2
- Quadratic: orderu = 3
- Cubic: orderu = 4

These values are also what is stored in the Alembic file for curves of
type kVariableOrder, according to the reference Maya exporter
maya/AbcExport/MayaNurbsCurveWriter.cpp, function
MayaNurbsCurveWriter::write(), in the Alembic source code.

The result is a frame rate increase of roughly 100x (tested with one
100-hair test on one machine, so take with grain of salt).

Commit Details:

Full Hash: e12c3110024dc4b62ffefa739288218b04e39f71
Parent Commit: 6af131f
Lines Changed: +13, -7

1 Modified Path:

/source/blender/alembic/intern/abc_curves.cc (+13, -7) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021