diff options
author | Antonioya <blendergit@gmail.com> | 2019-08-01 18:54:51 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2019-08-01 19:07:57 +0300 |
commit | 80123efc5fc258ef8b27efba67d6ad2a0efb7edd (patch) | |
tree | 917b2efd1309706af001d8037aa19773da54de53 /source/blender/makesdna/DNA_gpencil_modifier_types.h | |
parent | 49b2162309da6abf66764d41d9fc4c45ad01936c (diff) |
Fix T67939: GPencil Noise modifier wrong random calculation
There were several problems in the old random calculation:
* Different result in the viewport and render.
* Noise "pop" in some frames.
* Random number was calculated every time the file was opened, so get different results.
Now, instead to calculate the random numbers when n number of frames changed, the random values are calculated using a unique seed by stroke.
Also, a new Seed parameter has been added and this adds more control in the noise generated. This value can be animated and get more variations.
Differential Revision: http://developer.blender.org/D5393
Diffstat (limited to 'source/blender/makesdna/DNA_gpencil_modifier_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_gpencil_modifier_types.h | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/source/blender/makesdna/DNA_gpencil_modifier_types.h b/source/blender/makesdna/DNA_gpencil_modifier_types.h index c2a9d3cf296..47347753f42 100644 --- a/source/blender/makesdna/DNA_gpencil_modifier_types.h +++ b/source/blender/makesdna/DNA_gpencil_modifier_types.h @@ -90,16 +90,10 @@ typedef struct NoiseGpencilModifierData { float factor; /** How many frames before recalculate randoms. */ int step; - /** Last gp frame used. */ - int gp_frame; - /** First scene frame used. */ - int scene_frame; - /** Random values. */ - float vrand1, vrand2; - struct RNG *rng; /** Custom index for passes. */ int layer_pass; - char _pad[4]; + /** Random seed */ + int seed; } NoiseGpencilModifierData; typedef enum eNoiseGpencil_Flag { |