Animating noise with absTime.seconds
Transcript
00:01
- So one thing that we might wanna do is actually start to animate this. At the moment we have a static image which is being statically displaced with this noise. But what I might wanna do is make it have some animation. So how do we go about doing this? Now the thing that I wanna animate here is actually the noise itself. I want the noise to be something that actually changes and is fairly dynamic to make this displacement look different.
00:26
So the noise is a thing that I actually want to change here. Not the displacement itself. The displacement is fine, it's kind of shifted in different directions based on that weight. That's kind of good. It's just we want the kind of noise itself to do different things. Almost looking like this as I change the seed. This seed doesn't look too good if I animate it. As you can kind of tell here, it doesn't look very smooth. So how do we go about actually animating this properly? Now what you might notice on the parameters is there's actually tabs here as well.
00:55
So the first one is noise and the second one is transform, we've got output and also common as well. So there's actually more settings than what is here. What we can actually look at next is something called transform. Now, transform will include how this image is actually made how we're actually gonna move things around or how we're gonna rotate things if we can scale them up, for instance, you know, maybe I wanna scale it up maybe I wanna shift this over and make this number be really big.
01:22
So something like three. So I notice if I scale it down this way it's gonna make it look kind of shifting up that way as well. So we're gonna get different effects if we change some of these numbers too. But how do we animate them? That's the kind of next question. So what we can use is something that's built into TouchDesigner called Abs time. Absolute time.
01:41
What time is it right now? And basically change this based on the time. So what we're gonna do is first of all we're gonna translate this. Translate just means move or shift in a direction basically. And what I can do is I can click this plus over here and open this up. I've got an X, a TX, a TY, and a TZ. This is the direction our noise is moving in. So if I shift my noise over to the X direction, this thing in here will just be shifted across left and right.
02:11
If I do the Y direction, it's gonna be shifted up or down. But what about the Z direction? We'll talk about that in a second. So let's just animate it in the X direction for now. We're gonna be using something special that we're gonna type in. It's almost like a special bit of code we're gonna add. And this is gonna look like Abs with a capital T time. And that's what we're gonna write. And I'm gonna press enter. Now what this will do is it'll give us an error because it doesn't know exactly what in the time we want.
02:43
Is it milliseconds? Is it seconds? Is it something else? So we need to add some more to this. We're gonna take abs time and we're gonna add a dot or a period and then seconds if I can spell seconds correctly, 'cause we wanna do this in terms of seconds. So what we'll get now is a number that appears here which is based on how long this program's been running for which has kind of been a lot currently.
03:10
But what you can see is this noise is being shifted over in the kind of X direction. It's shifting across. So it's almost like we're having a window a frosted window that's kind of been shifted over our original image that looks like this. But that's not really the effect that we are going for here. So let's try this in the Y direction instead. We're gonna take this abs time dot seconds. We're gonna get rid of it, we're gonna put in zero instead. We're kind of don't wanna shift in the X direction.
03:39
Zero is fine, let's try it in the Y direction. So abs time with the capital T, dot seconds. Now this is almost like the window is shifting up and down now. So it's almost like we are taking this frosted window and shifting it up which again doesn't really look too good. What happens if we try it in the Z direction? What happens there? And you can kind of see this window being moved up here as well.
04:04
So this is kind of being shifted up in this direction as well in here at the same rate. So let's get rid of this we're gonna get rid of that, for zero. Let's try in the Z direction now. So abs, capital T time, dot seconds. So here we actually got something that looks a little bit more natural. It's almost like this window pane is almost like evolving and kind of this frosted glass is changing rather than going across in left or right or up and down, it's almost like it's changing as we kind of like go.
04:41
Now this maybe feels a little bit too aggressive right now. So what we're gonna do is kind of tone it down a little bit. So too strong, this is kind of changing too quickly. Let's actually tone it down. How do we do that? Well, we're gonna take this abs time dot seconds and multiply it. To multiply anything. We're gonna do a space and then an asterisk and then what number we wanna multiply it with. So if we wanna make it go faster we'll do it by two or five or 10.
05:09
We actually wanna go a little bit slower so we can do something like 0.1. So take the time and kinda make it a 10th of that. And what we get now is something that looks a lot softer. We can see that noise is changing but very slowly. But this has kind of made this distortion kind of look a little bit more natural now. So what we have here is we have our original image which doesn't change. Then we have our displacement, which is hasn't changed. There is no time based on it.
05:41
But we are changing the noise now and we're kind of making this Z direction be the thing that works this around. We can see as we kind of go, this feels a lot more natural. Now, before we move on to the next video one thing I just wanna say is always save. TouchDesigner doesn't really have a lot of things around like auto save. So I always like to save quite a lot. So just before we move on to the next video, I'm gonna save, there we go, save.
06:05
And the next video we'll talk about how we add more to this.