Hello everybody
and welcome back, it's Ben here with you now! We're going to talk about Coordinate
Systems & Exporting! Before we do, I talk a little bit faster than Mikey,
so you may want to go back to the beginning of the course and look at your video controls
lecture, where you can choose a different speed if you want to.
Also, of course, I'm far more charismatic and handsome than him, not that you could tell that on a
video. [Laughs] So here we're going to be looking at the end result of your model
and what we're likely to do with it. I'm going to show you a useful export checklist.
I'm going to introduce you to left and right-handed coordinate systems.
I'm going to be demonstrating an import into Unity, but you don't need to have
Unity, it's a game engine. You don't need to have it installed, you just need to have a look at how these
models end up over there. And I'm going to give you a little challenge, to think
about where you want to first export to. So let's start by just talking about handedness.
So get your fingers out and hands up in front of you, and have a think about what's on the screen
there. This is borrowed from Wikipedia. Thank you very much to the chap who drew it, a very pretty diagram.
So a right-handed coordinate system is one where you start with your thumb
down the X axis. Your next finger's along the Y and then your next finger
is Z. And that's completely different to a system where the
left thumb is X, the next finger is Y, and then the middle finger is Z.
And they are mirror images of one another but you cannot rotate one
to become the other, it's just impossible if you try it, you'll see that they're just, just different.
OK, so a quick challenge for you! I want you to go over
into Blender, which is here, and look at the many axes
that's down at the bottom-left of Blender there, and I want you to answer a very simple question,
is Blender right or left handed? Use that mini axes and the previous slide.
Write down your answer, no cheating. No Wikipedia-ing or no Google-ing for
is Blender right or left handed. I just want you to look at that slide and work out for yourself
and lots of twisting of your wrist, try not to break anything, whether it's left or right-handed. So
go ahead, write that down now, and we'll see you in just a sec.
Cool welcome back! So if we look here in Blender you
stick your thumb along the X axis, the way I've got it defined. Your next finger
is along the Y axis, which is really really awkward, and
your next finger goes down the Z axis. And you'll find if you're trying to use your left hand now that not only are you in a
very strange position but that it just doesn't work, because Z is pointing in the wrong direction.
So Blender uses a right-handed coordinate system. You put your right thumb
along the X axis, you put your middle finger along the Y axis,
and then, you'll find, if you're lucky, that the Z axis
will actually be the third finger. OK, so Blender uses
a right-hand coordinate system. Not the case with Unity, we're going to be
demonstrating it actually uses a completely different coordinate system.
So here's our model in Blender, and let's
just take a look at the Hierarchy. What have we got? We've got several things, which we don't really care
about now, but most importantly we have three models in here a Big Pyramid, a Pyramid,
and a Small Pyramid. Now only the
Pyramid, I believe, is at the Origin in this thing. It's only that that's at
(0, 0, 0). The other guys are not at (0, 0, 0), they're offset from the
Origin. So that's one thing to notice. The other thing to notice in Blender is that Z is
upwards, so upwards by default is Z, alright.
OK so what does this look like in Unity? Well you don't need to know the details of how you get
this guy, this model into Unity, but let me just go over to
Unity now and open up this model and see what it looks like. So
here I am in Unity 3D. Again, you don't need to load Unity, you just need to look at
what I'm showing you here. So I have imported the Mayan Pyramid, and
if we click that tray to expend it, you'll see that it's got lots of little components that
come across from Blender automatically. You've got the pyramids themselves here, which
are the composed models which consist of the scale that you
set over in Blender. Like this Pyramid, remember, was 10 by 10 by
1, and also the materials, they're all just using no materials. We haven't
introduced materials in the course yet. But also just their plain meshes here, and it'll
even tell you how many triangles they've got and things. Alright, so that's what you get over in Unity!
Now one good thing is that Unity is smart enough to know that, actually
Unity uses Y for upwards, whereas Blender was using Z for upwards,
so it actually does turn the things on their sides. Take a look at Unity's coordinate system,
and again, with reference to that other slide, just work out for yourself is this left or
right-handed. Well as you try and maybe try your right hand
down the X and then the next finger, then your right hand goes up the Y and you try
and get the Z working things don't work right. So actually, Unity is a
left-handed system, so it's actually completely the opposite to Blender. Most of the time that won't
cause you a problem, but they are mirror images and you can't make a straight rotation from
one to the other. So that's an example of one of the things you need to consider.
The other thing is, let's think about how your work's been organized. We've actually put three models into
the same model here, effectively, and you wouldn't normally do that.
The Mayan Pyramid itself... Which one is this, the big one?
The one called Pyramid is sitting nicely in Unity at the
Origin, and the other thing that's good is, it's sitting on the floor. So that model,
if you like, that sub-model is setup very nicely. We would want to
consider whether the thing that you're exporting to can handle the scaling.
OK, here in Unity and more importantly for you guys over in Blender,
this guy is scaled. Remember that you set a scale? Where is it over here?
There, X,
Y, Z. We have a 10, 10, 1 scale. Now it happens that it
talks to Unity, and Unity understands that, and it scales it properly. But look at these mesh previews,
you see how distorted they are? The raw meshes actually look like that behind the scenes, and
they are rescaled in Blender and Unity is rescaling them for us. Your
3D printer, for example, may not be so kind to you. So you may need to
think very carefully, with the next model you build, about whether you want to be scaling the whole
model or not, because you might find, if you try and 3D print this guy, that it comes
out a bit long and thin. So that's his considerations, it's the scaling.
The other consideration is where you put the Origin. Now when Mikey set this up
with you, he put the Origin beautifully in the middle of this pyramid, so that means that it sits
in Unity's Origin, and it means, in your 3D printer that it's going to actually print in the middle of
the printing bay. The other two pyramids wouldn't be so lucky.
[Laughs] So generally speaking moving forward, for instance, when we create
the bowling ball and the bowling pin, we would create separate blend files for those.
We wouldn't put three different models in the same thing, we've done it this way for simplicity, but
moving forward you'd have one blend file per model you want to create.
You may put subelements of your model, like you might decide to separate at the top
of the pyramid as separate components here, but they wouldn't be all in
one. OK, so let's take a look at my export checklist I've made
for you. Here are some questions you need to ask yourself when you are
starting your project, actually. From the next project, we want to start thinking about these questions.
In your target platform, what axis is up? For instance,
in Blender it's Z and in Unity it's Y. What about the handedness of the coordinate
system? It doesn't matter yet but with some more complex models and some animations later, it may start
to make a difference. So are you dealing with a left-handed coordinate system, like Unity, or a right-handed
coordinate system, which is Blender? Does the scale you set in Blender
come through to the system you're targeting? In Unity it does.
Maybe your 3D printer doesn't? You need to know the answer to that or test it really early on with a
really simple model. Maybe just scale a cube and see how it works. Does the
model have an appropriate Origin? So the pyramid in the
center is centered perfect. The other ones are offset. If over in Unity, let me
just show you the impact of that. If over in Unity I decide to break up
these guys, these models, and make separate models out of say this Big Pyramid,
this guy, and I make him down there as a separate model and delete what I had, look what
happens when I put the Big Pyramid in! In Unity it's not at the Origin!
This is not Unity's Origin, it's offset where it was in the
previous scene, which is out here. This is the Origin, this
pyramid at the bottom, and this guy is off on a limb. So be careful of that, because
baked into this Big Pyramid is an offset. OK so you want your
models to be centered. Are the meshes grouped appropriately?
That's where I was talking about, you wouldn't put all three of those pyramids typically in one file, you may put
the components of a Pyramid under one file. And
is the model closed? Hmmm? How about the base? Well that becomes important in 3D printing,
as we'll see later. But one thing that's super easy to forget is the base.
Let's take a look at this guy in Unity! Does he have a bottom? Yes, we have
bottoms, that's good. And it's a closed model, that's important in printing, but it's also important
if your character in a game, for instance, ever takes a look from the bottom. Why? Well remember
Mikey talked about normals and how important they were? Well game engines,
for one, do something called Backface Culling. Ooh, you've seen that when you've played a game, you go
inside. Look the pyramid I'm in is completely invisible to me, or at lest the faces I'm
looking at the back of are. If I come up and look down the stairs I can see them, but I
can't see those stairs from below, the pyramid disappears. So it's a really
thin shell, and that's giving the illusion of a solid pyramid from the
outside, because we have and Mikey has diligently pushed all your normals outwards.
But that's really important that your normals are facing outwards, otherwise things will just disappear.
So that's it, that is the checklist of things
that you want to consider. What I want you to do now is think about where you want to export your next model to.
Are you into 3D printing? Are you into games? Are you into Unity? I don't know.
Write the answers to the export checklist, from the previous slide, down. Do some research for your target
platform, and then, why not share the answers or any questions you may have in the community.
And start getting the conversation going, so that from now, moving forward,
you can start even from the very beginning of your modeling exercise thinking
about how it's going to end up. So thanks for listening and we'll
see you soon!