Blender Git Loki
Git Commits -> Revision 24caf4f
April 14, 2015, 09:06 (GMT) |
Major optimization for cache size when storing child strands. The basis for this optimization is that child strands have a shape that does not actually change over time: the particle code does not enforce this formally, but in fact all the clump/kink/roughness algorithms take great care to not introduce changes of shape over time. The final look of child hairs is achieved only by following the parent hair deformation, i.e. by applying the offset of the matching parametric position on the parent strand. This means that for caching child strands it is sufficient to store the full vertex data only in the first sample, and then apply the parent deformation on subsequent frames using only the animated root matrices. In test cases this seems to reduce the cache size to something between 10-20 % of the original size (down to some hundred MB from some 10 GB). Further optimizations could be achieved by using smaller data types, such as quaternions instead of 3x3 or 4x4 matrices for the remaining child data. |
Commit Details:
Full Hash: 24caf4f98fffdb5372e4b3459f6b2ee8d4184a35
Parent Commit: 09701e0
Lines Changed: +304, -95
9 Modified Paths:
/source/blender/blenkernel/BKE_particle.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_strands.h (+1, -1) (Diff)
/source/blender/blenkernel/intern/cache_library.c (+4, -4) (Diff)
/source/blender/blenkernel/intern/object_dupli.c (+1, -0) (Diff)
/source/blender/blenkernel/intern/particle.c (+19, -0) (Diff)
/source/blender/blenkernel/intern/strands.c (+64, -45) (Diff)
/source/blender/makesdna/DNA_strands_types.h (+2, -0) (Diff)
/source/blender/pointcache/alembic/abc_particles.cpp (+204, -45) (Diff)
/source/blender/pointcache/alembic/abc_particles.h (+8, -0) (Diff)
/source/blender/blenkernel/BKE_strands.h (+1, -1) (Diff)
/source/blender/blenkernel/intern/cache_library.c (+4, -4) (Diff)
/source/blender/blenkernel/intern/object_dupli.c (+1, -0) (Diff)
/source/blender/blenkernel/intern/particle.c (+19, -0) (Diff)
/source/blender/blenkernel/intern/strands.c (+64, -45) (Diff)
/source/blender/makesdna/DNA_strands_types.h (+2, -0) (Diff)
/source/blender/pointcache/alembic/abc_particles.cpp (+204, -45) (Diff)
/source/blender/pointcache/alembic/abc_particles.h (+8, -0) (Diff)