Random with a range?

This section is dedicated to the feature & improvement requests (be sure what you are asking does not exist yet in TVPaint Animation ;) )
Post Reply
User avatar
djm99001
Posts: 57
Joined: 08 Oct 2006, 05:34

Random with a range?

Post by djm99001 »

Is it possible to write a plugin or script that could limit the randomness to within a range? For example, perhaps I have a brush that I want to rotate between -45 and +45 degrees randomly, so that it gives a jitter but keeps its general orientation.
Also, when I am controlling the brush size by pressure, sometimes I don't want the size to go so small--perhaps from 30 to 50 pixels, rather than from 1 to 50 pixels.
And why can't the opacity be controlled by pressure? Is that just the same thing as power?


David
Patrice
Posts: 895
Joined: 14 Feb 2006, 15:56
Location: Athis-Mons
Contact:

Post by Patrice »

Hi djm99001,
You can use the function RND(random). This function return a number between 0 and random.

So to have a value:
- between -45 and 45, you can write:
angle = RND(90) - 45

- between 30 and 50:
pixel = RND(20) + 30

All parameters, you can link with your pen, can be controlled by pressure.
Ex TVPaint Team
Post Reply