Hey what's up everyone Mark Price here at Devar slopes dot com and now it's time to actually get some
3D models in our project set up our assets as well to add that to the asset.
So first things first is I would like to get rid of the ship and the texture here.
OK we don't need either of those.
Someone or right click these and click delete and move to trash.
And then what I'm going to do is inside of this I'm going to create a new folder we're just going to
call this folder.
Click it here press enter.
We're going to call this textures.
And then at the top level are important to 3D objects.
OK so we've got some 3D objects here.
You can see these assets.
So we've got a pipe for half pipe the pyramid object and the quarter pipe on them.
These are 2-D assets here.
So let's go to the pipe asset.
OK.
And noticed it's pipe DHP so it doesn't really work with any any type of 3 files except DHP.
And I know this because I tried and I looked it up and it had problems.
And so I actually purchased these assets that we'll be using from Turbo Squidoo you can buy them there.
You cannot redistribute these you cannot sell these or publicly publicly or commercially sell these
in an app of any kind that you're making money on.
This is for educational purposes only so if you want to buy these assets you must purchase a license
at Turbo's squid dot com but you can use them here for your for your app and this project.
And they actually didn't come in this format here OK.
They came in multiple formats like oh they are SBX.
And what I actually had to do was I had to download blender OK go to a blender dot com.
And I went and imported these into blender and export them in da format and so my point is you're going
to be doing things like that.
And let me just show you one example.
So in case you run into the same problem which I did which you probably will or you can know how to
do it.
So make sure you download blender on your computer.
OK.
It's FREE.
Blender is free.
It's blender dot org.
OK.
And let's just show you here.
So skate ramp model so I got all these objects here and they came with some Blendr files or excuse me.
This one came with blunder files.
Other ones that I had here.
I actually had to.
I had to import these RBJ files into blender and export them so you may have to mess around and figure
things out.
You may have to import them into your favorite 3D program and blenders free.
And so anyway that came with this blunder files.
And so what I had to do was double click to open it and blunder which I had downloaded and of course
there's you know a 3D ramp and I would go to a file export and the top one here Kolata that da.
That's what that's what Apple works with unseen.
So you can of course export import many formats here like so.
OK.
So a lot to take in I know.
But you may run in those problems get blender.
It's FREE.
A future Toro's don't we have a course on it.
You can get familiar with it here.
So anyway enough talking here let's go and drag the pipe in and it's three textures.
We've got a.
A spec a bump and pipe we're not going to use the spec or the bump.
I don't think we're gonna use the bump but we'll drag it in anyway.
OK so those are over there.
And let's go ahead and grab the pyramid.
So I'm just going to draw the DA e-file over here.
Here we go.
And the textures and we could have made a folder for each of these that has the texture and the object.
It doesn't matter.
It's not a huge app.
So I'm not worried about it pyramid.
And then the quarter pipe dragged here and the textures we will drag over here.
Very cool.
So there's our 3-D assets.
Let's go to the images here.
And what I'm going to do is look at the images or excuse me the assets folder there we go.
And we're just going to command a.
And drag them all over here like so they no big deal.
So let's go look at some of the stuff here.
So pipe that DA.
So there it is.
If you're freaking out because it's great.
We're going to fix that here.
So something to understand is idea if I will work the same as a seen file.
And to my knowledge because I haven't found anything to specify yet there's no advantage or disadvantage
of using a sealed file versus a file.
But however if you do want to use a a file.
OK well you can do is you can click this asset here and you can go to editor convert to scene kit file
format and what it will do is it will convert the DA e-file to a scene kit format again.
I can't find any type of information out there that says there's an advantage to doing that.
But if you look at Apple's example projects they all use the scene kit format so you feel free to do
that if you would like.
We're going to leave them at Dot da files here because it works just fine.
So you can click the drag move things around.
You're obviously noticing that it's gray So let's go ahead and fix that.
And what you're going to want to do is select your object here.
It'll be orange like so you're going to see some icons over here in the top right hand side.
And the first things that we're going to do is with this cube looking icon here the note inspector we're
going to give it a new name and identity and we're going to call this the pipe for the half pipe.
OK.
And the scales point zero one with which is fine and that's the default scale and seen here.
And then what I'm going to do.
You can also in the geometry we're not going to do that.
What I'm gonna do is go over here to the materials.
OK let's just call this pipe and notice how it's just gray right.
Well the diffuse the texture is going to go.
So what we're going to do is we're going to change the diffuse from the current color and we're going
to change this over to the scaped underscore pipe the j peg.
And as you can see there's now designs on it and if you look at it like it's black What's wrong with
it it's black right here and here it's because of the lighting here in this scene.
So with the lighting model what I'm going to do is I'm just going to change this to constant so you
can see everything OK.
No lighting is just all bright which is cool.
So some nice little tagging there.
And then what we'll do is on the Where is it here and we multiply occlusion reflective Oh I see
if we use our Phong lighting then we can use the specular matte.
OK.
So if you want to use the lighting that's default here with the scene you can change it back to Phong
and then you can implement the specular map and the specular map what it does is it gives highlights
and things like that onto your 3D model to give the illusion of depth and brightness and things like
that.
But we're going to do the constant.
So it's Allbright so we can see it here which of course specular lighting wouldn't work when it's all
100 percent lit but it's fine for now.
You can adjust it as you desire.
So we're going to fix this for all of them.
So we're going to go into the pyramid select it and let's click the identity node thing here and let's
change this to a pyramid.
The reason why we have to name these is because we're going to reference these names in code.
So you do have to change the names an hour and it's common mistake also to go to geometry and change
that but then forget to change the identity here the identities the name of the note itself which is
very important to change.
OK that material it's called this pyramid and we change it to constant lighting and from diffuse we're
going to change it to the pyramid.
Quarter skate pite pipe rectangle that would.
Well that's what it's called.
The rectangle doesn't look like a rectangle to me.
Actually it does looks more like a pyramid.
OK so there's a rectangle or a pair mitten which looks good and save that here.
Let's go to the quarter pipe.
And what I'm going to do is give it a name.
We're just going to call this quarter and go back to the material.
Let's give that a name we don't have to but it looks really ugly without giving it a name.
And what I'm going to do is change the fuse to quarter j peg and we're going to go from Phong to constant.
And notice here how there is there's it's like gray.
It's the material is not showing on it.
And that's because it's a separate piece of the model and it's a different texture that goes on here.
And we're not going to deal with that right now.
So what I'm going to do and I don't like it anyway.
I'm actually going to delete.
So you can select the whole ramp or you can select just this guy here.
I'm going to select just the outside here and delete it.
And I like it better without it anyway.
So there's a quarter pipe which I think is pretty cool.
By the way this may seem really easy to you but it took me like a good three hours to figure out how
to import and export proper file types get the sizing in there.
So this is really good and important information to know and things to do here so I'm glad you get to
see it here because it was very frustrating and cool.
This looks really good.
So I think our models are set up correctly they're imported correctly.
And what we can do to see if it's actually working OK.
We can go back to our rent place or visi.
All right.
And what we can do here is we can change this instead of ship scene.
We can just pick one of these here like let's say pipe DHP and then run the project and see what happens.
And when you run the app you should see a big massive object with graffiti on it in front of you like
so and that means it's working.
Of course it's not properly positioned to the ground or anything like that it's just floating in outer
space and what are things really funny is how some of the tutorials out there on a market this is their
tutorial.
They they run the app and they show the object in 3-D space and that's Nuyorican.
But anyway we're going to do a lot more than that but make sure it's up and running make sure there's
no crashes.
And you should see an object at this point you can basically put any type of 3D object in here so you
want to go by your favorite 3-D assets whether it's a game character you know you want little minions
running around in the real world you can do that mixture you convert them to a dot da e-file.
And then you can import them here just for fun to see how they look and you have you have the tools
needed to do that now so that's it for this video now.
Mark Price at death slopes dot com.
Moving on and forward.