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
This commit is contained in:
Antonioya
2019-08-01 17:54:51 +02:00
parent 49b2162309
commit 80123efc5f
4 changed files with 19 additions and 72 deletions

View File

@@ -1685,6 +1685,9 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel):
row = col.row()
row.enabled = md.random
row.prop(md, "step")
row = col.row()
row.enabled = md.random
row.prop(md, "seed")
col.prop(md, "full_stroke")
col.prop(md, "move_extreme")