This video is sponsored by Yellow Images.
More about them later when we use their cool stuff.
Hello, everyone.
This is Evan Abrams.
And in this video, I'm going to teach you about using layer maps to create depth
or the illusion of depth in your motion design.
That's maps with a P, like the pieces of paper that help get us places.
The core concept behind all the things that we're going to look at here
is using the color information of an image to guide the direction or displacement
of pixels, particles and vertices.
An image will literally be telling things where to go.
Layer maps can be used for many things, but using them for depth
can be a really good entry point into this concept.
We're going to start our work in regular out of the box after effects.
Then we're going to look at an advanced third party particle system
called Plexus that makes great use of layer maps for depth.
But the same concepts and methods will apply to most advanced particle systems.
And then finally, I will be cracking into Cinema
4D to have a look at how 3D programs can use image data to deform geometry.
If you have any questions about what you see, let me know in the comments
and I'll try to help you through and make sure you subscribe
so you don't miss any new tutorials when they come up around here.
Now, please follow along as I try to guide you in our first steps into layer maps.
As promised.
First, we're going to look at a basic after effects only method
that we can use to create the illusion of depth from an image.
Here's a really fantastic photo of some inky paint smears to really up
the strangeness of the image.
Or what
if we could turn this into something that would feel like it's 3D topography?
That's fairly easy using something called a displacement map,
just as a quick, simplified example to see what's going to be happening
under the hood.
I'm going to take this layer
already covered in a grid and apply the displacement map over it.
Then I'll use this gradient layer that has dark values and light values
and gray values in the middle as the map, and as I adjust
the horizontal displacement amount, you can see the gradient serves
as those instructions for where pixels should go and by how much
we can have a little bit of nuance over which color channel we're going to use
from that image and in what direction and how the map lines up.
But this is the general theory that we want to remember throughout
the entire video, maps are just a set of instructions
that we use to have one layer impact another in specific ways.
And the map shows how much of a change will be applied to which areas.
So back to the specific first example.
I have the ink and we're going to displace it with a map
that is that layer itself.
Since this image has bright and dark spots,
we can now see that those spots are being pushed around.
When we slide the horizontal and vertical numbers, I'm going to set
some expressions on those numbers just to have them in continual motion
using masked sine and masked codes for sine and cosine waves respectively.
You might use key frames.
You might have other specific movements you want to see happening.
I'm just doing this.
So we have some movement that we can observe as we dial in other changes.
If you want to copy and paste the specific expressions
that you see here, just grab them from the description.
They aren't the focus. So let's move on.
The point here is that we want to look at how this image is shifting and distort
and in this case it's a little bit harsh and it breaks up and tears in places
where the map changes value to suddenly.
So maybe we need to soften the map so that it has fewer
harsh changes or less contrast between neighboring pixels.
Therefore, I will duplicate the original image, rename it to map
so we can remember which is which, and we'll apply some effects like a blur.
And if you accelerated blur, perhaps really blur it down
nice and soft with the image here with a Gaussian Blur.
Now we can point the displacement map on the sharp image to the map,
which we don't need to see, and make sure you select masks and effects to make sure
that the effect is a valuating that map layer after the blur has happened to it.
And look at this.
It's feeling much more like 3D topography
now as we observe the movement that we've already set up
now, it might make sense that the brighter parts
feel closer to us and the darker parts feel further away.
That certainly makes sense if the bright and dark parts of the image
correspond to what we feel are high and low.
But what if we don't like that kind of relationship?
Or the image actually has a lot of mid tones
or just similar tones that would make the image totally flat.
If we just took those changes in intensity, we can always just ask
the effect that is looking at the map to use a different channel as the input.
That's perfectly fine.
But if you want to get more nuanced, we want to have tools to offset or remap
or remix the values of our map, especially if simply swapping
the channel isn't really helping get the specific look we're after.
A great solution to this is color rama.
There are many, many value remapping effects to choose from
but this one really gives us every possible option.
After applying the effects to the map layer,
we want to pick which channel we want to use as input
and how we want to remap that to some output.
Let's choose luminance as our input and let's output to a purely
black and white gradient using the ramp gray preset.
We can now shift the input by degrees to rack the values through,
which is going to change that illusion of what feels close, what feels far,
what's getting displaced more, what's being displaced the less.
But we do get this strange hard line here where black meets
white values for the maximum and minimum values of wraparound.
That's because color Rama thinks of the values as a circle.
So we may want to actually use
the solar eyes gray preset, which makes both black and white values,
in this case, black and 50% gray values are remapped to wait.
This makes for a nice, smooth transition
from the extremes as we rack that offset through.
If you want more manual control,
you can just add your own knots in get wacky with it and animating
the phase shift here can make for some really lovely changes to the animation.
I really recommend playing around with that to get some trippy wavy things
going on here.
However, our journey is likely not done here.
A final kind of basic adjustment you'll probably want to make is a curves
or a levels adjustment.
I prefer levels in this case just because we can see the histogram
and it makes it dialing in those minimum and maximum values.
Really simple.
This will allow us to access that full range of displacement making sure
that we are going from totally white to totally black in our image.
See here on the histogram where the data plateaus out,
let's just not count all of that in the image so we can have more darker
and more lighter areas
by pinching our start and ends to where the data really starts to ramp up.
And with those tweaks, let's
watch back the results and enjoy some smoothly distorted images.
Try remixing different images with different maps.
Play around with it.
This is a case where having great source
images is going to make for some really interesting results.
Now, speaking of other images, sounds like a good time
to talk about this video sponsor yellow images.
Yellow Images is the number one marketplace for high quality premium
mockups.
Creative fonts images 360
and a creative store full of amazing graphical assets like brushes,
presets, lettering, illustration patterns, textures, UX kits and much, much more.
You've already seen some examples from the sell paint bundle.
Just one little example of the unique, interesting, high quality assets
you'll find on there.
I'll link to it directly in the description
if that's of particular interest to you.
If you are a heavy user of stock assets, if you have a regular need
for this kind of thing,
make sure you get yourself a yellow ticket and enjoy deep members.
Only discounts on everything they have to offer
is like a Costco card, but for stock assets and right now,
for a limited time, they're offering 20% off everything they sell.
If you use promo code SCA 20, 22, so please take advantage of that
and using the link in the description and enjoy that 20% off.
So a big thank you to your images for helping to support the channel
and for giving us those sweet, sweet discounts.
Now look at a similar application of maps.
We can literally displace particles and then fly around with a camera
using layer maps in combination with some advanced particle systems.
Here's my example using the third party plug in Plexus,
the concept is that we want to take a persistent field of particles, color
them with the image, and then push them vertically away from their origin
to make a kind of topography that we can fly over with a camera.
Easier said than done, maybe, but we know from phrasing our problem
this way that the solution is probably maps.
So let's begin with a solid
to hold the plexus effect, and then we just apply that effect to the solid.
Then we need to add in some particles from an emitter.
That's the form that will say where and how many particles there are in Plexus.
We do this by selecting our geometry,
then we're going to select the primitives object.
Then we will define that more by choosing Cube the default, then increasing the X
and Y points to something high, maybe 500, and the Z points can come down to one.
Also making the cube larger.
If we size it up to about a thousand in each dimension,
so now we have a heap of particles that are along the x y plane.
Now we want to affect the system.
So we're going to add an effector.
That's what they call them in here.
And we'll specific use the color map effector.
Then we can drop in our very cool image and make it invisible
because we just need to use its data
and we'll point the effector to look at that specific layer.
Right now you can see
there's some color coming into the pixels, but it doesn't look exactly right.
We are applying the map to vertices and it is working on the color of those
vertices, but the plane that it's applying them to is all wrong.
So in any map situation, we need to get that going the right way.
And for us that is the X-Y plane, as we said earlier when we made the geometry
and now we can see we have kind of a low res version of the original image.
Now we must make these particles offset from that plane.
So I'm going to first make a camera, make it a two node
camera so I can orbit around and navigate a little bit easier.
And I'll just use the camera tool to tilt our view and push in a little bit.
You can toggle the camera tools around with the C key to cycle through them.
And then I'm going to make a new map, a separate one.
And it's not for changing color.
It's going to change position.
Make sure that that map plane is again set to that X-Y plane
and that we're applying the change
to the Z axis, which is the one that comes off of that plane.
Now, it looks a little bit wacky at the moment, but just look at that
as we tweak the map amplitude up and down, you can see how these little motes,
little particles are sliding away on that axis.
So things are working from here.
It's all just tweaking up settings to get it to look exactly the way we want.
I'm going to blur out the map a little using that Gaussian blur.
We don't see that change right away because I must first go into the map layer
dropdown and say, we want to look at the map
after the effects are applied and boom, that topography is looking much better.
Now, a little smoothing is usually going to help us out.
And if you wanted to massage the pixels in any way,
you can drop all kinds of changes on here
with effects like you saw in the first example color rama
maybe we shift the channels, maybe we just apply a simple curves
or levels to help give us some changes to this geometry.
But hopefully it makes sense how we're changing that image.
And that is in turn changing the Z depth of all of these particles.
Now, to complete the piece to look exactly like the example, I'm
going to turn on the depth of field for the camera and let Plexus respond
to that in its render settings by turning that on as well.
Then it's a matter of tweaking our focal distance, getting the actual
angle right, and getting everything just so in the camera settings.
We might also apply some extra factors like some noise
specifically to the Z axis,
and that can add a little bit of variety, just a little bit of haze in there.
But you might also introduce that noise to the actual map itself
using maybe a noise, HLS or a fractal on top of that.
Then we'll just fly the camera over the scene in a nice controlled way
by parenting it to a no, make that 3D and move that null around.
It's going to feel like we're flying over a cool landscape now.
Certainly if we ended it here, that would be enough.
But I have one more thing to show you
that I hope will really hammer the concept of maps home for you.
Let's take these maps over to Cinema 4D.
I'm using the full license for Cinema
4D here, so if you're booting up the light version,
you won't have access to the same tools that you're going to see me use here.
So I've seen them 4D open and I'm putting down a plane
just so we can keep all of our examples fairly consistent.
And just like we added many particles or points into the previous systems,
we want the geometry here to have enough density in the polygons
to respond to the details of whatever map we apply to it.
So I'm going to put the subdivisions
way up, maybe too high, but who's really counting?
Now we're going to apply this dysplasia to former and nesting
that little buddy right under and inside the plane in the hierarchy.
So it lives within the plane and acting upon it inside that displace here.
I will add to the shading tab.
One of those very cool images we've been using
and this looks very pointy.
So to fix that up, I'm just going to blur that out using the Blur offset
just to make it a little bit less distinct
I could also smooth that geometry down using a subdivision surface
by placing that plane in the side subdivision surface,
then playing with the subdivision services number of subdivisions.
That's going to make things more or less smooth.
And you might need to balance this out
with more or less blurring of the actual map image.
But as you can see, it's the same idea.
We've got points and we're pushing them around using that map.
The image data is pushing the points around.
We could even modify how that deformation is being applied
by bringing in something called a field so I'm going to add a sphere field in here
and you can see the displacement only happens inside that field.
I can animate this up and down.
That can be a pretty cool animation kind of taking shape around here.
But if you're not satisfied with that method, may I show you
the shader effector which can become a de former?
Typically we would use effectors on large groups of things like clones,
but we can also use them to deform, just place them inside of geometry
as you would any other day
former that under the de former tab of the attributes manager
let's turn on point because it is the points we want to deform,
then load in the image into the shader tab and dial in the attributes.
You're specifically interested in seeing change.
We're going to go
for the Z position in this case and we have a pretty identical response.
The big difference is that we can also apply the shader effector.
Two groups here.
It is applied to an array of random shapes, moving them around
based on that image input into that shader tab.
And in this case it makes kind of an interesting voxel
our looking kind of thing. That's kind of nice.
All these methods used maps to make similar things happen, but
each software, each plug in, each method use slightly different language
or slightly different methods to implement those layer maps.
At the core of this idea, maps are just using data from an image
to change pixels or objects or points in some abstracted way.
And of course this is only the barest little scratch
at the surface of the concept, but I hope that it does help to clarify
or to open up the possibilities of what layer maps can do in your work.
I'm always curious to see what you end up making with the things
we talk about on this channel, so please share those with me.
I'm at EC Abrams on Twitter and Instagram and Behance, so please take me and post
DM me things. I want to see what you're doing.
If you have any questions about what you see on this channel,
do let me know in the comments and I'll try to help you out
if you have any questions more generally or suggestions for future tutorials,
please get at me on any social media as my DMS are open all over the place
and definitely make sure that you are subscribed on here
so you know when new tutorials are coming out, that'll do it for me.
Thank you so much for watching.
Until next time. I'm Evan Abrams.
Stay creative, be kind to each other and I'll see you around the internet.