(Gentle music)
- So I was trying to come up with a really super
simple example of the Max creation graph and
what you could do to get something visible on the screen
with the fewest number of nodes
and what I came up with was.
Why don't we just go ahead and color some
vertices on this object.
So, got my object there, I've created this modifier
called 'blue vert' color, and that's all it does,
makes all the vertices blue, has no parameters,
nothing more to it.
Really simple graph but it gives you an idea of something
that you can do without too much fuss.
So let's take a look at how we would do that.
So we know that this guy is going to be a modifier.
To make a modifier we have to create an output modifier
and we know that we're going to be grabbing some mesh data.
And, you know we're working on, on a mesh.
And so we need a modifier tri-mesh.
Okay, and somewhere in between here we're going to
be coloring some vertices. Fortunately there's a compound
already in place, called color vertices.
And this does most of the heavy lifting for us
and we can begin to hook this guy up a little bit.
So we know that we're working on this mesh
and we know that we're going to be
dumping it out to a modifier.
Now we gotta do something with it,
so what is it that we're going to do?
We're going to put a color in to all of these vertices
and it just so happens that you know a color is really
just a vector three, it's three floats worth of information
R, G and B,
but somebody's seen fit to go head and
be kind enough and give us a compound that just happens
to be blue. But under the hood if we were to
look at this guy
they've kind of done the heavy lifting for us
they've given us three values and they've gotta do
just one of the channels and that's what's going to give it
make it blue for us.
So when you're looking at it, it really seems like
you oughta just be able to put these guys up.
The interesting thing is, if you run this
you're gonna get an error, and the reason being is
if we look at this colored vertices compound
and down here at the signature, it's expecting
a tri-mesh as an input, we've got that.
And then it's looking at a function that
it's gonna do for every single vertice,
and it's got two vector three as well
we only really have the color that we're putting in there
and so, if we were to run it, it's going to complain
that it's missing an argument.
So that's not gonna work for us.
What we need to do, and this is just a little bit
of a trick, is we're gonna tell it to ignore
one of the arguments.
And we're gonna use just the second one.
And if we put that this ignore first,
it tells you exactly that.
And that way it's gonna satisfy the needs of
this colored vertices compound,
without actually giving it in effect
it's just kinda stubbed out.
So, let's go ahead and save this guy
we'll call it,
just a test version of this blue vert color.
Let's evaluate that.
And now we can get rid of the version that we had on there.
We'll go into our modifier stack,
here it is. Okay, so, that's about as simple as it gets.
We haven't really done too terribly much, certainly
no parameters in here. But we've taken one set of data
and slumped it into all the vertice colors,
and bam. There it is.
If we wanted to get a little bit fancier with this
we certainly could instead of having this static color.
Go ahead and get rid of that.
We could say, let's put in
a vector three
which of course that blue was a vector three, it was just
forcing it in to only information in the
the blue channel.
And then each one of these singles
let's do it as a parameter so we can actually see it in the
the modifier panel. So if we pull up a
parameter single.
We could treat each one of these
as one of the color channels. So let's just call that Red.
And we'll shift down, drag down another one for Blue.
And we'll shift over another one for Green.
By default the max value is a hundred.
We really only want each one of these to go to one
otherwise it's not gonna make sense.
Next we're going to do zero to one
and let's just give it default
point five
for each one of these so we've got something
other than just black when the thing starts.
And then wire each one of these guys up.
Can make room here.
And even though we're not changing the name on this guy
let's just go ahead and evaluate it.
And notice when it evaluates all of a sudden instead
of being blue our teapot is now gray.
And if we were to change any one of these
new parameters we can see that we can set
it from anywhere from zero to one
and get the corresponding color that we're expecting. So.
Again, it's a
really pretty simple graph
and what we're doing, but it gives you some kind of idea
also that you can open up somebody else's graph
as long as you can get in there and begin to understand
a little bit about what they're doing.
It's pretty easy to start tinkering around with it
and we've gone from something that was just
a fixed color to giving it some parameter-isation
and exposing those parameters in the UI
and you can start playing with it from there.
Talk to you next time.
(Music fades out)