Add transcription for: week04 08 ik ribbon spine squash stretch color coding.wav
Browse files
transcriptions/week04 08 ik ribbon spine squash stretch color coding_transcription.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"text": " In this video, I want to show you how we can do some color coding. So at the moment, what we have is we can see that it's squashing and stretching, but it might be good for animators. You know, if they're squashing, stretching the spine just a little bit, it might be hard for them to see. And you know, also what we could probably add is maybe a multiplier so that it should, you know, whether it should stretch or not, or sorry, I think it will always stretch, whether it should keep the volume preservation or not, or that they can actually set a multiplier of how much it should keep the volume. And in that case, if we have that, then the animators can't really see easily how much they're squashing or how much they're stretching the spine. So it's usually a good idea to have some sort of color coding. So I want to show you that, how we can change the color here of our skin in that area of the part that we're stretching. And I we also have to do a little bit of cleanup at the end here too, because we have now new things here that we probably don't want to see all the time. Okay, let's do that here. So first let's start maybe with the color coding. So what we can do is if we go into the hyper shade and we look at which shader we have currently assigned to our body. So in this case for me it is like that shader here is I called it cloth shader and we also have a little bit of skin here so what I'm going to do is I'm going to duplicate that cloth shader and I'll call this maybe torso. And I have one just for the torso. And then what I'm going to do is I'm going to assign it to specific faces here, so maybe I'll go isolate selected. You can always assign it to more later, but start with a few of those here. Basically the ones, oops, not delete, basically the ones that I want to color code now. Actually, you know what, let's try this. Let's select a cloth here and say select objects with material. objects with material that will select us the ones that we have, and then I'll say the ones that I don't want or deselect the ones that I don't want to be, that I don't want to change color. It's not so important, I guess, but... something like that. Could have probably also painted the selection. It would have been easier. Okay, I'm done. Here we go. So perhaps we want to change the color on those guys here. Then we'll assign it the new shader, a cloth torso, assign material to selection. And now what we can do basically here is we can change things like, you know, the incandescence, which currently is that value, if we change it to something else, then we basically can change or influence the color here with that. Or we could also change just the color on the object itself. For example, making it a little bit more red or making it a little bit more blue or or whatever. So now we have to connect that up to our ratio. So we have to get back our ratio multiplier, find that in utilities. Let's see if we can find it. It should be under M somewhere. R, M, M-spine ratio. Here we go. So we have that in here. And now let's first do an easy setup here. I'm not worrying about what the color currently is, and I will kind of can restore the color later on. So the easy solution would probably be if it's smaller, if it's shrinking down, want one color and if it's getting bigger we want another color. So that is a condition. If it's true then we want one thing, if it's false then or the opposite then we want to have another thing. So for that we actually have a condition node in here. So if we type in condition, it's this guy here, condition. And here you can see we have the first term and the second term, so two values and Maya is going to compare those two values in that node and say, you know, if they're equal or greater than or less than or greater or equal than, if it's true, it's going to use one color and if it's false, it's going to use another color. So then let's take that output and connect it into the first term. output of the multiply divide connected into the first term. So one. Now if we're stretching it, you can see it's getting bigger. So if we put one here, that means now if this is getting bigger, then we can set that if it's greater than, if one point or this value, whatever it is, is bigger, greater than the second value. it's true, it's going to use those colors, and if it's false, it's going to be using those colors. So if we now connect that up into our cloth torso color, for example, or something else in the canvas, I usually like to use incandescent here, but actually it seems that I've lost my things here. So let's assign those again. Here we go. I usually like to use incandescent because that keeps the color as it is. But you could connect it to color or even to transparency, whatever you want. Let's try the incandescent first. So I'll connect the out color to the incandescent. OutColor goes to... Find the incandescent attribute, here we go. R to R, G to G, B to B. Now if we try that... At the moment not much is happening, it just means that if it's true, the incandescence is zero and if it's false, that means if it's getting shorter the incandescence will be one. So if we try that, again it's really probably would be better if we had an animation going here from bigger to smaller. Otherwise I always have to go in and select my control here. If it's getting bigger it's black and if it's getting smaller it should be turning white, but it doesn't because I think the trick was that it doesn't work with incandescence if I remember correctly. Oh yeah, I remember now. So it's kind of really weird. So for some reason you cannot directly connect incandescence and see it update here. It's kind of a myobug here. So what we'd have to use instead is we'd probably have to use an expression I think, or a setter and key might also work. But direct connections for some reason don't work with incandescent. So instead, let's break this connection here, because if we just set it to zero, then it works. But let's break this, leave it at black, and let's connect it to the color just for demo purposes, because I think that to work. It's out color. Color. If we change that now we can see. Don't tell me that doesn't either. It doesn't seem to be working either. Let's try a set room key instead. It's been a while since I did that. So let's try setRumKey if that works. SetKey. No, sorry, not setKey. And setRumKey is set. And it will load the conditional as a driver. I will load the shader here as the driven. And I will say outColorR is probably enough here, outColorR. And I will connect it to colorRGB. So if it's true, actually, this will make it a little bit tricky here. Let's try it with an expression instead, sorry. Let's come here and go on to the color and use some edit expressions and I will set it up that way. So we use the name of the condition node. So here it is condition one and it was outColor r. And then we'll put the color of the cloth towards the shader color r equals outColor. And then we can actually see a change, okay? It's really, you know, if you ask me, it's really stupid that Maya doesn't fix that. And then we can duplicate those lines and use a semicolon at the end and change it to RGB, G, P, G, P, and edit. And now we should be able to see that working. So now if we stretch it, it should become black. And if we squash it, it should become white. And we can see that working. Now we want to change it a little bit up. So we want to say, if it's stretching, it should become red. And if it's squashing, it should become blue. So then we go into our condition node and change those colors here. This is, again, RGB. So what we can do if it's true. So if it's greater than, then we want it to be red. So we just set it to red here, 1, 0, 0. If it's false, then we want it to be blue. So RGB. So that means we only have a value here in our last one. So we set it to zero and zero. And now if we try that again, we can see if it's stretching, it's red, and if it's squashing, it's becoming blue. It's getting smaller. And now what we can do is, or actually what we probably should have done in the beginning anyway is put it onto the incandescent instead because that should work now too, just like what we're doing with the color here. So we will put, I'll go back to our expression, which we should get if we're selecting this one here and we go to a new tab for example and show the output connections on this. Then we can see here is our expression in between. This is what it is. What we can also do is we can come into the expression editor. So it's under Window, Animation, Expression Editor, and then what we will do is we will search by expression. select by expression name. I will click on this expression and here is our expression. So now we can change that from, you know, that it doesn't change the color of the shader, but it instead changes the incandescence. So, and we might actually connect this up here now manually, I wonder if that works. Or is still not in condensants. And then we disconnect it from the color. Might not work. I'll have to see. Should I let's break this? Probably doesn't work. Let's type it in. Let's type it in. So incandescence instead of color, incandescence. Have to type it correctly here. Incandescence. T-E-S-C. I think I got it. Let's try it out. If not, then getting an arrow here, edit, and it does work. So we get expression1, so it did work here, in fact. And now this is working. So now instead of having it on the color, we have it on the incandescence. Okay. Now what we can see is it's turning color immediately. What would be nice if it would slowly kind of fade in and get redder, more and more red or more and more blue, the more we stretch and in the middle, it will still be its original color. So for that, what we can try to do is, on our condition node here, dial this to zero when it is kind of 1 here at the ratio. So we need our ratio again to find it in here. So left side m, m-spine ratio. And now we can use again a remap node probably to say if it's between 0 or rather if the ratio is 1 between 1 and 2, then it should kind of slowly dial up. And otherwise, it should dial down. So we probably need two remap values, so remap value. And we could do all of that probably also with set driven keys. If you're more familiar with set driven keys, I just want to show you kind of how we can use nodes for all of that. So we have to connect the ratio in here into the input, the ratio output into input value. So if we set this to, and again, usually I like using animations here, because then we can, especially if we're doing it live as we do, then we can move all these windows out of the way a little bit. We can kind of just set it to zero here, or to the default. Default is always here at the first frame, and then we're moving into a different valley here so we can kind of test it out as we go. We don't have to select things and move it. We just have to remember to delete the animation at the end. Okay, so now we have one and so what we want to remap is the minimum should be one and the maximum should for example be two if we you know stretch it up two units or whatever. So at a moment it's not even close to that, but that's what we want. And now we're remapping from one to two. If it's one, the color should be zero. And if it's maximum, if it's reaching two, then the color should be one. Okay, so it's kind of ramping up as we go towards two, and then two will be the maximum, and it won't change color after that. And now we take this, and we connect it to our red, if it's true, if this is stretching, okay, so this is dynamic. So if it's zero, then this will be zero. And if this is becoming, going towards 2, then this is becoming more and more red. So we connect the output of that now to remap into our condition node, output value, and we have to connect it to the condition node to the color if true r attribute. Color if true, color if true, attribute r. And now we get exactly that. So if it's 0, it's black, as you can see here. And as we're dialing it in, it's becoming more and more red. It's going more and more towards red. So the more we stretch it, stretch it even more, you will see it's becoming more and more red. At one point, of course, it will then flip. But so this is how we can kind of set up a dynamic change. And now we have to do the same for the opposite side as well. So we need a different remap node, a new one, remap value. And now we have to remap for the opposite way. So now we have to remap, well if the ratio is, so we have to connect it in again, the ratio output x into the value, input value. Now we have to say, okay, well by default it will be one. Actually we probably have to do it the other way around. So the maximum can be one. After that it won't change anymore. And then the minimum will be, for example, zero or 0.5 depending on how much we want to be able to compress. So if we want to go all the way to zero, then this would be the minimum and it goes between zero and one. And now if it's the maximum one, that means this, the spine is going to be at the default. So then we want the color, the blue to be zero. And if it's at the minimum, if it's like all the way compressed down, then we want the color blue to be one, right? So we want it to be one. if it's all the way at zero and if the spine has a length of one, it's not stretched or squashed and we want the value of zero. Now this one we have to now connect to the color of false B so that when we're compressing it down, that it starts out with zero, which basically means this would be zero, and then as it's squashing more and more it will become one. So now we connect that to the color if false blue channel. This output value, out value here, into color if false blue. And now what we're doing that we can see that it already changed color a little bit. And now we're essentially getting exactly that. Okay, so it's becoming more and more red, it's becoming more and more blue. So and at the middle, if we set this to zero, then we see it's black. It's still not the original color, but that is only because we messed with the color originally, so we set this color to, it's now gray, so we have to restore that color that we had earlier. Let's try, I see if we can do that. So we have our cloth, our original cloth object still here, so we have those colors that it was by default, so we'll copy those and we'll paste them on here. Or what you could also do is you could probably also go onto the cloth and just pick the color here, you know, kind of store it. It's a little bit finicky here I find, but then you have the color in there and then you could come to your cloth torso and kind of pick that color that we used before. I think it was this one, or that one, this one. And then you should have the the same kind of values hopefully and you do. Now there's still a difference in terms of color and that difference is coming from the fact that here in incandescence we already have values by default, right? So while with this one here we have disconnected by the expression so now it's zero all the incandescences but what we could now do is we could add those incandescences that we had before with a plus minus node for example. So instead of just going from the expression directly in here, we could add on top of it a, you know, the incandescent spec that we had here, those values. So we can try that too. So we can try that adding a plus minus node. We could probably also do it in the expression itself, just saying, you know, plus those values that might actually be the easiest now thinking about it, and we don't even need that extra node. We just have to kind of write down the values that we have here. So if 0.1, 0.0, 0.5, 0.0, 0.5, either write them down or remember them, try to remember them. And then we'll go back into our expression. Best with animation, or window animation expression editor. Go to our expression and then just say plus 0.1 I think it was plus 0.005 plus 0.005 that I think were the default values. If we hit that, edit, then we can see now those two colors are exactly the same, but now we still have the ability that it is becoming more red or more blue as we squash and stretch. And now we could of course assign the shader really to the pieces where we want the color coding and we could do kind of the same thing for the body skin as well if we want the color on these faces here to change as well as we squash and stretch. Especially useful, you know, perhaps if you have clothing on it, then probably I would do this obviously on the most outer layer. So if you have clothing on your character, then I would do the color coding on the clothing shader and not on the skin shader if this is hidden inside. So yeah, this is how we can add color coding to this question stretch.",
|
| 3 |
+
"segments": [
|
| 4 |
+
{
|
| 5 |
+
"text": " In this video, I want to show you how we can do some color coding. So at the moment, what we have is we can see that it's squashing and stretching, but it might be good for animators. You know, if they're squashing, stretching the spine just a little bit, it might be hard for them to see. And you know, also what we could probably add is maybe a multiplier so that it should, you know, whether it should stretch or not, or sorry, I think it will always stretch, whether it should keep the volume preservation or not, or that they can actually set a multiplier of how much it should keep the volume. And in that case, if we have that, then the animators can't really see easily how much they're squashing or how much they're stretching the spine. So it's usually a good idea to have some sort of color coding. So I want to show you that, how we can change the color here of our skin in that area of the part that we're stretching. And I we also have to do a little bit of cleanup at the end here too, because we have now new things here that we probably don't want to see all the time. Okay, let's do that here. So first let's start maybe with the color coding. So what we can do is if we go into the hyper shade and we look at which shader we have currently assigned to our body. So in this case for me it is like that shader here is I called it cloth shader and we also have a little bit of skin here so what I'm going to do is I'm going to duplicate that cloth shader and I'll call this maybe torso. And I have one just for the torso. And then what I'm going to do is I'm going to assign it to specific faces here, so maybe I'll go isolate selected. You can always assign it to more later, but start with a few of those here. Basically the ones, oops, not delete, basically the ones that I want to color code now. Actually, you know what, let's try this. Let's select a cloth here and say select objects with material. objects with material that will select us the ones that we have, and then I'll say the ones that I don't want or deselect the ones that I don't want to be, that I don't want to change color. It's not so important, I guess, but... something like that. Could have probably also painted the selection. It would have been easier. Okay, I'm done. Here we go. So perhaps we want to change the color on those guys here. Then we'll assign it the new shader, a cloth torso, assign material to selection. And now what we can do basically here is we can change things like, you know, the incandescence, which currently is that value, if we change it to something else, then we basically can change or influence the color here with that. Or we could also change just the color on the object itself. For example, making it a little bit more red or making it a little bit more blue or or whatever. So now we have to connect that up to our ratio. So we have to get back our ratio multiplier, find that in utilities. Let's see if we can find it. It should be under M somewhere. R, M, M-spine ratio. Here we go. So we have that in here. And now let's first do an easy setup here. I'm not worrying about what the color currently is, and I will kind of can restore the color later on. So the easy solution would probably be if it's smaller, if it's shrinking down, want one color and if it's getting bigger we want another color. So that is a condition. If it's true then we want one thing, if it's false then or the opposite then we want to have another thing. So for that we actually have a condition node in here. So if we type in condition, it's this guy here, condition. And here you can see we have the first term and the second term, so two values and Maya is going to compare those two values in that node and say, you know, if they're equal or greater than or less than or greater or equal than, if it's true, it's going to use one color and if it's false, it's going to use another color. So then let's take that output and connect it into the first term. output of the multiply divide connected into the first term. So one. Now if we're stretching it, you can see it's getting bigger. So if we put one here, that means now if this is getting bigger, then we can set that if it's greater than, if one point or this value, whatever it is, is bigger, greater than the second value. it's true, it's going to use those colors, and if it's false, it's going to be using those colors. So if we now connect that up into our cloth torso color, for example, or something else in the canvas, I usually like to use incandescent here, but actually it seems that I've lost my things here. So let's assign those again. Here we go. I usually like to use incandescent because that keeps the color as it is. But you could connect it to color or even to transparency, whatever you want. Let's try the incandescent first. So I'll connect the out color to the incandescent. OutColor goes to... Find the incandescent attribute, here we go. R to R, G to G, B to B. Now if we try that... At the moment not much is happening, it just means that if it's true, the incandescence is zero and if it's false, that means if it's getting shorter the incandescence will be one. So if we try that, again it's really probably would be better if we had an animation going here from bigger to smaller. Otherwise I always have to go in and select my control here. If it's getting bigger it's black and if it's getting smaller it should be turning white, but it doesn't because I think the trick was that it doesn't work with incandescence if I remember correctly. Oh yeah, I remember now. So it's kind of really weird. So for some reason you cannot directly connect incandescence and see it update here. It's kind of a myobug here. So what we'd have to use instead is we'd probably have to use an expression I think, or a setter and key might also work. But direct connections for some reason don't work with incandescent. So instead, let's break this connection here, because if we just set it to zero, then it works. But let's break this, leave it at black, and let's connect it to the color just for demo purposes, because I think that to work. It's out color. Color. If we change that now we can see. Don't tell me that doesn't either. It doesn't seem to be working either. Let's try a set room key instead. It's been a while since I did that. So let's try setRumKey if that works. SetKey. No, sorry, not setKey. And setRumKey is set. And it will load the conditional as a driver. I will load the shader here as the driven. And I will say outColorR is probably enough here, outColorR. And I will connect it to colorRGB. So if it's true, actually, this will make it a little bit tricky here. Let's try it with an expression instead, sorry. Let's come here and go on to the color and use some edit expressions and I will set it up that way. So we use the name of the condition node. So here it is condition one and it was outColor r. And then we'll put the color of the cloth towards the shader color r equals outColor. And then we can actually see a change, okay? It's really, you know, if you ask me, it's really stupid that Maya doesn't fix that. And then we can duplicate those lines and use a semicolon at the end and change it to RGB, G, P, G, P, and edit. And now we should be able to see that working. So now if we stretch it, it should become black. And if we squash it, it should become white. And we can see that working. Now we want to change it a little bit up. So we want to say, if it's stretching, it should become red. And if it's squashing, it should become blue. So then we go into our condition node and change those colors here. This is, again, RGB. So what we can do if it's true. So if it's greater than, then we want it to be red. So we just set it to red here, 1, 0, 0. If it's false, then we want it to be blue. So RGB. So that means we only have a value here in our last one. So we set it to zero and zero. And now if we try that again, we can see if it's stretching, it's red, and if it's squashing, it's becoming blue. It's getting smaller. And now what we can do is, or actually what we probably should have done in the beginning anyway is put it onto the incandescent instead because that should work now too, just like what we're doing with the color here. So we will put, I'll go back to our expression, which we should get if we're selecting this one here and we go to a new tab for example and show the output connections on this. Then we can see here is our expression in between. This is what it is. What we can also do is we can come into the expression editor. So it's under Window, Animation, Expression Editor, and then what we will do is we will search by expression. select by expression name. I will click on this expression and here is our expression. So now we can change that from, you know, that it doesn't change the color of the shader, but it instead changes the incandescence. So, and we might actually connect this up here now manually, I wonder if that works. Or is still not in condensants. And then we disconnect it from the color. Might not work. I'll have to see. Should I let's break this? Probably doesn't work. Let's type it in. Let's type it in. So incandescence instead of color, incandescence. Have to type it correctly here. Incandescence. T-E-S-C. I think I got it. Let's try it out. If not, then getting an arrow here, edit, and it does work. So we get expression1, so it did work here, in fact. And now this is working. So now instead of having it on the color, we have it on the incandescence. Okay. Now what we can see is it's turning color immediately. What would be nice if it would slowly kind of fade in and get redder, more and more red or more and more blue, the more we stretch and in the middle, it will still be its original color. So for that, what we can try to do is, on our condition node here, dial this to zero when it is kind of 1 here at the ratio. So we need our ratio again to find it in here. So left side m, m-spine ratio. And now we can use again a remap node probably to say if it's between 0 or rather if the ratio is 1 between 1 and 2, then it should kind of slowly dial up. And otherwise, it should dial down. So we probably need two remap values, so remap value. And we could do all of that probably also with set driven keys. If you're more familiar with set driven keys, I just want to show you kind of how we can use nodes for all of that. So we have to connect the ratio in here into the input, the ratio output into input value. So if we set this to, and again, usually I like using animations here, because then we can, especially if we're doing it live as we do, then we can move all these windows out of the way a little bit. We can kind of just set it to zero here, or to the default. Default is always here at the first frame, and then we're moving into a different valley here so we can kind of test it out as we go. We don't have to select things and move it. We just have to remember to delete the animation at the end. Okay, so now we have one and so what we want to remap is the minimum should be one and the maximum should for example be two if we you know stretch it up two units or whatever. So at a moment it's not even close to that, but that's what we want. And now we're remapping from one to two. If it's one, the color should be zero. And if it's maximum, if it's reaching two, then the color should be one. Okay, so it's kind of ramping up as we go towards two, and then two will be the maximum, and it won't change color after that. And now we take this, and we connect it to our red, if it's true, if this is stretching, okay, so this is dynamic. So if it's zero, then this will be zero. And if this is becoming, going towards 2, then this is becoming more and more red. So we connect the output of that now to remap into our condition node, output value, and we have to connect it to the condition node to the color if true r attribute. Color if true, color if true, attribute r. And now we get exactly that. So if it's 0, it's black, as you can see here. And as we're dialing it in, it's becoming more and more red. It's going more and more towards red. So the more we stretch it, stretch it even more, you will see it's becoming more and more red. At one point, of course, it will then flip. But so this is how we can kind of set up a dynamic change. And now we have to do the same for the opposite side as well. So we need a different remap node, a new one, remap value. And now we have to remap for the opposite way. So now we have to remap, well if the ratio is, so we have to connect it in again, the ratio output x into the value, input value. Now we have to say, okay, well by default it will be one. Actually we probably have to do it the other way around. So the maximum can be one. After that it won't change anymore. And then the minimum will be, for example, zero or 0.5 depending on how much we want to be able to compress. So if we want to go all the way to zero, then this would be the minimum and it goes between zero and one. And now if it's the maximum one, that means this, the spine is going to be at the default. So then we want the color, the blue to be zero. And if it's at the minimum, if it's like all the way compressed down, then we want the color blue to be one, right? So we want it to be one. if it's all the way at zero and if the spine has a length of one, it's not stretched or squashed and we want the value of zero. Now this one we have to now connect to the color of false B so that when we're compressing it down, that it starts out with zero, which basically means this would be zero, and then as it's squashing more and more it will become one. So now we connect that to the color if false blue channel. This output value, out value here, into color if false blue. And now what we're doing that we can see that it already changed color a little bit. And now we're essentially getting exactly that. Okay, so it's becoming more and more red, it's becoming more and more blue. So and at the middle, if we set this to zero, then we see it's black. It's still not the original color, but that is only because we messed with the color originally, so we set this color to, it's now gray, so we have to restore that color that we had earlier. Let's try, I see if we can do that. So we have our cloth, our original cloth object still here, so we have those colors that it was by default, so we'll copy those and we'll paste them on here. Or what you could also do is you could probably also go onto the cloth and just pick the color here, you know, kind of store it. It's a little bit finicky here I find, but then you have the color in there and then you could come to your cloth torso and kind of pick that color that we used before. I think it was this one, or that one, this one. And then you should have the the same kind of values hopefully and you do. Now there's still a difference in terms of color and that difference is coming from the fact that here in incandescence we already have values by default, right? So while with this one here we have disconnected by the expression so now it's zero all the incandescences but what we could now do is we could add those incandescences that we had before with a plus minus node for example. So instead of just going from the expression directly in here, we could add on top of it a, you know, the incandescent spec that we had here, those values. So we can try that too. So we can try that adding a plus minus node. We could probably also do it in the expression itself, just saying, you know, plus those values that might actually be the easiest now thinking about it, and we don't even need that extra node. We just have to kind of write down the values that we have here. So if 0.1, 0.0, 0.5, 0.0, 0.5, either write them down or remember them, try to remember them. And then we'll go back into our expression. Best with animation, or window animation expression editor. Go to our expression and then just say plus 0.1 I think it was plus 0.005 plus 0.005 that I think were the default values. If we hit that, edit, then we can see now those two colors are exactly the same, but now we still have the ability that it is becoming more red or more blue as we squash and stretch. And now we could of course assign the shader really to the pieces where we want the color coding and we could do kind of the same thing for the body skin as well if we want the color on these faces here to change as well as we squash and stretch. Especially useful, you know, perhaps if you have clothing on it, then probably I would do this obviously on the most outer layer. So if you have clothing on your character, then I would do the color coding on the clothing shader and not on the skin shader if this is hidden inside. So yeah, this is how we can add color coding to this question stretch."
|
| 6 |
+
}
|
| 7 |
+
]
|
| 8 |
+
}
|