>> The Metaverse is coming.
What started out as an idea in
books like Snow Crash or Neuromancer,
is slowly becoming real,
albeit using Mixed Reality headsets or even your phone.
People are playing games in the Metaverse,
holding meetings or even visualizing IoT data.
But how do you get started as a Metaverse developer?
On today's show, I'm joined by Gustavo,
a developer advocate who specializes in
spatial computing, extended reality.
He knows the Metaverse is coming.
He's dedicated to helping developers learn not only what it is,
but how to start building apps
that embrace augmented and virtual realities
as building blocks towards the Metaverse.
Gustavo has put together
a curriculum that teaches you everything you need to know
about extended reality and shows you how to get
started with your first augmented reality application.
Learn how to build a basketball game that needs no hoople bull,
but allows you to use your phone to drop a virtual hoop,
anywhere in the real-world,
and throw virtual balls into it.
The best part is this curriculum is free and open source,
and use free tools to build the app so
you too can start building for the Metaverse.
Let's get personal computing with Gustavo Cordido.
[MUSIC]
>> Hey, Gustavo Cordido, how is it going?
>> Good, thanks for having me.
>> I hear you've been helping everybody get started with
extended reality for the power
of a pretty cool game on your phone?
>> Yeah. We actually have been
working for a while and creating some curriculum for
our students and our partners
in him out to
a very interesting application
that you can actually play on your phone.
It's actually pretty simple to build.
You don't need a lot of code, you
don't need a lot of technology for it.
>> I like that. I like simple to build.
I love the fact you're focusing on students
like how we can educate people around extended reality.
But I guess the first question is,
what is extended reality, is no expression?
>> Not at all an expression. Not at all.
>> How are you extending reality here?
>> Well, when you think about realities,
you want to think about what you see and what you perceive.
When we're usually talking and we're talking about right now,
we're experiencing our normal reality,
where I can see you, I can hear you, t's all of that.
Now there's extend the realities because
we can add an extra element into them.
That's when it comes into virtual reality,
mixed reality, augmented reality, and so on.
Because we add extra elements that were not used to
seeing into the scope that we [inaudible] and we can perceive.
>> Oh, so we extend the reality by bringing
digital things into our Caro world?
>> Correct.
>> That's usually through things like virtually headsets?
>> Yeah.
>> I've here for example, that's a reality headset.
>> You get complete immersion to almost a different reality,
because you cannot interact with what you have in front of you.
Meanwhile, if you talk about something like that,
that's a mixture element that
adds digital elements that you can interact with.
>> I see through those,
but I'm seeing something on top.
>> Correct.
>> Cool. You've actually built some of
the [inaudible] people get going with this?
>> Yeah.
>> Pull me through. What have you built for people?
>> Well, we're starting with trying to teach people the basics.
There's a lot that comes into play when
we're trying to develop new realities.
You don't normally just add an extra element into it.
One of the things you want to add and you want to take into
consideration is what are the sorroundings of the person?
What are the things that will make a person comfortable while
developing or testing one of
these devices or one of these applications?
Basically we teach what are
the measures of comfort that you need to have?
What is the basics of extended reality?
One makes an application extend reality because as I mentioned,
there's different kinds of reality.
You have virtual reality,
you have mixed reality, everyones reality,
which is probably the most common and each one of these have
different parameters and different considerations
that you have to take into account while building out.
Once we touch upon foundations,
then we can start into more of the techie stuff,
more of the fun stuff, so building.
We try to teach a little bit
of coding so people understand the basics of it.
But luckily Archaea really Columbus is
currently built upon Unity,
which is a game engine.
>> Game engine?
>> Yes, is what we built being inside. That's the coolest thing.
>> Literally you can take a game developer tool and you
can send someone gaming
have an avatar or like a chest you can open?
>> Yeah.
>> You can take those in Unity,
but put them into a virtual world experienced
through VR headset or IO headset?
>> Yeah, even a phone. That's the coolest thing.
>> Even a phone?
>> Yeah. You can actually encode
digital objects that you'll see on your phone and actually.
>> On you phone?
>> You're fine with them, through them.
>> I need this?
>> You don't need all that, now.
>> I can throw that away?
>> Yeah. I wouldn't do it but.
>> Awesome. Now you got to show me. I want to see this. Show me.
>> For sure.
>> This sounds so cool.
>> This is the Unity Window,
is a main Unity frame.
Unity is a very friendly game engine.
It allows you to create a lot of things.
The first thing you'll see here in
the center is what we call the scene.
The scene is where you're going to be placing the objects,
is where you're going to be interacting
with the things that you want to create.
Now, this time, you can see it's pretty empty.
That's because we don't want to have everything
spawn up soon after we launched the app.
We want the application to actually
give the freedom of
placing the objects and then interacting with them.
In this example for this application,
we're actually building a basketball game.
>> Can I throw a virtual basketball into a virtual hoop?
>> Yes. Actually I got you with the basketball there.
>> Actual virtual basketball?
>> Actual virtual basketball.
>> Looks like a puppy basketball?
>> Yes. You're actually going to be throwing that
into a basketball hoop as well is going to be digital.
>> As you say I can use the heads or phone.
I can put that say over there against the wall for a virtual ball?
>> Yes, exactly.
>> That's why you don't see anything here
yet because we haven't placed it yet.
Once we run this application on a phone or device,
you'll actually be able to place it.
>> Nice.
>> The cool thing is that we don't need a lot of culturalist.
That's one of the beautiful things of AR development is
that Unity provides you with all the elements that you need.
Basically we have our session origins is where are we
going to be starting our whole application.
We have a camera, that's where we're going to be looking
at once we're launching the application.
>> Camera's caught our eyes basically?
>> Yes.
>> Got you.
>> That's exactly what it is.
Then we have what I call a placement
indicator in this case, which is an object.
In this case, I've chosen quad,
which is just a small mass of an area.
I give it a texture that looks like a little arrow.
Let me see if I can make you see it.
There you go. That's where
it's going to let you know where
you're going to be placed into hoop.
Now, the beauty of Unity's that it's not very heavy,
it's actually very simple to connect
things into it it and just add extra snips.
That's what we call a little snippets of
code that allows us to do things.
In this case they're actually pretty short and pretty simple.
For example, if you want to place a hoop,
you can see that there's not a lot of lines of code.
It's actually pretty simple,
and most of these things come with the Unity.
Just to give you a little rundown,
we basically bring up our objects.
In this case, we're going to have our hoop pre-fab,
which is what I just showed you,
is our object prefab,
and Unity's basically objects that have texture and they're mesh.
Then we want to bring those things;
we create a game object called a placedhoop,
and that's what we're going to be setting our prefab to.
Once we get it on, we get it to it and when we assign it to it,
once we set it to spawn,
is going to spawn the whole prefab.
>> When you say put the hoop here in the app,
and those have the code to put the hoop back?
>> Nice.
>> You can actually see that we
have both that for the ball and the for the hoop.
But of course, the hoop is the first thing we want to place.
We don't want to throw a ball when there's no hoop.
>> No threat.
>> This thing is there. In Unity,
we have what we call the update function,
which is the main function of the whole scene.
Once this is running, this is what's going to be updating
constantly while the application is running.
This basically is telling us,
if the object is placed then we don't have to update anymore.
Now we can move into actually playing.
But while it's not placed,
and we can go and look into the touch and so on.
The way I set up this application for us to work is
basically you touch on your screen of the phone,
once you want to place the object.
You can look around.
You can look at your indicator and
actually place it at the location.
>> Sometime my phone is, say,
over there, place, and it puts over there.
>> It'll put it over there. You'll see the indicator on
the phone too, so you'll be able to do it.
However, I do recommend to scan a wide area,
because you want to make sure that the camera detects most of it.
That's one of the things that come with the phones.
>> The phone detects all the areas
at work, the way like the floor is?
>> Yes.
>> Because when you put this down it's going to
be on the floor, isn't it?
>> Yes.
>> The phone's going to identify where that floor is
using the magic inside the phone.
>> Yeah. The good thing is that every phone has this.
It's iPhone, Android, whatever you think about,
they have it. You're good with it.
>> All the new phones just have that, it just works.
>> Yes. Any smartphone will have it.
>> Nice.
>> Not a lot of requirements there.
Once we feel the touch on the phone,
it's going to start what's called a recast phase.
That's going to be basically throwing race.
Race are invisible,
imagine invisible lasers are detecting the area,
and that's what's going to be saying how to place the hoop,
and make it look as real as possible.
That's all done in the phone.
You just have to call the actual recast,
have a recast manager take care of it,
and once all the hits are there,
magic is done, hoop is placed,
and you can actually start playing.
>> There's a bit of code that says
to the phone, send out laser beams.
>> Yeah. Pretty much.
>> I know those laser beams workout where the floor is.
>> Exactly.
>> I do hope these phones don't get smart,
come attack us with lasers.
It sounds a bit scary.
>> It is. Now,
the other script that I had
added into this is what I call ball control.
This is mainly so we know what the ball's going to be doing.
>> Just when you throw the ball,
the script to the managers,
I guess, gravity.
>> Yes. That's one of the beautiful things here.
Because at first you would think, how do I program gravity?
I don't know physics, that's too much for me.
I just want things to happen.
Basically, we start a new function of a new
updated that's going to be running after the hoop is placed.
In this case, you see that I have
a function that's called GetMouseButtonDown.
That's because I can use a mouse if I was playing on a computer,
I could use touch if I'm on a phone.
It's a, I would say, multi device function.
>> Nice. You're not just because you're not writing this
just for a phone, you're writing this,
and you could use this in other augmented reality devices. Nice.
>> Once it detects that it's down,
it'll start the whole throwing function and once you release,
it's going to be releasing the ball.
>> Then it goes to the air. There would be something to work
out the gravity so it's
not just going to keep going off into space.
It's going to go up and then come back down again.
>> The gravity comes from our forces inside of Unity,
Unity has its own physics and I can show you
through here. If we go.
>> Unity knows what down is.
>> They detected. It's pretty nice.
If we go into our session origin,
actually where we have it under control, prefab.
I'm so sorry. I'm looking at the wrong one.
If you look at our prefab,
we have what's called mesh colliders.
That's what's adding dimensions
outside of the prefab for things to collide with it.
>> That can pick up with the basketball as it goes through.
The basket bounces off the back wall.
>> In my case it always bounces.
I guess I'm really terrible at it.
But that's part of it.
>> You can build an asset if you play basketball,
you play basketball for tophi. Got you
>> Now, for objects that are going to
be behaving like real-world objects,
we have what's called a rigid body.
It's a property that allows us to bring physics into it.
Once we bring physics into it,
we also have to have another collider, by the way,
guess a ball, it has to collide with something.
You can have the collider on your hoop,
but if the ball doesn't have
the ball is just going to go through it.
>> I guess straight to the ground as well.
>> Yes.
>> You did have perfect basket,
it goes straight through the hype and then.
>> Then it just keeps falling forever
>> Just falls through the earth, never seen again.
>> Exactly. Once you have
both your collider and
your sphere and then you have your rigid body,
then you cannot think so.
You see I just clicked on the button that says use gravity.
>> Literally is just, I typically use gravity button.
>> Then I will use gravity map.
>> Nice.
>> Newton will be jealous.
>> Nice.
>> From there, we can basically just move on and start playing.
>> Cool. You can mention now I take that and you just
deploy that to say, my phone.
>> Yeah.
>> That's now deployed to my phone.
>> Yes, and you don't even need to have a plug.
>> I [inaudible] unplug it?
>> Correct.
>> Should I show you some moves?
>> Yeah.
>> Let's go outside and do it. Let's do it. Let's go on.
So you're saying, I don't need this.
>> Not at all.
>> I don't need that.
>> No, not at all.
>> Let's do it. Let's play ball.
>> We need this phone.
>> We launch the app.
>> We launch the app. Once it's launched then we're going to scan
the area so that it do show up and then you can see it.
>> All those dots on the floor, they're not really
there. That's the lasers?
>> Then you can see that placement indicator
telling us where the hoop is going to be.
>> The rest of the hoop guys.
>> If we place it here.
>> That's the hoop. That's the Fulgur flying.
>> Yeah. If you want to try to throw it.
>> If I flick that up.
>> Down is right there.
>> That's what we said about the other rigid body.
It bounces off the hoop.
>> Correct.
>> Awesome and then we spin in the ground,
but okay, that's really cool.
Awesome, let's head back inside
and be done with the rest of Crayton.
>> Yes, let's do it.
>> That was fun, I haven't
played basketball ages, that was great.
Cool. You said that everything you talked about today,
this is something that's a curriculum for anyone to
use so trying to be very quickly show me this curricula.
>> We have this hosted on GitHub.
It's free, open source.
>> Free open source, nice.
>> I said everything's there so it's had
an eight-week 25 lesson curriculum.
Once you get there, you can see
all the components of the curriculum you have,
although, they call it all the anodes
of it since we're hosting it as a repository.
But if you go down, you can have a very nicely tidy read
me and you can start jumping
into it straight up and you have your first unit which is,
realities, we have different lessons.
We have an assignment for each one of our lessons.
>> It's not just reading, there's a bit of doing there as well.
>> Yeah.
>> Nice.
>> The deeper you go, the more
entertaining this becomes except very technically,
they're very knowledge base,
they're very less practical.
But the deeper you go into it, the more you start learning.
We have a special design and we have the interactions.
>> It's going to lower theory here of
just accelerated. [inaudible] cool,.
>> You actually start
addressing designing the basketball game
up before actually building it.
>> You build it as you're going through
designing [inaudible]. Nice.
>> All the considerations that you need to have in mind and so on
until you start jumping into what I call the fun stuff,
which is all the technical part as.
>> Building thing.
>> Same code, we have all the basics of C-Sharp.
Then we jump straight up into Unity,
what the fundamentals are,
how to understand the whole Unity Editor.
We go into the application logic,
so we start writing the scripts,
we started asking for inputs, and so on.
We start building our application.
Finally, we end up with a very nice capstone project that's
an open-ended assignment for you to
build this into one of different realities.
Of course, right now you can see you already
solved one of the final products of,
I meant to reality, one that's hosted on a phone.
But if you want to build it on virtual reality,
for example, like one of these headsets, you can do it as well.
If you want to do in a mixed reality one, you can do it.
You want to do it on the web because it's also WebXR,
which is an extended reality through the web,
you can build them on a browser and
actually interact with it with the device for a phone.
>> Nice.
>> Multiple avenues and dissolved they're all covering this and
this curriculum for you to learn and
try to get them down from your own.
>> If you say it's free in Open Source,
there's no cost for learning this.
You say it can work on the phone so as long as you got
a phone you can learn it or other tools.
Does Unity cost money?
>> No, Unity is free for
anyone that's not working in an enterprise,
and any code editor will work for the rest.
>> As long as you got a laptop and you got a phone,
you can build this for free.
>> Yes.
>> This is phenomenal. This is absolutely core, I love this.
Thank you so much for joining us [inaudible].
>> Pleasure.
>> To share this with us. This is just fantastic.
>> Thank you.
>> Thank you for having me and it's my pleasure honestly,
I hope a lot of people will take advantage of this,
is the next big thing.
I'm very excited for it. Also, the psycho, thank you.
>> Thank you.
>> As cool as this project is,
what's even cooler is you can recreate this at home.
Check out the link below for everything you need.
[MUSIC]