diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-02-18 20:47:23 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-03-13 15:39:21 +0300 |
commit | 2ef2f085fb743c12d1cabd71d42dd00334de696b (patch) | |
tree | 7fa9e2fa759f925d7278d7addb2b1737e24bd27b /intern/cycles | |
parent | 0e18a5643239203385258b7d64f2d6b15594fa46 (diff) |
Add an option to mesh.calc_tessface() to get rid of polygons and loops
The purpose of this change is to add extra possibility to render engines and
export scripts to reduce peak memory footprint during their operation.
This new argument should be used with care since it'll leave mesh in not really
compatible with blender format, but it's ok to be used on temp meshes.
Unfortunately, it's hard to get scene where it'll show huge benefit because
in my tests with cycles peak memory is reached in MEM_printmemlist_stats().
However, in the file with sintel dragon it gives around 1gig of memory benefit
after removing the polys which would allow other heavy to compute stuff such as
hair (or even pointiness calculation) to not be a peak memory usage.
In any case, this change is nice to have IMO, and only means more parts of
scene export code should be optimized memory-wise.
Reviewers: campbellbarton
Differential Revision: https://developer.blender.org/D1125
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/blender/blender_util.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/intern/cycles/blender/blender_util.h b/intern/cycles/blender/blender_util.h index 64fc352893a..9f7181cc564 100644 --- a/intern/cycles/blender/blender_util.h +++ b/intern/cycles/blender/blender_util.h @@ -47,7 +47,7 @@ static inline BL::Mesh object_to_mesh(BL::BlendData data, BL::Object object, BL: if (me.use_auto_smooth()) { me.calc_normals_split(); } - me.calc_tessface(); + me.calc_tessface(true); } return me; } |