Welcome to.
Linking to an external data block.
In this video you'll learn more about linking to another blend file We'll be linking to an object data
block understand that there is a data block hierarchy and how that impacts your linking and how to keep
an eye out for when you might lose data.
That's quite important because it can end up being very frustrating not going to lose it is in it it
disappears off your hard drive but you could lose it in your new blend file the one you're linking to.
So let's have a look at this data block hierarchy and in front of us we have the outline that you would
see if he just opened up a typical default blend file the one with the basic cube in it and a camera
and a lamp in the scene.
Now you can see this is a great example of a hierarchy with the scene having render layers world the
camera object the cube mesh object and the lamp object.
Now beneath each one of those three we also have more details each of which is a data block.
So the camera will contain the camera properties beneath it and the lamp would contain the lamp properties
beneath it and looking at the cube.
There's a data block which holds the mesh information which is the greyed out Triangle.
We've got the material information that's another data block and then beneath that there's a texture
information that's applied to that material.
And the important thing here is if we import let's say the mesh cube the mesh objects the cube object
we will automatically get the data the material and the texture straightaway.
Now if we just in ported the material we would get that.
And the texture applied to that material.
If we only import the texture then we'd only get that.
So if we decide to import something that's got a hierarchy beneath it that's beneath hierarchy will
also come through.
That's important so you don't ever flood your scene with something or miss something.
So let's go have a look now at where we might accidentally start losing information and to do that we're
going to have to hop on over into a blender.
Okay so back over in blender I've got my test room that we've been working on is looking pretty good
so far and I've got this whopping great big hierarchy here so let's go ahead and just experience what
happens when or potentially where we might lose information.
Now hopefully this won't happen to you but it is always possible.
So I'd like to go to file go down to link and I'm in where I'm in at the moment.
I'm in my mind pyramid's scene.
That's not going to be any gates.
And I go to my game asset pack and I'm going to go actually upper level and see the other projects that
I've worked on and go ahead and find something.
I'm going to go back one to the fluffy bunny because I know I played with materials in there.
I'm going to go to fluffy bunny.
Blend open that up.
I'm going to go into material and I've got all of these materials the time made and let's say that I
wanted to I really like the colour of the soil I don't know how but I'm going to pick the soil as the
material and link it.
It does mean that if I change that material over on the fluffy bunny it will automatically be applied
here as well so that's important to know that link exists.
But at the moment this material is not applied to anything so it's going to have zero next to it in
the data block.
So if I go ahead and select this doorway for instance and then go to the materials property.
Now there aren't any materials assigned to it at the moment.
If I click this drop down I can see that I've got an L and the L means that it's a linked up.
In this case a linked data block a linked material and it's got a zero next to it which means it's got
no users.
That does mean that if I go ahead and save this file right now an exit without applying that to anything
or giving it a fake user that will result in it disappearing from this scene.
So you can't just go and grab a load of materials from another blend file without giving them a fake
user or assigning them to an object.
Otherwise the next time you open up your scene they would have vanished.
And that goes for several other things as well.
The mesh data.
So if we hop over here to them the data data block Evis here if we were to import law let's do it let's
go and go firewood link and let's go up a level and where is our mesh so we got mesh here.
Got all of these data blocks here and then go for leaves and link from a library.
And again if I use this drop down here we see that it's linked it's got no users and it's called leaves.
So we've got an inherent problem here that if we don't apply it straight away to something there's a
good chance we will accidentally lose it if we left this blend file.
Of course we can give it a fake user or assign it to something.
Now that doesn't happen if you go and do a an object because that actually brings it into the scene
fully.
So if we go and give that a go now and go a link and this time I am going to go back to my game assets
pack go to meshes and under here I'm going to pick the door again so I'm going to go to door going to
go to the object.
And here we go s.a.m..
Wall door and then the size of its link from library and it looks like it's there now I'm not going
to be able to move it.
And we'll go in more detail about that at the moment.
But it's now in my scene.
I'm just going to move it to a different loughmiller press m here and just move it to.
I like calling that sublayer one I don't know which letter actually applies to Tumblr are they on the
lay beneath.
Just so I can move attack the way quickly.
OK it's another thing I've done that if we go and have a look in the object area we will see oh we've
got a lot in here at the moment.
We're going to have the linked s.a.m. wall door and it's called the L next to it to make sure we know
that it is linked.
There's no zero there.
It's in the scene.
If we go to the data properties here and we drop down here we can see says L. verte Okay it's not named
properly in this case I'll need to go back to the original file and sort that out amongst a few other
things I've got planned to do here.
But it's there and it has an assigned user because the object is a real object it exists in our scene.
The mesh data the materials and the textures etc are just properties that can be applied to an object.
So if they don't have a user they can disappear if they haven't been used or given a fake user.
Okay guys.
Now I've got a small challenge for you.
I would like you to link your building blocks.
Now do check your pieces for any issues.
He's probably going to be naming one.
If anything fix and make any new pieces as necessary link the major pieces into your scene and store
them on a separate layer.
Remember to name the layer appropriately.
Now don't worry about moving them for the moment when you bring them in as a linked object.
They will be highlighted blue and you won't be able to do anything with them in terms of transforming
them so you won't be able to move them scale them or rotate them so pause a video now and give that
a go.
Okay guys.
Welcome back.
Let's go link building blocks over in blender.
Right before we hop into a blender I just want to show you what I've done in the background so you guys
are not shell shocked when it changes from a simple room to more of a church style.
I've gone in repeated these sorts of basic building blocks of tut my basic building blocks away in a
basic room fold up and underneath the meshes.
And I've gone for some church style assets.
So let's have a more detailed look.
I've got a floor of three different sizes and I've done that for the simple reason that even though
I can scale my objects when a texture is applied to that it will scale the texture as well so I want
as much flexibility as possible especially with the floor because I want large pieces and I might want
small pieces to flesh out little alcoves or corner pieces.
I've also made a church corner which is very useful.
It's one blend the unit by one blender unit by four blender units high all of these.
Now for high because it's a church.
It's a lot bigger in structure.
I've got a front door that I've made the vaults.
Now that was one of the most challenging ones to make.
But it's perfectly possible using all the skills we've got already have a quick look of that in a moment
and a plain old wall which has four by four where nought point two.
That's the other change I've made.
I made the thickness point two.
So when I'm moving in tenths of a blender unit I can actually match it up.
And the church window so there's an archway window in there as well so let's just have a quick look
at the vault and explain how this was put together because it was more of a challenge than the simple
building blocks that we've got.
Now I realize that I'm in my designer there about eight blender units apart where the pillars are going
to go that come up to this Voltz.
I had to look up what the vault was called it's the ceiling bits that looks like this in a church.
Okay so I produced an archway just a series of edges join together to make an arch and I mirrored that
around one of the axes.
I then duplicated that around the other way but keeping the mirror modifier actually applied.
Now when I preformed a Boolean operation to produce a union between the two I ended up with a hole just
where I wanted it.
So I then use that mirrored it again rotated again.
And there we go I ended up with this object which then I use the solidify modify which I think is still
applied.
Yes it is still active.
It's not a ply jets.
Just in case I need to change the thickness so I've made it then solid so it's just very thin before
and would cause some artefacts when rendering.
So that's looking pretty good now.
And so I now need to append all of these into the scene and turn on smooth shading.
To make that look a bit prettier.
Excellent.
So let's go.
I don't need to do anything there.
I'm going to create a new blender file and just spend them all in because all of my old assets.
Well it's just going to be a absolute pain to try and use them again in any way whatsoever.
So let's go ahead monomer used the shortcut keys control altes and oh now I need to go to my assets
folder.
Meshes and literally go through and add all of these to the scene.
Okay so the final piece is now coming in the church window as select the objects and bring that into
our scene so that everything there and I'm going to move it to a working layer.
So let's select all of those.
I don't want to select the camera or the other bits.
The lamp itself.
Someone to select them in the outliner instead because that's a bit easier in this case since they're
on top of that.
I've got all of those selected.
I'm going to move them to this layer here.
I'm going to go into my layers into my layer management and just make sure that that is named.
In fact I'm just going to put them on layer 2.
That would make far more sense here.
So moved to layer two and then if necessary to move them later.
So let's give that a name and let's call that parts layer.
Brilliant.
So the final thing here to do is because I've created a new file.
I'm going to save as I'm going to come out o into the scenes using our building blocks tested.
Well now I have moved my files that's actually dead so I can delete that because I've done this hierarchy
here where in the meshes wherever I move them to basic room it's broken a lot of the links so let's
just remember that for future.
So that's okay because it's a test scene.
So I'm going to go into scenes and I'm going to call it Gothic church.
Excellent.
The final thing to do is go to my source straight.
Have I got everything in here.
Let's check and see what assets have changed meshes.
It's got all of my data there ready to go.
I just need to make a commit message.
I've updated my remey far so I know it's all about.
Unknown to commit and this is the 14th lecture so I'm going to call it game asit pack 14 linking to
an external data block and then I make sure that I've stage those which I have done and click commit.
Brilliant.
How did you guys get on please share your work in the discussions.
And I will see you guys in the next lecture.