[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [31842] trunk/blender/source/blender/ blenkernel/intern/cloth.c: Partial fix for [#21948] Full sample motion blur with cloth - cloth and collision object render issue .
Janne Karhu
jhkarh at gmail.com
Thu Sep 9 13:07:07 CEST 2010
Revision: 31842
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31842
Author: jhk
Date: 2010-09-09 13:07:07 +0200 (Thu, 09 Sep 2010)
Log Message:
-----------
Partial fix for [#21948] Full sample motion blur with cloth - cloth and collision object render issue.
* Now cloth reads cache using subframes when rendering.
* Cloth cache also was reset every time on the start frame which kind of defeats the point of the caching.
Modified Paths:
--------------
trunk/blender/source/blender/blenkernel/intern/cloth.c
Modified: trunk/blender/source/blender/blenkernel/intern/cloth.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/cloth.c 2010-09-09 11:01:30 UTC (rev 31841)
+++ trunk/blender/source/blender/blenkernel/intern/cloth.c 2010-09-09 11:07:07 UTC (rev 31842)
@@ -446,7 +446,7 @@
return dm;
}
- if(clmd->sim_parms->reset || (framenr == (startframe - clmd->sim_parms->preroll)))
+ if(clmd->sim_parms->reset || (framenr == (startframe - clmd->sim_parms->preroll) && clmd->sim_parms->preroll != 0))
{
clmd->sim_parms->reset = 0;
cache->flag |= PTCACHE_OUTDATED;
@@ -512,7 +512,7 @@
}
/* try to read from cache */
- cache_result = BKE_ptcache_read_cache(&pid, (float)framenr, scene->r.frs_sec);
+ cache_result = BKE_ptcache_read_cache(&pid, (float)framenr+scene->r.subframe, scene->r.frs_sec);
if(cache_result == PTCACHE_READ_EXACT || cache_result == PTCACHE_READ_INTERPOLATED) {
implicit_set_positions(clmd);
More information about the Bf-blender-cvs
mailing list