0
$\begingroup$

I am trying to work out an easy, repeatable solution to this question:

I am using Line Art in Blender 4.0, not freestyle, but the problem persists.

I am trying to use a driver on the Noise Seed in the Noise Modifier to give it a random/value every 4 frames. I want this to be editable, pretty much recreating the "Randomize" option below it. I have used keyframes to get the result I want by changing the seed value every 4 frames with constant interpolation, but want a simple driver command to simplify/recreate this. The closest I have gotten is "(frame - 1) % 6 // 4" from this This Answer

However, my understanding of drivers/python is incredibly limited. Would be fantastic to get some kind of help here with a solution/possible description to increase my understanding of the process. Thank you.

The Keyframe Solution

$\endgroup$

2 Answers 2

1
$\begingroup$

(This answer is a frame challenge.)

Don't use a driver expression. Use fcurve modifiers.

  1. Set a keyframe on the Seed property.
  2. Open the keyframe editor.
  3. Add a Noise modifier to the fcurve and scale up the strength (to $1000$). [Set the Scale property to an odd value with decimal places to circumvent the artefacts of pseudo-random noise.]
  4. Add a Generator modifier to the fcurve and use the coefficients $500$ (for x^0) and $0$ for x^1. This shifts the curves and prevents negative values. (The seed can't be negative.)
  5. Add a Stepped modifier and set the step size to $4$.

stepped random value

$\endgroup$
1
  • $\begingroup$ Awesome thank you so much. I will give this a go, am probably going to use the floor driver listed above for most of my solutions but this seems far more versatile and a good exercise for me to undertake. $\endgroup$
    – heath
    Commented Feb 26 at 22:52
0
$\begingroup$

Try floor(frame / 4).

(Note that frame // 4 is substantially the same, but is a "Slow Python Expression", so is to be avoided.)

$\endgroup$
1
  • $\begingroup$ Sorry for a the late reply, thanks a ton for this addition. I think for my scenario this is the answer I am looking for. Thank you $\endgroup$
    – heath
    Commented Feb 26 at 22:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .