| 00:00 | In the previous movie, we created user
data that contained a slider that controlled
|
| 00:04 | the Offset function of the
spline wrap object here on our scene.
|
| 00:07 | What we're going to do in this movie
is to duplicate these objects and show
|
| 00:11 | how to create a single slider and
show how to use that single slider to
|
| 00:15 | control multiple objects.
|
| 00:18 | This is the scene file as we left off
in the previous movie, and I've got a
|
| 00:22 | Slider's Null Object here, and there's a
User Data field on here with the slider
|
| 00:26 | on it that is animated from 0 to 100 percent.
|
| 00:31 | So what we want to be able to do is to
duplicate the relationship of the matrix
|
| 00:35 | object in the spheres on the spline,
but leave the big sphere alone.
|
| 00:38 | We want to have just one big sphere
and multiple copies of these objects
|
| 00:42 | traveling through it.
|
| 00:43 | You'll see why in just a moment.
|
| 00:45 | Before we do that though there's a
very important thing we have to fix on the
|
| 00:49 | XPresso tag for this spline wrap.
|
| 00:52 | When we used Set Driven Keys to create
the relationship in the previous movie,
|
| 00:56 | we told it to do an absolute reference,
but it only does an absolute reference
|
| 01:00 | for half of the equation.
|
| 01:01 | Let's see what that means.
|
| 01:03 | If I double-click on this XPresso tag, I
now get the XPresso Editor, and it looks
|
| 01:08 | like I only have two nodes in here, but
it's a little bit tangled up right now
|
| 01:12 | so I have to untangle my nodes.
|
| 01:14 | So let's take the Range Mapper and
drag it down here, and drag the Sphere over
|
| 01:18 | here, and drag the Sliders over here.
|
| 01:20 | Now you can see this whole relationship.
|
| 01:23 | This Range Mapper node is automatically
placed when you use Set Driven Keys, and
|
| 01:27 | what a Range Mapper does is
interpret data between two different nodes.
|
| 01:32 | It can interpret data in
a lot of different ways.
|
| 01:34 | In this case, it's basically a
straight pass-through, but we're going to
|
| 01:37 | use this Range Mapper node in a little bit
later to control the speed of our objects.
|
| 01:42 | So if we look at the Sliders node, and in
the Attributes for the Slider node, you
|
| 01:48 | see in fact it does have an Absolute Reference.
|
| 01:50 | And this was created when we right-
clicked and did the Set Driven Absolute.
|
| 01:53 | Now if you look at the Sphere spline
wrap node and you click on that, you can
|
| 01:57 | see that that one is set
to be a Relative Reference.
|
| 02:00 | That means if we move this tag
off the object, it won't work.
|
| 02:03 | So what we need to be able to do is to
move this tag any place in the scene.
|
| 02:08 | So I'm going to set the mode from
Relative Reference to Absolute Reference.
|
| 02:12 | What that will do is now no matter
where we put this tag, it will always point
|
| 02:15 | back to this same spline wrap object.
|
| 02:17 | Objects in CINEMA 4D have something
called an Object Index and that index is
|
| 02:21 | independent from the name.
|
| 02:23 | So now that we've fixed that very
important element, what we need to do is to
|
| 02:27 | make copies of this relationship.
|
| 02:29 | Let's twirl close the Blobby uber object.
|
| 02:31 | And I'm going to hold down
the Control key and drag down.
|
| 02:36 | That's going to create a Blobby uber.1.
|
| 02:38 | It looks like nothing has happened.
|
| 02:39 | That's because we now have two
in exactly the same position.
|
| 02:42 | So let's go into Point mode if you're
not there already, and then twirl open the
|
| 02:46 | Blobby uber.1 and let's
grab the spline that's in there.
|
| 02:50 | Let's move the points around a bit.
|
| 02:52 | Let's close the XPresso Editor for
just a moment, and let's grab the points on
|
| 02:56 | this side of this spline
and I'll move them over here.
|
| 02:58 | You can see that I in fact now have two splines.
|
| 03:01 | Let's take these points and move them over here.
|
| 03:04 | I'm grabbing the axis band.
|
| 03:06 | It doesn't really matter where you put them.
|
| 03:08 | This is going to be a very abstract
sort of element and I'm just going to be
|
| 03:12 | kind of roughing these in.
|
| 03:14 | Then I want to take this last point,
and there's a very tight bend here.
|
| 03:18 | I'm going to go twirl open this one and
grab the spline and grab this point here
|
| 03:22 | and just drag it out to soften that curve.
|
| 03:25 | Now you can see that when we scrub
through we've got two sets of these spheres
|
| 03:29 | traveling through that central sphere.
|
| 03:31 | Let's do one more copy.
|
| 03:34 | Twirl close the Blobby uber.1.
|
| 03:36 | You want to make sure and select the
actual object first and then hold down the
|
| 03:41 | Ctrl key and that makes Blobby uber.2.
|
| 03:44 | Let's move the points on the spline for Blobby
uber.2 and let's move those up. Sounds good.
|
| 03:50 | I'll take that and move it up there.
|
| 03:52 | Take that point, move it up here.
|
| 03:55 | Take both of those points and
move them at the same time up here.
|
| 03:59 | Let's move them closer in, too.
|
| 04:00 | I think that's better.
|
| 04:04 | So now when you hit play, you can see
that we've got three sets of these spheres
|
| 04:09 | traveling through that central location.
|
| 04:10 | Now right now all these spheres are
traveling at the same speed in the same
|
| 04:14 | direction, approximately, because
the splines are the same lengths.
|
| 04:17 | What we want to do is to reverse one of them.
|
| 04:20 | Now the one I have selected
is just as good as any other.
|
| 04:23 | You can see that the spline direction is set
to go from white to blue along the X axis here.
|
| 04:29 | So let's right-click and do Reverse Sequence.
|
| 04:32 | That changes the point to start over
here now and flow back the other direction.
|
| 04:37 | Watch what happens when I hit play.
|
| 04:38 | The spheres are now
flowing the other direction.
|
| 04:40 | I think that's good.
|
| 04:42 | I didn't want to have
everything flowing the same way.
|
| 04:45 | Now let's take a look at
what that's done to the XPresso.
|
| 04:48 | Each time we copied the Blobby uber group,
it made a new copy of the XPresso tag as well.
|
| 04:55 | And each of those XPresso tags,
because of the Absolute References, are all
|
| 04:58 | pointed back at the same sliders.
|
| 05:00 | That's why the animation still works,
because this information from this slider
|
| 05:04 | null is still driving
each of these spline wraps.
|
| 05:07 | So what we want to do is to rename the
spline wraps, because it's going to get
|
| 05:11 | very confusing since
they're all named the same thing.
|
| 05:14 | So let's call this first one 01 wrap and then
let's go ahead and call the next one 02 wrap.
|
| 05:22 | Let's call this next one 03 wrap. Here we go.
|
| 05:27 | Now that we've named those, it will be
much easier to identify them when we get
|
| 05:32 | into XPresso to clean things up.
|
| 05:33 | It's bad form to have the XPresso for all
three of these spread out amongst so many objects.
|
| 05:38 | We're going to do ourselves a
favor and clean up this XPresso a bit.
|
| 05:42 | So to do that, we need to have a single
XPresso tag that's going to contain the
|
| 05:45 | XPresso for each of these.
|
| 05:47 | I'm going to right-click on the Sliders,
and then go to CINEMA 4D Tags, and then XPresso.
|
| 05:53 | That's going to give me a new XPresso Editor.
|
| 05:55 | Now let's start by going to this spline
wrap number 01 and double-click on that.
|
| 06:00 | That shows us the XPresso
Editor for that spline wrap.
|
| 06:03 | Let's grab all of these
nodes, then go to Edit and Cut.
|
| 06:07 | Next thing we want to do is make
sure we're going to paste this down in
|
| 06:11 | the right location.
|
| 06:12 | Let's double-click on this XPresso node up
here, the one that's on the Sliders null.
|
| 06:17 | We double-click and you can see now
we're in this node on that object.
|
| 06:21 | If you want to make double sure, you
can close the XPresso Editor up and then
|
| 06:25 | double-click on that to make
sure you're in the right place.
|
| 06:28 | Now let's go to Edit and
then Paste that down again.
|
| 06:32 | Then let's scrub through the animation to
make sure that everything is still working.
|
| 06:34 | And you could see it is still working,
so we haven't messed anything up.
|
| 06:38 | And there's our 01 wrap reference,
and we can move these down here.
|
| 06:42 | So there's the Sliders null reference,
here's a Range Mapper for 01, and then
|
| 06:45 | there is the 01 itself.
|
| 06:48 | Let's repeat that process for 02.
|
| 06:51 | Now we no longer need the XPresso
tag on 01 so we can delete that.
|
| 06:55 | Let's go to the 02 node, and there's our 02 wrap.
|
| 06:58 | Let's grab all those nodes, and then go
to Edit > Cut those nodes, and then on this
|
| 07:04 | one here paste that down into the window.
|
| 07:07 | So let's click away from those
guys and then hit Edit and then Paste.
|
| 07:11 | And let's drag those down here.
|
| 07:14 | You can see we're having multiple
nodes and multiple relationships all in the
|
| 07:17 | same XPresso Editor.
|
| 07:18 | Let's verify that everything still works.
|
| 07:21 | You can see, yes, it does.
|
| 07:23 | Let's repeat that process one last time.
|
| 07:25 | We'll delete the 02 XPresso tag,
because we don't need that one anymore, and
|
| 07:29 | then go down to the 03 XPresso tag.
|
| 07:32 | Double-click on that, and then take
these nodes, and then go to Edit > Cut.
|
| 07:39 | Then scroll up and open up that Sliders
XPresso, and then paste it down, Edit > Paste.
|
| 07:46 | I'll hold down the Shift key to select
multiple nodes, and let's drag those down here.
|
| 07:51 | You can see now if we back out a
little bit, we've got all of these nodes and
|
| 07:55 | relationships in a single
XPresso Editor, much more clean.
|
| 07:58 | So let's go back and delete that errant tag now.
|
| 08:00 | That one is just an empty tag.
|
| 08:01 | You can see if we double-
click on it nothing's there.
|
| 08:04 | Delete it from the Manager.
|
| 08:06 | Now what we can do is to go back to our
Sliders null and clean things up a bit here.
|
| 08:11 | We don't need to have a
reference for each of the sliders.
|
| 08:14 | We can actually use one reference of the
sliders to control all of these Range Mappers.
|
| 08:20 | So let's resize all of these nodes and
I'm going to drag to the left to resize
|
| 08:24 | each of those nodes.
|
| 08:26 | Zoom in just a bit and I'll hover my
mouse over there and just give myself a
|
| 08:30 | little bit more space to work.
|
| 08:32 | Let's delete two of these sliders references.
|
| 08:35 | Select these bottom two
and then hit the Delete key.
|
| 08:39 | And that's going to break the Range Mappers.
|
| 08:41 | If we go back and move our animation you see
that two of the objects don't move anymore.
|
| 08:45 | What we can do though, is use this
single Sliders null and take multiple
|
| 08:49 | connections out of this port.
|
| 08:51 | That's one of the really cool things.
|
| 08:53 | You can just click on the Sliders
output and drag down and put it back into the
|
| 08:57 | input and now that same Sliders null is
controlling that Range Mapper as well. Drag through.
|
| 09:03 | You can see that there it's working.
|
| 09:04 | Let's fix the last one.
|
| 09:06 | Drag that down and put it right on top
of there, and now we've got three Range
|
| 09:11 | Mappers being controlled by a single slider.
|
| 09:14 | That makes things a lot easier to
keep track of from an XPresso standpoint.
|
| 09:19 | Now what we want to do, if we hit
play you'll see that all those guys are
|
| 09:24 | all travelling at the same speed.
|
| 09:25 | So what I want to do is to
vary the speed a little bit.
|
| 09:29 | I can do that actually two ways,
|
| 09:31 | I could change the lengths of the
splines, so a spline that's longer will have an
|
| 09:35 | object that's traveling faster on it,
and a spline that's shorter will have
|
| 09:38 | objects that are traveling slower.
|
| 09:39 | But I'd rather control that numerically.
|
| 09:41 | I want to keep these
splines all about the same length.
|
| 09:43 | So if I go into the Range Mapper node,
and bring up the Attribute Manager a
|
| 09:47 | little bit so we can see better, the
way the Range Mapper node works is it
|
| 09:51 | interprets data from one node to another.
|
| 09:53 | The Inputs, Upper and Lower, represent how
much information is coming into the input field.
|
| 09:59 | The Output, Upper and Lower,
relates to how much data is flowing out.
|
| 10:03 | So when the input is on 0,
the output is also on 0.
|
| 10:07 | When the input is on 100, the output is on 100.
|
| 10:11 | So if I want to have spline wrap 01
travel a little bit faster, what I can do is
|
| 10:16 | tell it, instead of being 100% when these
sliders are at 100, tell it to be 110%.
|
| 10:21 | Now watch what happens when I hit play.
|
| 10:23 | One of them is traveling, it goes actually
beyond the spline, it's this guy right here.
|
| 10:28 | It's also traveling a little bit faster.
|
| 10:31 | Let's use that same
technique to slow things down.
|
| 10:33 | Let's stop playback for a
second and go to Range Mapper.
|
| 10:36 | Again, for this number 02,
and let's slow that one down.
|
| 10:40 | The way we do that is by
having it go not as far.
|
| 10:43 | Let's change that to 90.
|
| 10:45 | Now when we hit play, you see that one
of them is going as little bit slower and
|
| 10:50 | it also doesn't quite reach the end of its path.
|
| 10:54 | So now they don't all hit
at exactly the same time.
|
| 10:56 | That feels a lot better.
|
| 10:58 | Let's close the XPresso
Editor and stop playback.
|
| 11:01 | Now we get down to the nitty-gritty.
|
| 11:03 | Why did I do all this?
|
| 11:04 | We're going to create a little abstract
shape, and the object we're going to use
|
| 11:08 | to do this is something called a Metaball.
|
| 11:10 | If you click and hold on the Modeling
Objects, down here in the bottom left, the
|
| 11:14 | Metaball object has this weird, interesting icon.
|
| 11:16 | What it does is it takes both spheres
and splines that you place under it and
|
| 11:20 | creates a smooth skin around those shapes.
|
| 11:25 | I'm going to start off by taking the
Metaball and dragging it down below Sliders.
|
| 11:29 | Then let's take Blobby uber and
place it under the Metaball and watch what
|
| 11:32 | happens when I do that.
|
| 11:33 | I get this new shape that's based on
both the shape of the spline and the shape
|
| 11:39 | of the spheres that were underneath it.
|
| 11:41 | Now one of the bad things about the
Metaball is you can only put spheres and
|
| 11:45 | splines under there, but you can
still create some really cool stuff.
|
| 11:48 | Now when we hit play look what happens.
|
| 11:51 | I get this weird blob traveling
along an even longer weird blob.
|
| 11:56 | Let's go ahead and add in the others
as well and let's take the Blobby uber
|
| 12:00 | and drag it into the hierarchy, and drag
Blobby uber.2 and drag it into the hierarchy.
|
| 12:05 | You can see each time we do
that, we get this weirdness.
|
| 12:08 | Let's do the last thing and add the big
sphere into the hierarchy as well, and we
|
| 12:12 | get this nice bulge in the center.
|
| 12:14 | Let's rewind back to zero and hit play.
|
| 12:16 | The animation is going to playback too slow.
|
| 12:19 | So let's stop playback and let's
give it a chance to speed things up.
|
| 12:24 | On the Metaball in the Object
Properties there's something called an Editor
|
| 12:27 | Subdivision and a Render Subdivision.
|
| 12:30 | This controls how accurately the
Metaball is drawn here in the Editor window and
|
| 12:35 | how accurately it's going
to be drawn in the Renderer.
|
| 12:38 | Now if I hit Shift+R on the keyboard
and render something to the Picture
|
| 12:42 | Viewer, the shapes that I have here are
incredibly smooth compared to the rough
|
| 12:47 | shapes that I have here.
|
| 12:48 | And that's because of that Render Subdivision.
|
| 12:51 | Let's close up the Picture Viewer, and
you can see that the Render Subdivision is 5.
|
| 12:55 | A very important gotcha with the
Metaball is never put the Editor Subdivision
|
| 12:59 | below the Render Subdivision.
|
| 13:00 | You always want it to be higher.
|
| 13:03 | To speed things up here in the
Editor window I'll make the Editor
|
| 13:05 | Subdivision higher than 40.
|
| 13:06 | Let's bring it up to, say, 60.
|
| 13:09 | Our shape is going to get a little more
coarse, but now though we can see we can
|
| 13:12 | scrub through it a lot easier.
|
| 13:14 | It's not going to be chunking anymore.
|
| 13:16 | The Hull Value controls how tightly
the Metaball object is conformed to the
|
| 13:21 | objects underneath it.
|
| 13:23 | So let's take the Hull Value and go up.
|
| 13:25 | It's counterintuitive.
|
| 13:26 | The higher the Hull Value,
the tighter the object is.
|
| 13:29 | Let's bring that down a little bit.
|
| 13:30 | You can see that we get a little
more definition on our central blob.
|
| 13:34 | And don't worry that this chunkiness
is going to go away when we render.
|
| 13:37 | You can see that we've got weirdness
going on. Those will be still smooth.
|
| 13:41 | But now we can scrub through and we get
a definite bulge in the transition area,
|
| 13:45 | and I really like that.
|
| 13:46 | Let's zoom in on that.
|
| 13:47 | Let's rewind back to 0 and hit play,
and this is not playing back at real-time.
|
| 13:54 | We'd want to make a preview movie of this.
|
| 13:57 | Let's hit Option+B or Alt+B on the
keyboard, change it from Full Render to
|
| 14:01 | Software Preview, and let's see
how these guys are traveling.
|
| 14:05 | I'll leave it at 320,
|
| 14:06 | so it's a nice small render
and it should go pretty quick.
|
| 14:09 | You'll see the Calculating
Preview is down here in the Infos field.
|
| 14:12 | I'll hit Play here, and that's
going to cache the frames first.
|
| 14:18 | So hopefully you got an idea for how
you could use XPresso techniques to
|
| 14:21 | control your animation.
|
| 14:23 | Remember, this is just the tip of the
iceberg, and this kind of organic shape
|
| 14:27 | could have been done without XPresso, but
with XPresso it becomes a whole lot easier.
|
| 14:32 | I'm going to put a rendering of
this smooth organic shape into the
|
| 14:34 | Exercise Files folder.
|
| 14:36 | That way you can see what
the final result looks like.
|
| Collapse this transcript |