Tip:
Highlight text to annotate it
X
Cordell: Hi everyone, and thanks for watching 3dmotive.com.
My name is Cordell Felix, and on this video
I will show you how to make two types of
reflection materials in the Unreal Development Kit.
This is great for adding reflection to your models
with either an environment cubemap or a tileable texture.
I'll be using the November, 2012, [unintelligible] of UDK
for this video and this video assumes
that you have a basic knowledge of UDK and its material editor.
I'm going to be using my warehouse environment
to demonstrate adding the cubemap reflection,
and I will quickly show you how to set up a generic
reflection like this cube on the right.
On the left I have a cube that reflects the environment.
As you can see at the top you can see
the roof and the backside, you can see the
doors that I had and I have this cube on the
right that reflects a tileable texture that
I have to fake a metal look.
Now I'm back at when I first started to make the environment cubemap.
You're going to want your environment to be
a little interesting so that the scene capture
actor can pull the detail from it.
You'll be able to see whatever is currently
in your level in a cubemap texture.
We need to go to the content browser and we can do
that by clicking this little black square icon at the top here,
and I need you to go to the actor classes and
then the uncategorized drop-down list here,
and if you go to the scene capture cubemap actor,
and you just drag that right into your environment
it should be right on top of you.
So if you go into your environment background a little bit,
you need to be in editor mode, so hit G,
it could be hiding, and strike that in there.
So you get this big sphere.
This sphere is just an actor that allows us to
render out a cubemap of our environment
and put it into a texture.
You're going to want to put this in a good spot
so that way you're capturing most of the
environment as best as you can, like right
now I have it too close to the ground, I think,
and it's not directly center of the room as
to where I want it to capture mostly everything,
so you want it kind of in a spot like this.
If you're in more of an outdoor environment
you should put it more in the middle of your level somewhere,
and so this is good because it's not too close
to the ground so we won't be capturing too
much ground or the roof, so it will be just right.
Jut make sure you put it in a spot like that.
I'm going to go back into the content browser and I'm
going to be creating a new texture so I'm going
to go into my textures package and right click,
and then create new texture render target cube.
This will just give you a new texture that I'm
going to be plugging into the actor we just put in.
So I'm going to name this environment and
I'm going to give it a size of 512.
This will just give me better quality of the
reflections and you never need to mess with this format.
Click OK and it all looks good.
Now we need to plug this texture render target cube
into the actor that we added in earlier.
So I'm going to minimize this and actually,
now I'm going to cube that up and just bring
it over here because I need to have them clicked
and I'm going to hit F4 to go into the properties
of this and I'm going to plug this texture
into this green arrow here. Now you see that this
sphere kind of turns into like a mirror.
That's the reflections.
One thing to note is that the far plane is a 500,
and that we can't really see the sky or anything,
so now if it's like at 300 you can't see really much
so we need to set this to max so that we can get the entire sky in there.
With that plugged in now we need to go back
to the content browser and then right click
on this texture that we just plugged in,
and then click create new static texture,
and I'll just leave that as that and click OK.
It's going to render out five different textures
for us that all create a cubemap.
You can click out and go back in and there we go.
There's your cubemap right there.
Oh actually that's six maps that it rendered out for us. Cool.
We need to plug this guy into a material now,
so I'm going to go to the materials and just create new material.
I have one already created so I'll create a new one
to show you how it works.
Go to right click, create new material, and
let's just call this M.Reflection.CubeMap.02
because I already have one.
All right, we need to add three things to get this to work.
So there's a reflection vector, a vector transform,
and a cubemap that we need to drag in here.
So first I'm going to add the reflection
so I'm just going to type in ref to get the reflection vector,
click and drag that in. Zoom in a bit and
as the vector transforms I'm going to type in
transform, or tra. There we go. Just plug them in.
Now I need to drag in my cubemap that I rendered out earlier, so this guy.
I'll click, drag and there we go and let's
put this in the back of the UVs and if I put this into emmisive
it should now pop up and you can see the cubemap.
From anywhere I look you can see the environment.
Now that he's done I'm just going to click the green arrow
and he's good to go.
I'm going to create a copy of this guy now
so you go back here and I'm going to create a copy of
this material and I'll just name it Reflection.Simple.
Now this material is different because it's
using a different texture sample.
This is using this environment cubemap texture
and this vector transform doesn't support that.
Only a mask with a reflection can support a
tileable texture, so I'm going to delete
this vector transform and the texture sample
and I'm going to drag in a mask.
I'm going to type in mask and drag in again
this component mask and now I need my
tileable texture so I'm going to go into my
content browser and I'm going to go to my textures
and I have this already imported.
It's just like a fake sky reflection, sort of thing.
It looks nice in metal to me so I made it tileable.
So I'm going to drag him in here and minimize this.
And I'm going to plug these all in, put this into emissive,
and there you go.
You can see that it's tileable.
It looks nice and it makes kind of a metal look.
I would suggest adding a bit more nodes or parameters
to make these techniques a little bit more appealing
because right now it's literally just a mirror
and you don't want to work with that really.
What I would do is I would multiply or add
a metal texture to this so that way you get
some of that metal detail going on in the texture.
I would add a mask so that way I could mask out
areas that are rubber because you don't want
your rubber to look like metal.
You want your metal to look like metal.
One way to do that is to get some of that
reflective in it and I would also add a
[funnel] in there so that way I
can have some darker edges and some brighter
insides and I would control a parameter or
I would have a parameter to control the
intensity of that also.
I have an example of that already in my
environment on one of my truck containers.
I have the reflectiveness on there, but
it's not so apparent that I have the diffuse
leaking through so it looks nice.
I notice that I still have this actor in my environment.
Once you render out the cubemap you don't
really need it anymore so you can just delete it.
I used the reflection cube technique on this truck here.
You can see the reflection of the other truck
on the metal areas and that places where there
is [dirt] it has no reflection.
[Messing out dirt] and scratches from your
reflections is a great way to make your props look awesome.
That's it for this quick tip.
My name is Cordell Felix and thanks again for watching 3dmotive.com