This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
My background Layer has the open eye. My top layer has the drawing with the closed eyelid. I'm trying to write a script that will make the layer "blink" on and off at random intervals mimicking a human eye blinking timing pattern.
I was having CHATGPT help me with this, and even though ChatGPT opened by saying it isn't really familiar how to write scripts for aftereffects, that it would try its best. After a few hours we came up with this:
seedRandom(index, timeless = true);
var baseBlinkTime = random(0.1, 20); // Time between blinks (in seconds)
var blinkTime = baseBlinkTime random(-0.5, 0.5); // Add some randomness to blink time
var blinkDuration = random(2, 5) random(-1, 1); // Add some randomness to blink duration
if (Math.floor(time/blinkTime) % 2 == 0){
if (Math.floor(time*10) % (blinkTime*10) < blinkDuration){
100;
} else {
value;
}
} else {
value;
}
However the blinking layer still seems to only blink on at a rather mechanical interval or 4.5 seconds. I want it to be more organic, sometimes blinking a few times in short succession, sometimes blinking longer apart like maybe 10 or even 20 seconds.
At this point any fixes GPT had either made the layer stay 100% opacity at all times, or be at 0% opacity at all times.
I did try to search and couldn't find any tutorials describing the effect I was trying to achieve, which is why I went to the ChatGPT that I keep hearing all these stories about it being so great and writing code. I was impressed that it levelled with me and said it wasn't too familiar with aftereffects because it hasn't really had access to information about it. It wasn't confident at all, but it did help a lot in almost making the effect I wanted. What a nice kid.
Anyway, can anyone help me and robotbro finish this problem?
Subreddit
Post Details
- Posted
- 1 year ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/AfterEffect...