Commit: faf612f11378c6762cb2f656cb1b484ce943c0a2
Author: Lukas Tönne
Date:   Thu Feb 26 12:40:14 2015 +0100
Branches: gooseberry
https://developer.blender.org/rBfaf612f11378c6762cb2f656cb1b484ce943c0a2

Fix for child particle clumping noise, using the orco parent location
for clumping instead of deformed location.

The orco location must be used for roughness to ensure a stable shape,
but for moving child keys toward the parent (clumping) the deformed
location must be used.

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

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

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

diff --git a/source/blender/blenkernel/intern/particle_child.c 
b/source/blender/blenkernel/intern/particle_child.c
index 5c11584..1ccb557 100644
--- a/source/blender/blenkernel/intern/particle_child.c
+++ b/source/blender/blenkernel/intern/particle_child.c
@@ -607,19 +607,20 @@ float do_clump(ParticleKey *state, const float par_co[3], 
const float par_orco[3
        zero_v3(rough_offset);
        
        if (use_clump_noise && clump_noise_size != 0.0f) {
-               float center[3], noisevec[3], orco_offset[3];
+               float center_orco[3], center[3], noisevec[3], orco_offset[3];
                float da[4], pa[12];
                
                sub_v3_v3v3(orco_offset, orco, par_orco);
                mul_v3_v3fl(noisevec, orco_offset, 1.0f / clump_noise_size);
                voronoi(noisevec[0], noisevec[1], noisevec[2], da, pa, 1.0f, 0);
                mul_v3_fl(&pa[0], clump_noise_size);
-               add_v3_v3v3(center, par_orco, &pa[0]);
                
                if (clump_noise_random != 0.0f && mat) {
-                       simple_roughness(mat, clump_noise_random_size, 
clump_noise_random, center, time, rough_offset);
+                       add_v3_v3v3(center_orco, par_orco, &pa[0]);
+                       simple_roughness(mat, clump_noise_random_size, 
clump_noise_random, center_orco, time, rough_offset);
                }
                
+               add_v3_v3v3(center, par_co, &pa[0]);
                do_clump_level(state->co, state->co, center, time, clumpfac, 
clumppow, pa_clump, clumpcurve);
        }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to