Welcome back it's Ben tristam with you.
I'm going to be talking about exporting your model.
So in this video we will tidy our folders for future access.
Export our models as an sbx file import the sbx into both unreel and unity game engines.
Don't worry you don't need either of those installed I just want you to see the process and then we
briefly talking about opening blend models in unity 5 and about exporting textures and materials.
So firstly this is the folder structure it's a very real folder structure that Michael's ended up with
and I just want to talk through how we may think about organising this for the future.
So firstly we have a couple of things here.
The diffuse shader example and this brick.
Q But blend that were used in the production but we don't need now I think a good practice is as Michael
has really started to put those in an archive folder.
Next up we have a couple of renders These are image renders of the actual scene would make sense perhaps
to put them in a folder called renders.
It's entirely up to you.
But the concept is that we are just tidy with our files.
This is your section assets specially for the course.
So then we should be left with six different pieces in chess.
The Bishop.
The base can go into the archive.
The king the night the queen and the queen Mark to Songa archive the first version of the Queen.
So we're clear on what the current version is and the rook were just missing the porn which is probably
in the archive.
Here it is.
And now at the top level we have the scene and then a lot of things that are collectively the pieces
so I'm just going to make.
Pieces before append.
Now these are the pieces before they were appended into the main chess scene.
Any changes that have been made to these pieces inside the chess scene blend file will not be propagated
into the Chessy.
Okay so just understand that these pieces exist in two places in the hierarchy of the chess scene blend
file but they also exist as individual pieces here.
These are very helpful for importing into things like unity.
So let's look at that.
Now let's go to for example the bishop sets the first one in the list.
Here's the bishop.
Note on your bishop that you had a Q here that we hid because we used it for shaping the head of the
poor as the bishop.
So what we need to do is when we export this as an FBI file I want to show you what happens in unity
so I'm just gonna put this in my downloads and then I'm going to go over to unity which you don't need
in still.
I just want to show you what happens.
Some of the things that you may find when you're working with a game designer actually turn up happening.
They may say or I like the bishop but it's got this big things sticking out of it and there are no materials
on it so materials won't come across.
I'm afraid not your texture's Anyway you make it the base colour come across room from blender but you
won't have the actual textures like the wood texture and the other thing is this cube is still here
as a subobject of the bishop.
Now I can just delete it in unity and it's gone.
But of course if we rueter reimport that model it would come back.
So your options as a blender artist are to delete it here.
But then you know you may want to keep this form for future purposes or just communicate with the unity
developer and say hey there's going to be this extra cube just delete it and create yourself a new well
is not up to you to tell them what to do but they would do something like create a new prefab.
Doesn't matter.
Those are there's a unity details.
But the point is that they can safely modify it as long as they understand what's going on.
It's hidden inside blender but is still an object when it's exported as an f b x and the same thing
would happen if we opened this as a dot blend file in unity we'd have exactly the same issue.
Right now I just wanna show you a different engine which is the unreel engine.
Let's just import the same piece into the unreal engine so if I just import over here the bishop.
One of the things with unreal is the scale is very different so when I import using the default import
settings which I actually don't want to use I would probably want to set this to point nought one but
if I use the default settings then the Bishop will be very large and unreal towering into the sky.
And of course it will still have this issue with the cube sub element in it.
Again you may need to do a special export for people deleting that element because hiding it will do
alright so the take home from Blender is that these hidden elements like cubes will appear in the sbx
and you may need to either delete them or communicate with the person youre handing it to to make sure
that they understand how to handle that.
Great.
So another thing to tell you is you can open up blend files directly in unity.
If youre using unity you would know that and that works just fine.
You can end up with a rotation issue with simple models.
So let me just show you that so that you're aware if we take a simple model like a blender porn for
example.
Let it open.
Look.
There it is.
There is a rook.
Now this rook has a single mesh.
There's only one mesh object in the hierarchy.
This is when we get a problem with unity.
Let me show you what happens if I directly open this rook.
In unity now.
Okay so I go to important new asset.
I go find the rook.
Pop it into unity.
And into the scene.
Now there it is.
And it looks like it's okay in the scene the warning sign in Unity is that the rotation has come with
a minus 90 on the X.
Now look what happened this is sort of weird bug you may you may have reported I'm just going to pop
a camera a light into my scene because it's rather dark that's better.
Now when I try and rotate my rook around the x axis it's all fine.
X is the red axis in unity when I try and rotate it round the y axis it's all fine.
But look at this when I try and rotate the z axis it behaves the same as if I was rotating round the
Y that will cause a lot of problems.
There's a simple way to solve that two simple ways to solve that from Blender.
One is to give your game designer an F be X..
If I exported this as an F be X as we did before with default settings it will be fine.
Another way to solve this is if you want to work with the blender workflow is actually to add yourself
in object mode.
A.
Empty plane.
Axis.
And that's just sits down here at the origin.
Inside the rook file.
If I then save that.
So here's the rook having saved it with these axes So let's pop that into unity.
Now it looks up right in the preview and when I put it in the scene we don't have this funny rotation
in X and all the rotations behave properly.
Okay so there's a useful tip for you in blender.
If you've only got a single mesh meshes only happens this bag with single meshes when you have more
than one mesh like the rook.
I like the bishop.
This doesn't happen.
Just put a plain axes in and that will solve the problem.
You can work directly in unity with a blend file then so the final thing to say is as I as I briefly
mentioned.
Is the materials don't get covered a cart carried across.
So if we were to look at the full chess scene here and bring that into unity.
It's going to take a while to import because it's a much bigger model than some of the other models.
I'm going to delete the rooke's in the scene and pop the chessboard in.
All looks good in unity but it's all flat.
You see there's no textures on the side of the board here no wood texture and the subject of actually
what we call u v.
Unwrapping your model over in blender your full chest scene model and exporting those textures is something
we'll cover it in a couple of sections time because it's a little more complicated so I hope that's
been useful given you some experience of how these things are going to end up in other packages.
Remember generally use sbx with default settings that will be fine if you are going to use unity to
open blender files directly put a plain axes into any model where you've got a single mesh and that
will solve your rotation issues.
And yeah.
So you say.