[Bf-blender-cvs] [c1fd97f] master: Fix T45936: invalid cycles motion blur for particle rotation and children.

Alexander Gavrilov noreply at git.blender.org
Tue Jul 26 18:07:18 CEST 2016


Commit: c1fd97f15d7eb1862adf9de22cf9a6d363518573
Author: Alexander Gavrilov
Date:   Tue Jul 26 18:00:07 2016 +0200
Branches: master
https://developer.blender.org/rBc1fd97f15d7eb1862adf9de22cf9a6d363518573

Fix T45936: invalid cycles motion blur for particle rotation and children.

Commit rB709ca0ece changed how rotation was handled for particles so
that unless actual rotation physics is enabled, there is no rotation.
However it only updated ptcache_particle_read, forgetting to change
exactly the same code in ptcache_particle_interpolate.

This means that for subframes old code that computes a rotation from
velocity is used, resulting in completely different rotation than for
integer frames. This causes rotational motion blur by itself, and also
mangles motion blur paths of child particles.

Reviewers: sergey, lukastoenne

Maniphest Tasks: T45936

Differential Revision: https://developer.blender.org/D2124

===================================================================

M	source/blender/blenkernel/intern/pointcache.c

===================================================================

diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index e0a3e97..69a98c0 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -386,9 +386,9 @@ static void ptcache_particle_interpolate(int index, void *psys_v, void **data, f
 		}
 	}
 
-	/* determine rotation from velocity */
+	/* default to no rotation */
 	if (data[BPHYS_DATA_LOCATION] && !data[BPHYS_DATA_ROTATION]) {
-		vec_to_quat(keys[2].rot, keys[2].vel, OB_NEGX, OB_POSZ);
+		unit_qt(keys[2].rot);
 	}
 
 	if (cfra > pa->time)




More information about the Bf-blender-cvs mailing list