Академический Документы
Профессиональный Документы
Культура Документы
Share
subtitles settings
subtitles off
en
00:00:32,580 you should already have a pretty good grasp on how all
00:00:38,475 We'll add more complexity to the rig, but it will also
00:01:13,376 So, the thick end is on this side, and tapers out
00:01:25,104 So let's jump right in, and take a look at how we could
00:02:02,523 And the way that the reverse taper will actually work
00:02:30,448 And if we take a look at the variable for the stroke taper,
00:02:45,176 And give it a new name, say, reverse stroke taper ...
00:03:29,155 I'll drop down one line, and start writing my statement.
00:04:48,565 and it's dropped that curly bracket down one more line.
00:05:02,954 But why do I need this indentation and this curly bracket
00:05:07,375 Well, when you're writing code, things can get very messy,
00:05:30,306 Then you have a line of code for whatever you want
00:06:14,381 so I'll copy and paste that inside that curly bracket.
00:06:20,265 really quick, is you see that when I have my cursor right
00:07:37,969 And that's because the master stroke width doesn't have
00:08:04,789 So I'm just gonna open up the stroke width for the duplicate
00:08:21,928 And then we're gonna need the reverse taper checkbox.
00:08:44,551 One, which again, just means that the checkbox is checked.
00:09:34,577 So when the taper out is set to zero, we want the stroke
00:09:37,869 width, and when it's set to 100, we want it to be
00:10:10,717 Let's go down to our stroke width for the master group,
00:10:23,938 you'll see that the last duplicate group is 28 pixels wide,
00:10:32,355 And that's because we accounted for this extra master group,
00:11:14,654 group, when the reverse stroke taper comes into play.
00:11:42,830 And now you can clearly see that the master group
00:11:56,553 Awesome!
00:12:01,074 which is really what we'll been using for all of the other
00:12:39,323 Now there are a lot more things you can do with
00:12:45,228 And we're gonna have to get a little bit more complex
00:12:59,190 So, I'll type in VAR taper both, for the taper in and out.
00:14:12,492 because I've already got one on the next else statement.
00:15:39,928 the rst line, and the other half will be a ected
00:15:49,551 Well let's make sure we know which groups those are.
00:16:22,472 the regular taper, and paste that into that section.
00:16:26,893 If the group index is not greater than half the total
00:16:33,540 Or, reverse the taper, which I have the line of code
00:17:49,682 And there we go, now that slider is a ecting the rst
00:17:53,002 half, and the taper out slider is a ecting the second half.
00:18:02,190 When these two numbers aren't the same, you see that
00:18:08,565 Now the reason this is happening is because the way that
00:18:23,292 And when I check it, it leaves this part of the taper
00:18:26,407 the way it was, and shrinks down the front half
00:18:36,318 All I have to do is come in here and account for the fact
00:18:52,114 And that will double the taper amount for each half
00:19:15,580 And again, the taper out slider is a ecting that half,
00:19:54,612 But, be consistent and just end lines with those semicolons.
00:20:50,032 Now that master stroke ts in with the rest of the taper.
00:22:59,502 And I can uncheck reverse taper, and it goes back to normal.
00:23:11,286 Now, let's say that you were using this taper on something
00:23:14,412 like a write on, where you had letters that you were
00:24:27,843 and the group index that this expression is applied on,
00:24:57,951 So, I think the stroke width of the master stroke has that.
00:25:07,235 And, this line of code is accounting for the master group.
00:25:39,672 the last duplicate in this list has a start value of zero
00:26:01,354 and it still works, and I can do the taper in and out,
00:26:07,745 Now I just want to talk about how you might animate
00:26:12,121 So, if you set a key frame on the end value, and
00:26:33,486 you see that as soon as this value goes past zero,
00:26:37,649 the front end of the taper just pops on, it just appears.
00:26:41,190 And I'm not really happy with the way that that looks.
00:26:47,074 with that, and possibly the segment length at the same time.
00:26:51,322 So let me go to right about here, where it's the rst frame
00:26:54,654 that you can see the entire line, and I'll set a key frame
00:27:07,877 Then I'll probably want to easy ease these key frames
00:27:19,414 But because these key frames are eased, and these key frames
00:27:24,005 aren't in the exact same place, and they're also eased,
00:27:29,923 And if I went into the graph editor, and modi ed these
00:27:32,883 at all, then where these two key frames are positioned
00:27:45,710 the stroke width or the segment length, and that scaling
00:28:07,985 Remember, all of these segments are the exact same length
00:29:01,750 Okay, so now let's go back up and write the actual equation.
00:29:35,289 Take the end slider's range from zero to segment length,
00:29:45,015 and remap the values from the end value to the equation
00:30:00,723 you see that as soon as this slider hits the segment
00:30:19,851 And maybe I'll knock down the number of duplicates to ve.
00:30:36,499 The next part of the problem is that the stroke width
00:30:40,735 But the duplicate stroke widths are not based on the master
00:30:50,624 I'll extend this out so I can see the whole line.
00:30:56,182 I'll load that up, and this is where I'm going to point out
00:31:21,822 But for now, let's just say these checkboxes are unchecked.
00:31:52,060 And then I will type auto, shrink, in, equals one.
00:32:32,322 So for the master stroke, it's not that complicated at all.
00:33:07,377 Now, if this end value goes below 50, you can see that
00:33:15,473 Great.
00:33:16,529 So let's make that same functionality happen
00:33:20,674 I'll load up the stroke width for the rst duplicate.
00:35:25,173 As I bring this down, not only does the segment length
00:35:28,044 get smaller, but the stroke width also gets smaller.
00:35:50,077 So, as soon as that tail end of the line hits the front
00:36:54,152 And this is where it's gonna get a little bit di erent.
00:37:18,676 the segment length, rather than just the segment length.
00:37:40,347 and make sure that I delete this duplicate curly bracket,
00:37:53,107 So once the slider reaches 100, the start value should
00:38:00,289 Alright, let's apply that to the master trim paths' start,
00:39:21,717 and the end slider is greater than the segment length,
00:39:37,445 So that's how we can apply both the auto shrink out
00:39:50,171 I'll check both boxes, and move the end slider back,
00:40:03,384 And let's just double check the controls to make sure
00:40:07,597 Yep, and the auto shrink out still works on the trim paths
00:40:24,481 So I'll just duplicate this variable, and adjust the naming.
00:40:35,097 Then let's start with just the single auto shrink out
00:41:22,258 The front master group, you can see, is scaling down.
00:41:26,098 Now let's account for the auto shrink in also being checked,
00:42:33,291 so I will just copy it from the one we were just using.
00:43:21,491 Drop down an indent, and say if, auto shrink out
00:44:20,706 And the auto shrink out only, auto shrink in is disabled,
00:45:22,980 shrink in, so that if both are checked, and the segment
00:45:25,695 length is great than 50, it ignores the auto shrink out.
00:45:32,772 So let's just jump back to the master trim path start value.
00:46:02,474 But I'll apply that to the master trim path start.
00:46:14,807 auto shrink in, and paste this code right here.
00:46:26,750 So, auto shrink out is one, and end is greater than segment
00:46:29,980 length, and the segment length is less than or equal to 50.
00:46:48,078 After the segment length I will paste and apply that.
00:47:12,686 So, let's take a look at how this could be animated now.
00:47:33,818 And with just two key frames, I'm able to animate this taper
00:47:37,101 in and out, and it will automatically scale up, and scale
00:48:18,831 that controls the stroke width auto shrink in and out.
00:48:57,518 For example, if you had the trail enabled, and reverse taper
00:49:02,327 was o , and you animated this out, and had auto shrink out
00:49:27,540 Then you would want the taper to scale up into that
00:49:34,964 and you have to take a lot more things into account.
00:49:37,800 I'm going to spare walking you through every single line
00:49:40,772 of code, and instead jump to the nal rig, and just
00:49:59,872 being checked, and the auto shrink out being checked.
00:50:03,093 Now, you already see that this is single width line,
00:50:10,634 that taper now scales down to the smallest stroke width,
00:50:17,530 That makes things likes write ons with text so much easier,
00:50:21,182 because you end up with a single width line by the time
00:50:36,208 I'll back that up, and you see that both halves
00:51:03,610 And the reason why there are so many more lines of code
00:51:14,956 So for example, that trail combined with auto shrink out.
00:51:18,730 Well, I'll scroll down to the bottom where we have auto
00:51:23,658 And you'll see that the rst thing I do is check to see
00:51:33,328 The result of all of the conditions, and you can see
00:51:41,360 The only thing that has changed is how that range
00:51:46,387 So, if the auto shrink out is on, and trail is on,
00:52:40,764 And like I said, you can see this same format repeated
00:53:20,490 this curly bracket, and this curly bracket, and check
00:53:59,893 Now, all of that code is just for the stroke width
00:54:07,556 So if I open that up, and take a look at the master stroke
00:54:23,995 But there were some things I needed to take into account.
00:54:43,720 And that structure is the foundation for every single one
00:54:49,099 One last thing I want to point out is that you'll see
00:55:29,750 So if you use one line comments, make sure they go after
00:55:36,109 Now you can make a comment not extend an entire line,
00:55:48,625 And I can even drop this down a line, and add more text,
00:56:01,995 Oh my gosh.
00:56:11,829 the block, because that was probably way too much code
00:56:46,376 Thanks so much for watching, and I'll see you next time.
Similar lessons