in this course you are going to learn about augmented reality from both a theoretical and practical perspective this course is for absolute beginners and you will learn the fundamentals along with ar development with unity c-sharp and other tools hello everyone and welcome to this course of augmented reality this course teaches you the theoretical and practical prospects of augmented reality from the very basics to a level where one can develop any augmented reality application they want after this course you'll be able to develop your own augmented reality applications and filters so this is about the course now let's know a little bit about me so i am priyanshi bhattacharjee i have worked with multiple startups as an exar developer and have taught over 200 students about extended reality at different colleges and universities i also run a youtube channel called coded reality where i make content on augmented reality virtual reality and mixed reality so now let's you know discuss about the syllabus of the our augmented reality course so we will start by understanding the fundamental concepts of augmented reality virtual reality and mixed reality and at the end of our first module we're getting an idea about the market size and growth of extended reality over the years in module 2 we will start to learn about a game engine called unity3d which we'll be using to design and develop our augmented reality applications then in module 3 we'll be starting with a programming language c that will be using to code our augmented reality applications in which we'll be learning about the basics of programming with c-sharp and many other fundamental concepts then in module 4 we will start with developing our ar applications we learn about market-based ar in depth including its architecture and how marker-based ar really works then we'll be learning about the sdks and start developing applications with an ar sdk called view fourier engine after the completion of this module we will be moving forward with module 5 in which we'll be developing three ar application which includes ar card customizer air business card and ar encyclopedia after we learned to develop ar applications we'll move on to module 6 which is a bonus section where we will be learning to develop our own ar filters for instagram and facebook and then in module 7 which is also a bonus module we will end this course by creating our very own 3d ar filter here i present to you some of the ar applications and filters we will be building throughout the course so this is an ar filter which will be building and this is an ar application which we will be building all right this is an ar encyclopedia app but these are not only the one which we will be building during the course we'll be developing two more applications like ar car customizer and another one is ar business card so who can uh follow this course this course is made for beginners so you don't need any working knowledge of augmented reality to follow this course i'll be teaching you everything from the very basics so if you don't know about augmented reality don't worry you will be learning to develop augmented reality applications from scratch you can get more detailed information about the course from the website www.ar course.netlife.app thank you hello folks welcome to this lecture this is the first lecture of our course uh augmented reality for everyone in this course we are going to get an idea of uh what exactly is extended reality what comes under the hood of extended reality that is we are going to learn about augmented reality virtual reality mixed reality we are going to learn about the mixed reality continuum all right then uh we will end this part of the lecture by uh understanding the growth of you know the growth of extended reality over the years and what we are projecting by the year 2025 all right so without any further ado let's uh understand all right see uh extended reality now try to understand extended reality in this way it is the extension all right it is the extension of our current reality all right you can say that it is the a virtual all right it is a virtual extension of our current reality all right you can understand extended reality uh like this all right there isn't any specific all right there isn't any specific definition that would you know uh do justice to this uh whole domain all right but how i like to explain extended reality is it is the extension of our current reality or like that and it is the virtual extension of it is the virtual extension of our current clearance you can say extended reality is the hood all right means it is the roof and that roof has three children all right those three children are named as augmented reality virtual reality and mixed reality all right so extended reality is the main hood and it contains three other domains augmented reality virtual reality and mixed reality all right extended reality is the parent domain all right now as we have understood what exactly uh is extended reality right what are the subdomains of extended reality let's you know let's understand what is augmented reality all right you see you might have already you might have experienced augmented reality in your life but you it might happen that you didn't knew that it was augmented reality like you know when you used to play uh pokemon go when i i guess it released in 2016 at that point of time i i was very excited to play that game all right just because i could uh you know the spawn the pokemon all right i could bring the pokemon into the real world all right it had a ar feature that could you know by pressing the ar camera we could bring the pokemon into our real world on it i was very excited about that feature all uh the reason why i didn't uh was i wasn't able to play the game because you know uh i wasn't able to roam around for free like it had gps enabled right so i the only reason why i played the game was because of its ar feature and at that point of time i didn't know what exactly augmented reality was i didn't even know how this thing works all right at that point of time i just started with programming all right so uh we have we all have used augmented reality at some point in our life and didn't know exactly what it was right so one example you already got all right the one with pokemon go now people used to think uh that pokemon go is one of the biggest big breakthrough in augmented reality but it is not the truth is this because see if i if you look in after this course alright after this course if you look into that now the creating the mechanism all right that is the pokeball throwing mechanism to the uh pokemon it uh that mechanism is very simple to make all right that mechanism is very simple to develop it's just we are throwing it through a projectile so uh understand it like this okay basically augmented reality is nothing augmented reality is nothing but you know uh bringing all right that is uh augmenting or you know putting the digital objects all right in in our case the digital objects like uh in pokemon go pikachu is a digital object right so we are taking the digital object all right and placing it into our real world that is what augmented reality is how we are placing it we are placing it through our device all right and uh don't worry we are going to understand all right how all this thing works all right how augmented reality actually works right how what is the architecture in our future videos but for now understand it like this way that we augmented reality is basically the augmentation or you can say the placement of digital object in real world like for example take your favorite cartoon all right for uh a long time back uh my favorite cartoon cartoon was doremon all right i used to watch it like all day i love that cartoon when i was like in class third or fourth so at that time uh if i knew about augmented reality i would have surely tried that he uh i would have tried augmenting dorem on into into my room alright i would have tried that so just think of it this way you are actually bringing your favorite digital uh character all right into your real world so that is what augmented reality is that is basically what augmented reality is all right it is basically the placement of data object into the real world like all right and now as i have told you as i have told you now you you might know all right you you right now you are aware of what exact uh how you know pokemon go uses augmented reality right now what i want you to do is after finishing this lecture install that game and try it out try it out by yourself see how exactly the ar feature is working all right it would be really fun believe me now there are uh mainly there are many majorly two types of augmented reality marker based augmented reality marker less augmented reality all right in markerless there are four other types of augmented reality that is superimposition location based projection and outlining all right don't worry i'm going to uh make you understand what exactly are these all right so let's start with marker based see the meaning of this already the meaning of marker based is in its name only marker based ar means the augment that or the augmented reality feature works only if there is a marker all right only if it there is a marker to help augment the object all right that is what augment marker based augmented reality is basically now this type of ar basically works on the concept of tracking and recognition all right it first tracks the marker means it first recognizes the marker and then tracks it tracks it all the way long all right so that is how this marker based ar work all right basically in this type of ar now you would be you will be needing all right you will be needing a marker to augment you would be needing a marker uh to help augment uh the digital object in the into the world all right like like in here all right like in this you can see that this uh lego batman all right or you can save this minecraft blocked batman all right it's being augmented this uh this particular minecraft shaped batman is being uh me what can i say is being augmented on top of uh a marker all right here you can see it is being augmented on top of a marker so this is what marker-based augmented reality is to augment this kind of uh to augment digital object we would be needing a marker all right so that is what marker-based augmented reality is all right and in this course we will be developing marker-based ar all right so if you're not clear with the concept right now that's totally fine all right uh you you would be when you will be developing uh the marker-based app by yourself you'll be very clear that how exactly that those things work all right but for now in simple words uh market-based ar is something all right that would be needing all right in which we will be will be needing it is mandatory to have a marker all right it is mandatory to have a marker to augment the digital object on top of it or or else you won't be able to you know or else you won't be able to augment it all right so that is what marker based augmented reality is all right now uh pokemon go is not an example of marker based augmented reality all right i would tell you uh what example is it for all right now let's understand what is uh markle sayer all right now as you have understood about marker based er martin luther is the total opposite alright the difference between them is all right the difference between them is marker based ar needs marker all right that is it needs some you know point or you can say some something to all right it needs something to augment all right it needs and that thing is a marker so market based augmented reality needs a marker to augment but markless ar doesn't now there are some algorithms all right like simultaneous localization and mapping is an algorithm that ah is used all right that is used to map the whole you know the whole environment around us and then place the objects in there all right so markerless ar doesn't needs all right markless ar doesn't need any sort of marker what it does it will scan the uh let's say if i'm trying to augment uh some object in my room what will it do it will scan the surface it will scan the walls all right it would uh create you can say it it creates a virtual you know visualization of itself and then you know it will place all right it will place the object right in there all right so it will first scan the room alright it will first scan the root after scanning it will place the object all right now how it will scan there is an algorithm it's a it's a very widely used algorithm it is also used in robotics but it is also used in virtual reality augmented reality and mutuality so it is known as slam that is simultaneous localization and mapping all right so that's how we um you know build marketless ar features all right so markless air is is very simple it will this ar will you know simply detect your room or means the plane the vertical and horizontal surfaces of your room all right that is the planes and perform the augmented augmentation on those particular planes of those objects all right means it will augment the digital objects on on top of those planes that your ar have has detected right now for example in this you can see this ikea place app all right this is the demo of ikea place basically this is a very famous you know uh furniture app that you know makes use of marketless augmented reality to help you decorate your room all right like if i let's say if i want to buy a sofa all right like you can see it in here what i'm doing is i'm installing the ikea place app i'm searching for some sofa in there i like that sofa very much but i don't know will uh that sofa will you know fit my home or not fit my in the sense it will look good in my room or not something like that all right now what i can do is i can make use of a marketless augmented reality scan my room and then place the object in there all right and then uh through my mobile i can see that if uh the sofa is adjusting at my place or not all right and based on that i can buy the sofa so that is how mark that is what markle is saying all right now there are multiple use cases of markle is here all right and uh decoration all right it means this putting furnitures and all this is one all right is one industry focused all right uh it is uh of in interior design is another industry all right in where mixed reality all right and where mixed reality and augmented reality are are widely used all right like for decorate decorating the homes and all those things all right so hi i hope market based and marketless ar is clear so basically marker based ar is nothing marker based uh ar needs a marker to perform the augmentation of for digital objects into on top of the marker whereas markless air doesn't doesn't need any marker all right what it will do it will scan the surface and then augment the digital objects on top of the surface all right so that is what that is the basic difference and that is what they do all right now let's get into the concept of superimposition based ar all right see superimposition based augmented reality all right is basically a technique that you know uses object recognition now in this diagram all right in this diagram you can see the there is a person's hand all right there is a person's hand and on top of that hand we what we are what this app is doing is you know displaying displaying a skeleton of the hand on top of the person's hand alright so that is what superimposition based ar is it superimposes all right it's super imposes that means it put all right it puts and digital object on top of a real object all right and that works with the help of object recognition all right so that is what uh superimposition based ar is it's very simple all right it's it's very simple now all right see what is happening in here basically with this photo all right you can see that we are able to you know augment a skeleton skeleton of hand on top of another person's hand alright so what is happening uh the algorithm all right that is the ar app is recognizing the hand then putting all right or you can say then uh superimposing all right superimposing the skeleton on top of that hand all right that is what it is doing that is what superimposition based ar is all right very simple all right now these type of ayana is very helpful all right in medical industry all right like you can say you can uh superimpose an x-ray all right on a patient's body and look into it real time in 3d so how cool that would be and how efficient that would be right that would make the doctor's job more easier right so that is how we use superimposition based ar all right and superimposition based ar are used in you know in many different ways so you can do your research on that all right and even if you if you like you can uh try developing something with superimposition ar also all right so you can totally do that that would be real fun all right so that is what superimposition based ar is so i hope you are clear with the very fundamental concepts right now after this we are going to get into this location based area all right see loca uh location based area now uh let me tell you uh you you uh i'm sure you know about uh gps right you know about uh or what can i say google maps right so you can say this is google maps in augmented reality all right like in google maps when you search for a place what it does it it gives you the address of that place or that means it marks the uh road it will you know highlight the road through which you can go go how much time will it take all right it will label the places or that will come while you are going in there right it will label those places you but what you are doing in there you are uh seeing all those in a 2d screen all right what location based ar does is it's also you know does the things almost same but in augmented reality it would give you the live feed all right in 3d it will give you the live feed in 3d like you will if you are going somewhere you uh if you turn around you would be seeing a name plate all right hovering over a building all right that would uh give you an idea yeah this is the building what i'm looking for all right then you can go in there so this type of ar experience makes it more easier all right to you know use us like locate places all right so that is what location based ar is location based ar basically you know ties digital content and the experience it creates to a specific place all right the objects are mapped out so that when a user's location matches the predetermined spot it is displayed on the screen all right so that's what i told you just just now right this is the this definition i gave you the very simple explanation of the same definition written in here all right so location based ar is just like google maps but in ar all right and more efficient more better all right in a more better way of course now you guys might be thinking why we are going to you know uh held our phone in uh held our phone in hand and start looking for places all right it's going to be very hectic i totally understand that all right and that's not how we are going to you know use location based ar currently there are multiple ar glasses that are being released all right like geo glass is releasing their own ar headset then qualcomm right qualcomm is releasing their own ar headset all right so many people many industries all right are working on their own ar and mr headset then a magic leap is there so when those glasses will release now after a few years alright or maybe in this year only you will be seeing location based ar all right it would be gps but in ar so how cool that experience would be right so that is how these things will work so i hope this uh the concept of location based ar is clear all right now here comes projection based area now let me make it simpler for you all right projection based ar is another name of holograms all right i know you guys might uh have an idea about what exactly a hologram is right it basically project solid it is projecting with you know a projector role uh into uh means into the means uh what let me let me explain it in a simple way what it is doing it is like with a normal augmented reality all right that is being used by a fort the difference between projection based ar and normal ar is we are in normal here we are using our phone to augment all right we are using our phone to augment but in projection based art we are using some other device to project all right to project the digital object into the real world all right that gives a more immersive experience in that case you are not you are not going to need and phone all right you are just having some project and it is projecting all right it is projecting the 3d object in the real world people are working on this kind of uh technology all right although right now uh it hasn't been that successful all right but people are working on that and i'm sure this is something that we are going to get in future all right and people are really working like working hard on this kind of ar alright it would be like really cool like you will be the tony stark all right of real world so yeah augmented reality virtual reality mixed reality has the potential to bring all the things that you see in the iron man movie of course not the arc reactor but all the digital things like the jarvis all right artificial intelligence is also having those potential so if we combine these technologies now we can have something like java so understand it this way all right augmented reality virtual reality and mixed reality is the future of our world all right maybe within five to ten years you won't be even using your phone you will be have having slim glasses all right you will be having slim glasses through which you will be able to augment the digital objects alright and that is going to be true because we have those glasses now all right yes they are they are bulky like if i talk take an example there's a microsoft hololens all right if you if you have used that uh before you you would get the same experience like uh tony stark right similarly then uh the uh other ar glasses is being released like geoglass is releasing their own then uh qualcomm is releasing their own so within five to ten years all right you won't be using your phone to communicate or you know do things you will be using your ar glasses to do all the things all right there's snapchats lens all right so a lot of things are there that you can do all right so now as you have as we have understood uh the very basic concepts you know the concepts of extended reality or we have understood the basics of augmented reality we have understood marker based ar markerless air superimposition location based and projection based and the last one we have and you know the topic of augmented reality is outlining ar all right now what exactly is it all right outlining ayana is uh are mostly used in cars all right you might not be seeing them more often all right although uh i guess even tesla is working on implementing ar in their uh cars all right so basically outlining it will outline the direction all right it will outline the it will map the world and then outline the direction all right with these uh trails here you can see right here you can see so they will outline those trails and help you you know go through all the paths all right it would recognize the boundaries all right it would uh recognize the lines it would help in many situations all that when human aware human i can't all right so augment augmented reality is the future all right augmented reality which in virtual reality is the future so this is how outlining ar is used all right even if tesla is working on implementing augmented reality alright then why can't we right we are developers we can do that of course we can do that so you can see people are working on implementing ar in their cars right how cool is that right so that is what outlining ar is all right now as we've understood the fundamental concepts of augmented reality let's uh get into the virtual reality all right virtual reality is the total opposite of augmented reality in augmented reality what what did we do in augmented reality we were augmenting all right or you could say putting the digital objects in the real world but in virtual reality we are taking all right we are taking the person itself to the virtual world all right or you can say we are teleporting the person to the virtual world right so that is what uh virtual reality is and it gives a very good sense of immersiveness all right for example all right see even i don't have a vr headset all right let the truth be told alright i don't have a vr headset i don't but i do have the understanding how it feels all right because i s at somewhere all right at somewhere i have used at some point of my life i have used a virtual reality headset yeah of course not at my home but when i you know used to go to some game parlor all right they had a virtual reality experience alright i i am i have used i know how that feels all right and i'm glad that i can explain it to you that uh try to understand it like this all right let's say you you are playing a game alright take any of your favorite game all right one of my favorite game is you know gta 5 right although i don't play games much nowadays but if i if i had to say one of my favorite games is gta 5 and gps and andreas all right so what i'm going to do is i'm i'm going to close my eyes and you know think of or think of think of a character in there all right think of a character in there and try to you know close my eyes and try to experience all right all that thing by myself all right and the level of uh immersiveness you will get there now after like while thinking or while imagining you are in uh in there in real time in the game and playing all the things doing all the things that the game's character can do will give you uh you know a sense of immersiveness and using virtual reality that sense of immersiveness increases by 100 all right because at that point of time you are actually in there you are actually controlling the person available inside the game right you are actually able to control the you know you are actually able to control the character available inside the game so virtual reality is nothing but you know it is a technology that teleports uh you to a virtual world all right so that is what exactly it is now there are you know multiple games and uh educational applications available right for example um anatomy all right it teaches you about the human anatomy all right so that that is an educational app all right then there there is beats about one of the very famous game like uh in the in the first image you can see this is the gameplay of a beat saver already the second image this is the gameplay of half-life alex all right in the third image this is the battle royale game yeah there is also a battle royale game in virtual reality so you can see the level of immersiveness the level of realism you will be getting this is called uh what can i say stand out vr battle royale all right so the vr can be used in multiple sectors it can be used in healthcare it can be used in a military training already it can be used in flight training it can be used in manufacturing all right you it can be used in education it can be used in gaming so the you know what can i say the level all right or you can say the limitation of vr is you know unreachable right yeah there is some limitation alright like the cost is there all right but cost you know cost is decreasing like uh previously in india already i'm talking about in india in india previously uh oculus quest already the vr headset it used to cost around 80 to 90 000 i guess all right and now calculus quiz 2 costs you around 30 to 40 000 all right so you can see how drastically has the the price has you know the price has decreased by half all right so the price of vr headsets are decreasing all right and also the quality and the technology is improving and increasing all right so just a few more more years and you'll be getting uh vr headsets maybe in 10 000 or 20 000 so things are you know things are happening real quick and uh mixed reality is actually mixed reality is going to help us a lot if i talk about in the manufacturing industry all right if i talk about uh the military training industry all right and as we have understood about the virtual reality augmented reality it's our high time to go to mixed reality all right now let me tell you all right also one thing i forgot to tell you that if you are using virtual rear uh vr now you'd be needing an headset that headset is called head mounted display all right so you make sure you know that this term all right or you can say it's uh in abbreviated form it is also called hmd all right or head mounted display now see mixed reality all right mixed reality you can mix reality now is the you can say it is the brother all right this is the brother or the twin brother you can say or you can say just just the brother of augmented reality all right why because see it is let me let me simplify this term to you mixed reality is just like augmented reality but yeah there's a but but it is more advanced all right it has more capabilities than normal augmented reality why all right see there's something called already mixed reality continuum or you can say mixed reality spectrum what does that mean it means that the you know the merge all right the merge of augmented reality and virtual reality or you can say the real world and virtual world or digital world all right we combine them you can you know go virtual and real at the same time all right with with mixed reality so mixed reality has a larger potential if we talk about the uh like training industry all right like in manufacturing industry mixed reality can help you know to recognize those items all right it can help you through the manufacturing process in healthcare all right it can help you you know operate a patient alright it can guide you through all the things you don't even need to you know distract yourself uh to any other computers or uh you know digital objects available in the uh in the icu all right you can say or in the patient squad all right where uh basically the operation is happening all right you don't even have to move from the patient you can stay in there uh monitor all the things all right in your mr headset all right monitor all the you know how let's say heart rate or blood pressure or any any data through your mr headset only all right so this is how it can help in uh you know medical industry then uh military training recently i guess i just read somewhere a bite in 2018 all right in 2018 uh military all right i guess the u.s military uh reached microsoft and offered around you know 400 to 500 billion dollars to build mixed reality headsets for them all right for training military all right for training the military so you can you can you can you know you can just think how powerful these headsets are all right it can help in training so mixed reality can help you uh anyway like for example in india there's a startup called ajna lens all right what they are doing they are uh creating headsets for government which are being you know used to uh train military all right indian military so uh it is being used to train navy seals they are it is used being used to you know train numerous people out here in india so you can see how mixed reality is exactly helping right so mixed reality uh i would say mixed reality is future all right extended reality is the future of our world all right it is the future of our world so mixed reality is nothing but you know it is the advanced form of augmented reality all right it contains both it means it can go both virtual and are real all right so that's what makes reality is all right and you have already understood the mixture about the mixed reality spectrum that is the combination all right that is the combination of physical and digital world all right so that is what mixed reality is all right and also this image is taken from microsoft's website so yeah now as we've understood all right about all the things already about mixed reality augmented reality virtual reality let's you know let's get our heads into x the growth of xr all right or you can see the growth of market of extended reality all right see the extended reality market size all right uh is going to reach all right around you know 393 billion dollars by in 2025 at uh at a growth rate of 69.4 percent cagr all right it is a report by market research future all right now you can see that by in 2017 uh the growth was the growth was so less all right means there wasn't any awareness of augmented and virtual reality but you can see by 2025 what will be the growth all right you can read this chart by yourself all right so you can see how how it is impacting now i want to tell you that this chart already this chart is you know this chart is not stable all right uh right now in 20 in 2022 only uh the market has reached more than 200 billion dollars all right so you can see you can see how how the growth is actually but it can even happen by 2020 uh three already by 2023 it can even reach 393 billion dollars that is estimated by 2025 so all right so make sure you know you go through all these notes all right all the notes will be available in the website so make sure you go through that so yeah that's it for this lecture thank you hey folks um welcome to our module 2 and in this module i'm going to tell you how to install unity and after that uh i'm going to uh show you or tell you how to use unity all right what are its interfaces and all those things all right so sit tight on your uh seat and watch the video all right if you want you can uh grab some popcorns also so yeah first of all what is unity before downloading we must know what is unity if we don't know about that then how could we work out with that so we need to know what is unity see unity is a engine all right it's sort of a tool it's a as not sort of a tool it's a tool it's a definitely a tool it's a tool for developing games for developing simulations for developing ar vr applications all right uh you can even make your own simulations like you can develop your own um robot inside of unity you can develop your own let's say self-driving car you can implement your own self-driving car inside of unity yeah that's possible that is 3d simulation so uh and one of the most like most one of the best things about uh unity is it is multi it can it works on me unit uh linux it works on mac os or works on um windows all right and also you can build uh actually you can actually build applications all right uh you can build your games your apps for multiple platform windows mac os linux then android ios playstation then i guess it also has a feature for xbox or also i'm not sure about that i haven't researched about it then there's also lumen luminous then uh there's uh webgl so yeah multiple things are available all right so yeah that's what unity infinity is a very good tool for developing these things now what you need to do you have to go to this page all right i'll be providing the link down below right and uh click on this all right just just click on this download unity hub all right after you have downloaded install it all like this these processors are very simple i need not to show you i'm pretty sure about that now what do we do after you've installed on it open your unity hub it will it might not look something like this all right because this is a beta version on it uh it's in currently in beta testing all right it does have some bug like recently if a phased one that it wasn't grabbing my license but i had to restart it and it like worked really well so yeah so basically uh it might seem a bit white alright the interface might be white but components are same so when you first open your unity already log in log in to your account alright activate your license uh it will only show you like it will by default uh show you how to activate your license all right you just need and if it doesn't uh go to this click on this like preferences option all right uh go to this licenses all right i have a professional license i got it through student plan and click on add and choose any license you want all right now let me show you one thing right this is the basic interface of our whole unity hub all right through this we have to run our unity this is the project section alright in this project section multiple projects of yours will be like put it in here like will be listed down here uh as you will be installing unity for the first time it won't show any of the projects it will be totally empty these are my projects all right then there are other tabs also i'm sure you would explore this learn and community tab but for now let's go to this install tab so to install our own unity version all right now this is my unity versions alright these are my unit version that i am having that is 20 20 20 90 and 2018 all right uh these are my unity versions i've installed those i work with these uh mostly these two version more often all right now this this panel would be empty alright this panel would uh would uh be empty if you haven't installed any um if you haven't installed any of your uh unity versions till now so to install one just click on install uh editor all right after that it will prompt upper menu alright there are multiple uh versions uh in here all right there multiple versions in here i'd recommend go for 2020 all right even unity recommends this as of now and also always download the lts version why lts is limited time support and it's it's the most stable version all right it's the most stable version that we would have so would always download a stable version and we'd also if doing our development in unity 2020 only so i would recommend download it right so then click on install now you can either install this all right any actually any id or code editor would work but maybe you won't get that a code completion on that autocomplete but i would suggest downloading it all right so download this to all right if you want linux you might not get this option then you have to use any other code later only but another thing i would want you to do this is click on this android build support under sdk and indicators and open jdk all right and remove this check mark from the documentation we don't we can access it from web all right and there are other like build versions too you can also like take a look at these and download them then click on continue all right click on this i have agree and all those terms and things click on this alright and then click on install all right and it would start installing your editor right and after it gets installed all right just click on this download and it will show if any of you if any of your data is installing or not and now if we want to create our own project click on this new project option alright sorry it's taking a bit of time i it's it's uh it's a bit buggy so yeah i'm really sorry about this thing yeah so as you can see here are multiple templates available right multiple templates available there is microgram 2d mobile karting micro game lego 3d mobile auto showroom all right but for now we have to work with these two only not even the 2d one we have to work with the 3d only all right so what we have to do see there are multiple options like another is this 3d uh sample scene hdrp and urp so basically uh what this does is this basically gives you a more better graphics more optimized graphics alright urp better best works for uh best works for us like computer systems and uh the urp best works for mobile phones all right so yeah and then uh you need to name your project alright name your project in here i want to name my project let's say learn to develop all right i'm sorry for the spelling mistake all right and then you can simply create project and your project will start creating all right so yeah that's it this is the base procedure and i have also shown you how to install unity so yeah thank you so hey folks welcome to this uh video and in today's uh this is the second uh part of module two alright in the first part of the module i gave you an introduction to unity and also uh told you how to install unity and create uh your first project with it all right but now in today's video we'll be covering rest of the topics or the rest of the imported topics that are left all right so without any further delay let's get started so our first topic to cover is navigating through interface all right so we've been navigating through our interface learning about what how like what are the different components of our interfaces all right so first we have to start with our project window all right so the part here you are seeing all right like the folders here are this panel is particularly known as the project panel all right this panel uh in this panel we can create multiple all right we can kill multi as many as folders we can we can add our own 3d models and all those right so just to create your own folder in here in the patch project panel just right click in the panel uh go to this create option and click on a folder all right so i want to create a folder named materials all right where i would be storing my materials right so this is my my material folder right now in the project panel i can even add numerous amount of assets right like if i if i show you um just just wait i'll be adding an audio file in it all right so this is a burden beach file all right i'm going to add this audio file in it just wait for a few seconds and uh the file will be imported it does take some time all right because currently i'm also recording so it took some amount of time but it's usually fast so here i have uh just what i did i just dragged and dropped that particular audio in here all right if you click in here you can even play that audio but i don't want to play it right now so yeah so we learned about our project window now while we develop all right while we develop our own games our own application we face multiple bugs we face multiple errors right don't we we do so where do where can we see those errors where can we look for those errors right so uh unity has provided us something known as the console window all right it's just right here all right us uh like only after the uh project if you don't have this console panel or console window just uh go in this top section name window click on this click on panels and just select that panel that is not available in this in your workspace right so currently it's and empty right currently it's empty i will show you how an error will look like but yeah in here you will get all the errors and warnings and particular debug text in here right so this is our console window now here comes our another window or panel that is the hierarchy panel so what is the hierarchy panel all right see there are multiple objects in this the scene all right don't worry i will make you make sure that you understand what this scene is but currently uh currently there are like two objects that is a one light object another is a main camera object right so hierarchy panel what it does is it lists down all right with the help of hierarchy panel we can just right click and create our another object right i will show you how to create one but hierarchy is basically uh the structuring of like the objects it is a panel where you would be able to see what objects are available uh inside of the scene all right and through the hierarchy panel you can create your objects you can modify them and all those things all right modifying is done by another panel actually i would show you right name after the hierarchy all right so this is what our hierarchy panel does right so we understood what our hierarchy panel does now here comes our inspector panel all right so what is this inspector panel man what is so this inspector panel is basically used for what can i say it is basically used for modifying the components all right it displays the properties of the object all right like if i click on the main camera right so here you can see here multiple multiple uh components here there multiple options are there we can manipulate those of these options and uh like we can manipulate this and make the camera component look our own way all right we can uh edit these components right so inspector panel gives you an inspection of that object right it gives uh it helps you to edit those options inside the object all right now as with so tell us what uh which panels have we looked we have looked into the project panel the console panel the inspector panel and the hierarchy panel now it's our time to look into the scene panel all right see seen the scene panel is nothing but uh a whole different like um it's a it's a workspace all right it's it's a workspace where we can actually uh put our models in right like our 3d objects in there we can put our 3d object into like main camera main camera is inside the scene main camera is inside this uh whole scene right it's in this 3d workspace so scene is the 3d workspace right now after that there is another panel that is this game panel right now what is this game panel see uh this scene is for navigating through all right we can manipulate these objects like like this all right we can i will show you what are these but we can manipulate these we can put our 3d objects in there but game game is the rendering part all right like after our uh like let's say i have made a 2d game for now all right but i uh now i want to test it out i want to play so what i would do is i would play that uh particular game and or in this screen all right in this particular screen or in this particular panel the game will start showing right so yeah now here comes oh another thing uh here you can see three buttons all right uh these are three buttons this one is the play button this one is the pause button this one is the step button right so uh what this play button does is just plays the scene all right that is starts the rendering this is like the pause button it will pause while you are like like rendering it and the step now the statements it will like after you have paused you can click on this step button it will uh like move one by one all right i'll show you those all right i will show you these now here comes another panel this is the asset store panel all right now one thing to note is uh here you can see it has told that they have moved uh like the asset store to uh the web all right and uh i don't know why they did so but actually i prefer that more uh because in my system the unity asset store uh used to lag all right uh instead of unity so i think that was a good idea but uh the main difference already that you would notice as a beginner uh in unity 2019 and 2020 is that uh in 2019 the asset store is already integrated in your like whole uh unity and in 2020 uh the asset store is uh on the web browser all right so you can access it on uh from the web browser all right so we don't need this panel as of now so i will just right click on it and close that all right one more thing i would like to show you is there are multiple layouts available in unity all right just like go to the right of your screen and click on this layout alright there are multiple layouts all right you can try one of these and one of my very favorite all right just just wait for it oh yeah one of my very favorite uh layout is this one why uh because this gives a like more broader view all right this gives a more uh broader view of this scene all right it gives some it gives more free space to work on so i like this one the most uh but for now let's go to the default all right we'll be working on the in the default only as of now so yeah so uh let me save this yeah so we have understood that the very basic interface now let's go and look at the tools all right the tools that we have so first of all we need but before that before looking into the tools we have to understand our game objects all right so see we have uh got into another section that is game objects and what are game objects so see game objects are digital objects all right game objects are those digital objects that we can use digitally all right game objects can be anything alright i mean anything it can be 3d game object or to the game object all right so what our game object basically game objects are virtual objects nothing else right so like uh like an example this main camera it's a game object all right it's it's it's a gaming a game object now this directional light all right this is a game object right so yeah similarly we can create our own game objects like just just uh go to this hierarchy right click in here uh click on this 3d object all right click on this cube right so we have created our own cube right so now here you can see there are multiple anchors right there multiple anchors i will tell you what are these in the top here you can see here is a tool bar right here is a toolbar so what does this toolbar does first first of all first and foremost there is a tool named hand tool this is uh used to like uh grab the screen and navigate through it grab the scene and navigate just just for that now after that after that we have move tool this move tool gives you some certain anchors all right uh where you can hook on all right you can hook uh with those anchors you can move your game object throughout the screen right so that's what it does after that we have a rotate tool like if you want to rotate your object i can i can do that it gives rotational accesses through which i can do that right isn't it like really fun now after that rotate tool there's another tool that is a scale tool it helps us to scale the object scale the object all right like we can i can scale it in any any uh axis scaling it at any axis right after that we have a rectangle tool or wreck tool all right what is this it it just like helps you to resize the object in a rectangular manner nothing else now then we have a universal tool uh i guess this is called uh oh this doesn't have a name actually but i will call it universal tool all right so it is a combination of all the tools we discussed previously all right except the hand tool and if you would see uh i'm able to use the hand tool uh even when i'm like not uh selecting it already like externally selecting it it's automatically getting selected so the basic shortcut for that is sorry to click the uh middle mouse button right so i'm really sorry about that so yeah uh we have created our own cube we learned about game object right we learned about game objects now our uh just just wait i want to like reset all the things now i want uh to play with it right i want to manipulate it i want to manipulate this game object how to do that first of all i can use these uh these several tools these fancy tools available or i can uh go to my like simple methods like uh as i previously told that in the inspector menu inspector menu gives us the properties of the game object so we with the inspector menu we can edit those properties too right we can so how do we do that first of all let's say i want to edit the transforms all right so what are the transforms man what are transforms like see i am moving this right i'm moving this like this i'm i'm able to rotate it also so what is that the things are like moving at a particular direction we can also do the same thing through this like inspector menu like here you can see there are three parameters like first of all see the transform here first of all see the transform here comes the position so that what does what does it does it changes the position like i want to be it at 10 of x axis right so it has got to tend and uh yeah you can simply manipulate your position from this but for now i want it to be in zero right now rotational values all right let's say i i i want uh my cube to be rotated 45 degrees at uh x 90 degrees at uh y and uh let's 45 degrees at z so i rotated my cube right i i did rotated it now one one thing you'd be seeing like let's say you messed up with all these uh parameters now you want to reset it how would you do that just click on this three little dots click on reset as simple as that nothing much all right you can also scale it all right now this is your homework you have to try this scale portion by yourself all right you have to try the scale portion by yourself now here are some other all other parameters too all right now this is a cube mesh filter all right then there's a mesh renderer i want to show you something if i remove this mesh renderer you won't see any sort of mesh all right what are these green lines this green lines are the box collider if i remove it you you would see the very light green right very light green now these other light greens are this this of cube mesh filters but this box collider lines are also getting attached to it now here is the mixed random mission day is basically the mesh of the queue nothing else all right so till now we have learnt manipulating our cube we have learnt uh uh navigate our interfaces all that we have learnt about game objects right so yeah we have learned this much by now now let's talk about materials what are materials see of course you want uh your uh like game objects to be colorful right you want your game objects to be like texturified like they they should have some sort of skin right even humans does have skin why won't a game object that's like that's really bad right so our game objects also wants uh materials like just uh humans we want our skin similarly the game objects also want their skin so the skin is known as materials in this terminology in technical terminology all right so just just uh as you can see i previously created a folder right go to that folder right click click on create find the material i found it in here click on it and let's name it i want to name it red right i want my material to be red now what now what now i want to change the color all right see simply click on this material and here you can see that you uh the properties of those one that material is available in the inspector now after that click on this white box all right this is this uh at the right of albedo click on this all right and select a color let's say let's say i want it uh to be um red yeah so that's sort of a bit pink also but well that would work for me so now uh man i have like i have edited the color i have put uh put something color in it but why isn't it reflecting in the cube why is it showing on the cube is the cube angry that with the color is the cube angry no it is not of course not so we we have to apply this material in the cube right we have to apply it so how would you do that two simple ways click on this cube one way i'm showing you one way that is click on this cube drag and drop this material inside its inspector voila you got the material now our cube is happy just like us humans the cube has also got its skin another way is just drag drag this and put drop it in the scene view without also using the inspector this can also be done right so our cube is now really happy because we have provided him a skill right voila so now we learned about materials now one more thing if you want to add textures it is really easy click on this like albedo here you are seeing a blank box and after that there's a zero sort of click on this all right now let's say what what sort of material i want i want all right let's see um oh no no not not this not this of course not this uh let's say this yeah this this looks something like a bit good right so yeah we give our cube a texture also see now our cube is more than happy so we successfully made our cube happy and also learnt about materials and texturing find those all right now how to create a scene all right see what are scenes scenes are nothing but different environments right they are different environment like this is a sample scene i want to name it let's say i want to name it where where is the name yeah i want to name it a main scene all right mean scene this is the scene i want to name right this is my main scene so this is the scene all right and where did the material go that's weird first i guess this is the bug of unity but this is really weird or i guess it happened because i didn't saved it i'm not sure but yeah but we managed to get it back now scene is a separate environment so that we can create another scene all right i would also like uh while uh getting into euphoria i will be i will also be showing how to navigate through different scenes all right so don't worry about anything how to navigate and all those things so i just want i just have to click right then create then here's always the scene man oh yeah got this scene now and create a new scene that is test scene see i got another scene with uh main camera and directional light by default all right but currently i want to be in the main scene right so we successfully created our cube and also managed to make it happy by giving it a skin now let's learn a bit a bit about project structure right what is the project structure what is it a project structure is a way of structuring your project all right nothing else see why uh see this is not something like many people teaches you all right this this or this thing you gain but you gain by experience but today i'll be teaching you all right see maintaining your project on it maintaining a project is really important like when i was a beginner even uh i remember when i was a beginner i used to like make my whole project very much cluttered right i used to make everything cluttered out and that actually caused a real problem for me like later on all right because managing those were really like hectic so with after like after working with unity i learned that uh it is really important to manage your project so how do i manage i create separate folders all right for separate type of file or like for materials like for skins i created this particular uh folder named materials all right to add some sort of assets all right some sort of assets i would name another folder name assets where i'll be storing my assets like 3d model like 3d images right like to store audio i'd be creating another folder that is audio folder all right so i create separate types of folders all right for separate types of files right so similarly throughout this video would be saying how am i creating folder for each type of file right so i recommend to stay along with the video till the end right so till now we have learned uh about navigating through our interface about game objects about manipulating those all right uh about uh materials all right like the skins then we have learned about the scenes what are scenes right uh then we have learned about our project structure isn't it cool like within a half an hour we have done so much so yeah so we learned about structuring our project all right now some more parts are left like creating our own c sharp script all right then we will be learning to modify our own components then prefabs uh then physics and collision then we'll be learning about audio and then at last we'll wrap up this module after designing our interfaces all right so yeah let's let's do it let's get the energy back and let's do it so to to keep the scripts all right to keep the scripts uh what i want to do i want to create another folder name scripts folder or that it would be containing all the scripts in here just then right click click click shisha all right i want to name it a test script all right now as you can see in here there's a like buffering going on this buffering is basically the is getting compiled right so just wait for a few seconds and it would be done actually my system like my system has got really slow and because of that it's taking a lot of time but i guess we can manage with that right so yeah voila our test script is created now i'll be using my own text editor all right i'm dragging and dropping it into the one um just wait just just uh just wait uh so yeah now let me drag and drop it in here all right now see don't look into these windows all right um i have set up my sublime text for competitive programming so don't look into this but let's understand what are these all right see if uh don't worry i'll be explaining all these things all right what is like public class what is like what is void then uh what is using so i'd be under make you understand all these things all right if you don't understand something in here don't worry i am there for you all right i'm your instructor i'm always there for you if you have any doubt join our community all right join our community ask your doubts in there you would i promise you would get instant doubt support in there all right so yeah as you can see in here all right just wait let me uh make the font a bit bigger yeah so first of all we are including all these system packages like unity packages all right these are packages we are including now we have created a class of transcript all that that is inheriting another class all right that is monobehaviour class all right there's the monobehaviour class now inside that mono behavior class c remember this monobehaviour class consists of these functions all right so it is important to inherit this monobehaviour class now if you don't understand what inheritance is don't worry i am there now this is uh [Music] with the void uh start function there's the update function what happens in start is so the first time all right the first time i'm playing my unity like playing uh the particular scene all right it will show at first like in the first frame it will do some function that i will define all right and what the update does is what it does it basically updates uh every frame like it will do that function it will do that particular function in each and every frame all right and it will be called once like if if the frame is one the update function will be called once the frame is two again one so yeah so it in every frame this update function is called once now let's let's try it out right try it out so to uh print something i'll try to print something that is to print something in like unity or like in the console we do debug.log and let's name it start function right and also remember to put the semicolon i all i sometimes forget and this gives us all right so it's compiling the script alright just just wait for it all right it will it will compile the script and then we are good to go i will also show you how to execute a script all right um just just do it ah yeah we are good to go right so yeah now let's play all right how to play click on this play button all right just wait this would take some time all right all right it is telling us to hold on and we will hold on like here it is really good it notifies us everything so yeah as you can see we have got into our games and started playing it let's go to the console oh my god why isn't it printing have i have i done something wrong like have i coded something wrong let's check the script again no nothing is wrong in here i guess everything is okay yeah it looks good to me but why didn't it actually work let me show you so i got out of my play screen all right go to the scene yeah see the script is in here all right it is in here in the project but we haven't executed it right we haven't executed it so how to execute pick an object all right i want this cube object then just drag and drop the script all right drag and drop in it there's another option alright that is click on add component all right and type the script name all right like test script so here you got the test script right so similarly there are two ways to add on you can also drag and drop in here also all right that's another option now another got added here but i don't want it so i will remove it all right so let's play it now let's let's try playing it now just wait hold on our unity is telling us to hold on it is entering the play mode so now let's see what has happened in our console cool now you can see in the console there's something written it is written start function that's what we wrote in the debug.log right that's what we wrote so what happens the start function walk works in first frame right now this is the update function all right now we want to check the update function right just wait try it so yeah so i have saved it it will take some time to compile it let it do its compilation we won't bother him all right unit is good he does everything for us all right so let's uh let's hold on let's just do it it will take some time oh cool so it got like compiled and let's play it let's see what happens just wait uh now let's are you ready to see the console window are you guys ready let's see it oh my god what's it doing it's continuously like putting giving the function update function like each frame it is doing this on each frame see it continuously updates the function in each frame so actually i think you got a very basic idea of what this this function is doing right i guess you got that very basic idea so for now uh this is the like you learned how to uh basically learn unity sorry i'm not the only teaching unity basically you learned how to create your own script all right and understood the functions in there all right now there's another section known as modifying components we already learned how to modify components all right so yeah now here comes prefabs what are prefabs prefabs you can say these are the collections all right these are collection let me create another folder i would also show you how to create a prefab so what is the prefab man a prefab basically helps us to create a collection right like it is sort of a storage particular thing right see uh let's say right now let's let's take a scenario all right let's take a scenario you are developing a game all right so that's a a first person shooter game all right you have implemented it uh on one scene all right now you have created your own first level now you want to go to a second level and you want that same particular fps player alright same particular fps player in this in another scene that you are going to create that is in another level what you would do you have uh one way all right one way is to like create like assemble all the components that you made previously again all right and that would consume your time all right and of course that isn't a good thing another way is to create a prefab so prefab creates an another like a package of that particular object right it's it's a package of that particular object it helps to create uh like a package like okay if i our cube has certain properties all right i need the same cube one that's next scene right i need the same cue on the next scene then one way is to recreate it another way is to create a prefab and just use that now how to create a prefab click on this wallet click on this cube drag it and bring it in this project section put it in there and voila your prefab is created now here you can see the cube has turned like this this thing is turned blue this is the indication that it is a prefab now let's create another scene and let's see does it does uh oh i i have already one does this work on this on this another scene i want to save it right i definitely want to save it uh so yeah let's go to this uh where is it prefab all right now let's drag and drop it in here wow i got it in here just to reset the transform yeah i got it in here let's let's try playing it let's say the functionality works or not just wait for a few seconds to run um it is doing its job uh so yeah now let's look at in the console wow the same thing that was working on the previous scene is the same thing is working in here so yeah one more thing i forgot to tell you i just okay it just came up in my mind just let me like go back to my main scene uh wait let me lower down the desktop volume yeah so now so now what all right so what now it's uh what we have to do uh see now i would be telling you something really important all right i forgot to tell you that previously and object all right an object can have its child object all right like you can branch the objects like if i if i want to want the cube to be a child of main camera i would just click on the cube drag and drop it in here and see my cube is now the child of the main camera right and main camera is the parent similarly i can also create empty empty objects that is click on create and create empty all right i won't change its name i will just reset its transform and put this cube underneath of that game object all right now i can make multiple childs of this cube all right i just control d all right to duplicate control d ah so yeah again ctrl d again ctrl d so similarly like this i i i am able to like oh wait uh yeah i'm able to create multiple child objects inside another empty game object right so you can do those things similarly nothing much different right so till now we have learnt a lot of things all right we have learned also modifying our own components we have learnt about prefabs now three more important sections are left that is physics and collision all right physics and collision another one is audio how to work with audio files all right audio is really simple all right then we have the last but not the least designing our interfaces all right and at last of that i would also be showing you another thing all right ah so yeah let's move on with physics and collision what is a collision man what is it see collision is nothing all right collision is nothing but the hit or like the hit of an object for on another object all right it is flexi these two objects are colliding with each other all right these two objects are colliding collision is basically the like interfering of two object with one another right so that's what collision is all right now if i if i had to say you all right game like this this whole unity engine is a replica of our real world physics are we showing you how all right just just wait all right first of all i will be deleting all those other game objects just wait uh first i need to uh set up my environment to show you how right uh oh no no why let me let the y be 0.4 right and the vb for one b four right so this is how it is all right now let's take another 3d object that is a spear we would call it a ball right it is a ball for uh for us it is a ball right just wait so so yeah this is a ball right now i want to implement a real world physics so as of now all right let me let me first de-attach the script right now or else it would be working continuously i don't want the script to be interfere to interfere alright just wait oh and let me apply to a brief habit so our 3d uh our script has been removed all right like here one thing you can see of it here's the shadow that's because of the lightning all right you can play with the light lighting later all right so let's play it now so in real world what happens in real world if we have a plane and if we throw a ball from the from the top it will fall down right it will fall down and bounce let's check that it happens in here or not just wait keep patience all right keep patience oh my god why isn't it falling it should fall right it should because i i recently told that unit engine is a replica of our real world physics but you have to implement those physics right you have to implement those how how would we implement those unity is really really caring about us and what unity developers did they already created those physics objects for us those physics components that will help us replicate the real world situations all right now how do we do that so see we are first of all we are in the game scene all right we are in the game scene i'd be editing this whole thing while being in the game scene all right so just put it aside in here all right because we need the view only nothing else one more thing i would like to say that after i get out of the this game view object will get resetted because though won't be saved uh during the game view remember that all right so now i want this ball to fall due to gravity all right i want this ball to fall how do i do that so far there click on this add component all right there's something known as a rigid body all right click on this rigid body and see the effect cool isn't it like after i added this rigid body it's the ball started falling now it isn't bouncing right see to make it bounce there's another sort of physics all right we need to create a physics material all those things but we won't be doing that in here but as of now you understood that uh we were able to add the gravity like we would be able to add make the ball uh physical like we are we are able to add physics to the ball right now in the rigid body component you can uh play with the values in here all right like the mass value the drag the angular drag you can like click on this huge gravity let me let me show you one thing if i click on this uh see it isn't falling because it is not using gravity so see cool isn't it great now here's another option collision detection all right uh before explaining this collision detection thing right i would be telling you how this collision is happening how is it is there any sort of magic before that i need to replicate this object already because i don't want the ball to fall all right i literally don't want it to fall so here you can see here some options box collider all right this box colliders are basically provides the collision platforms all right it provides a platform like uh like in the ground we are moving all right we aren't falling like we are fall we aren't falling through that uh whole road right went like penetrating that road and going to the bottom of that road are like does that does that thing happened doesn't right similarly in terms of games we could say there are some platforms right those platform has some colliders all right those are book box collider so here if i click on this box color you can see all right you you just saw that the ball got it through that because there aren't any collision like there aren't any collision happening to stop that ball right in there because we have disabled the uh box collider right so box collider actually helps us to uh like this colliders there are multiple types of colliders actually box color is one of which type like this pier collider all right so box collider is basically helps us to pro uh to provide collision to that particular platform right just just wait uh so yeah so uh this is how everything is happening right cool isn't it so we have understood about colliders one more thing there like there are many multiple you can have multiple uneven shapes right like like a terrain all right like a road there like a road is uneven all right a desert it is uneven it doesn't have a flat surface it is totally uneven there are highs and lows right so for that type of like if you want uh want to provide collider to that platform we can't use box collider in there right because then it will be totally plain we want we don't we won't be able to use it so there's another collider named mesh collider all right it is in the component only alright i want you to try that collider out all right by yourself just close to have component click on mesh collider and you can use it now the problem with mesh collider is uh it is a a bit more cpu intensive all right then this box collider or spear collider or any other collider the reason being there is it uh does more calculations than box and spear collider because uh the mesh collider what it does it it gets the accurate shape based on that particular terrain or the particular model right isn't it so so what uh they gave that particular shape so it does more calculation now in the rigid body i was going to show you something known as collision detection what is that the multiple option all right we'll be looking into two main of these discrete and continuous now there's a huge difference between those all right see what is the difference discrete is performant all right discrete uh gives a lot of performance it is like in performance wise it is better than continuous all right but the prob the problem there is it does like it doesn't do accurate calculations it doesn't like it can if you if you throw it from a really high like at a really high position it will penetrate through this whole um collider all right through this whole platform but continuous continuous is is better than discrete already because uh with the use of continuous there are very less chances that it will penetrate through because it does more calculation than discrete but the problem is continuous is cpu intensive so that's the difference major differences all right so we also learned about the very basic physics right we learned about the very basic physics of unity now it's our time it's our time to learn uh this audio right so for that first of all to play that audio all right first of all to play that audio oh my god i did i deleted everything uh so yeah all right i would be getting those objects back because i did that with our whole environment now i want to create an audio object how do i do that go to this uh click on this go to this thing all right click on audio source all right so we created a simple audio source right we created it now there are some particular options in there all right click on this select the audio and uh let's let's play it all right just wait this is a uh this audio is the birds and beach audio all right like bird chirping are in the big uh beach all that or do you think are you able to listen it i am sure that you are able to listen so the audio is playing right so uh the audio is playing in here right the audio is playing that's cool isn't it so we implemented our own audio source all right now uh soon in our pre uh in our future lectures all right we'll also be learning how to control our audio sources through scripts alright but for now if we look into these like uh properties there's a uh option for mute now i won't be actually explaining all the things in here you have to explore it by yourself like uh you can explore this bypass effects bypass listener effects bypass reverb zones all right now these this loop is basically uh will loop the audio all right because without loop initiated all right without click checked on loop uh what will happen your audio will only play once but with loop it will play all the time all right now here's another option that is play on awake all right uh play play on awake what it does is it like when you just play your game all right it will start the audio at that time only if i if i uh like remove it and then start playing it just wait so uh it has started playing but you uh won't be seeing anything like you won't be hearing anything because player awake is disabled now to play that audio i need to add some trigger or some sort of script to play that audio all right so play when on away what it does it basically uh plays the audio whenever you start now here's another thing that is volume all right now this is the volume it uh varies from zero to one all right now there are multiple other uh audio editing uh feature you can check them out by yourself all right you can do some research on them all right so till now we have als we have completed most of our topics all right we have completed most of our topics now now the last but not the least creating our own user interfaces how do we do that all right see i'd be creating a very simple user interface all right nothing too complicated already nothing to like nothing of very complicated user interface a very simple one just to show you all that how to create one all right but we'll be creating uh beautiful interfaces during uh like during the making of our uh course like the uh projects all right so just let me delete this particular thing because i don't need it now all right so let's save it now how to design our own interfaces all right let me dock this game view in here and uh for that first of all i want to go to my wide view right because it helps me a lot all right so first of all click on this 2d option here you can see alright this will give you a 2d view alright this would give you a 2d view so i got the 2d view all right i would like to click on here this this y thing the reason because this will give you a grid and it's really helpful now uh first of all we have to uh right click and click on the ui option then create a canvas all right what is this canvas right what is this canvas basically this canvas is basically the like uh the basic framework all right the basic wireframe of the or you could say the frame for handling the user interfaces right so click on this canvas alright here are some options what i would like you to do is uh first of all uh click on random mode all right keep its screen space overlay as of now there are multiple options and definitely will be looking forward to uh these in our future lectures all right and this world space is going to be really useful during the like during our making of those projects right now here are some options all right now go to this canvas scaler thing all right now ui scale mode constant pixel size do to scale with screen size all right and give it a default resolution for me as of now uh this 800 by 600 is okay and leave all those parameters same all right for now this is what i need now our canvas is ready right our canvas is ready now i want to like get the display of my laptop in here like the resolution of my laptop in here okay uh very well sorry my mouse is like sometimes creating the problem of navigation like the mouse button middle mouse button so as we've created our canvas all right now we need to uh create a background image for it so how do we do that so click on canvas click on ui then there's something known as panel all right click on this panel right see you got a sort of background all right now i need to color the background right uh first of all i name it uh background image right although i haven't imported any image so i will take coloring it all right first of all how to do that uh click on this panel all right uh click on this image section right here from here you can select the image you want all right so already one is selected i don't want to change it click on this color option and here we see that this this thing is transparent how to make it opaque see here's an option known as a also known as alpha so just just click it in here and like make it 255 like make it to full i want a yellowish orange color so this is the color i wanted and i got right so now this is my background i'll be scaring the background a bit how do i do so uh choose the scale tool click on the middle uh option and just scale it right now as we are have created our own background now what we want we want is to create a heading text for it how do we do that how do we so click on ui then i there are two option text and text mesh pro all right i haven't imported text mesh pro although text mesh pro is the better option to go for all right because it pro the quality of the text and text mesh pro is really good alright so i'll be clicking on it all right uh just wait uh so yeah uh i'll be uh importing the uh text message essentials all right it would take some amount of time all right don't worry all right let it uh take the time it want all right all right because that is importing all those assets so it's important for it to be important clearly just wait [Music] yeah it is getting imported uh just it would take some amount of time actually i guess i should have like imported it previously only but uh if i did so you wouldn't have like caught how to do that so here we got our text in here right we got our text in here all right now we want or to edit the text and let's let's let's name something all right let's name it uh our new ui all right i know this is like a very bad name now i want the textile to be like something like h1 right but it's giving a color no no let's leave it let's let's keep it normal only and click on bold right we can even resize it how uh like zoom it in here and you will find these anchors all right do this do this right another thing we want is to center our text so we did that all right so you can uh we also have some other fonts all right uh okay we don't have one oh i sorry i forgot to import that a extra package came with uh text method but no worries uh we don't need that as of now now here you can see here is that a wreck transform option click on alt alright click on alt click on uh so as you can see if you just open it all right and click or not there are multiple options here i want you to click on this top one see our text automatically got and then i want to reposition it and voila we got our text or just wait yeah we got our text to where we want and this is our ui all right our new ui or let's say uh let's name it to learning unity right so this is our new ui isn't it now we want to add uh some buttons right we want to add some buttons how would we do that click on canvas click on ui here is an option known as button and button text mesh pro i would i want you to go for button text mesh pro it's better believe me it's a lot better all right now we can even add some functionalities alright first of all i want to like put a transform to it i wanted to want it to be in center only let's name it as a play button all right let's name it a play button and let's name it play see in future or we today we are learning just how to implement our own ui all right in future in future lectures we will be learning uh like how to navigate through uh uh uh our scenes how to like add functionalities to our button right so for now this is what i want so we created our play button all right even i can change the color all right there are some many things all right like if i if i click on this placed color i want to make it green when it gets pressed right now if i play this if i play this just wait it would take some amount of time because unity takes time all right so uh just just wait it's entering the play mode cool now if i click on this see when i'm clicking or clicking on it it is getting green now if i if i select the highlight color and like make it a blue let's see what happens oh well nothing happened uh let's let's check out the selected color let's make it sort of like yellow wow now oh highlight collect worked finally i i don't know what why it didn't work so when i'm hovering on it it is highlighting the color as blue when i'm pressing it that is the pressed color it is green after it is selected it got pink right so isn't it really cool all right similarly we can add some functionalities alright like there's an option on click all right if i want i can like add some particular function like for now uh let's say i want to disable the text all right so whatever do i would uh drag and drop this text first of all let me show you from a again there is an on click parameter click on this add then take the text in here all right now in here there is written no function click in here go to game object uh click on set active all right and just don't check that button out all right we have we can create another button something like this name it uh active first of all i would name it active sorry deactive deactivate d activate and this one is wait all right i just want to like wait this is going to like activate like activate the whole thing all right just to wait let me drag and drop drag it down in here all right uh cool isn't it now let's let's try this out what happens let's see just wait it would take some amount of time but it will uh it will get done all right so just wait cool now if i want to like deactivate on it i don't want this learning unity i want to hide it click on the activate see it got deactivated but i but i want it back see it came back see i'm making my button do some activities so we also learned how to uh design our own interfaces if you want to add some sort of image you can just click in here ui then raw image all right i i don't know i have any image for this all this oh i do uh let's say i want uh i want this emoji one right i want this one to be in there and i can also resize it um sorry it got resized wrongly i'm in a wrong manner so yeah see isn't this ui looking good actually it isn't looking good but yeah for now it's it's okay it's fine right so we also learned how we learned today we learned a lot of things in unity right so see you in the next lecture thank you so hey folks uh welcome to our first lecture of module three in this module i'm going to introduce you to uh c sharp so without any further ado let's get started so what is c sharp right see c sharp uh first of all one of the most important thing i'm going to tell you right now is pronounce c sharp as c sharp only not c hash like i have seen many people they like uh they don't know that how it is pronounced or they even sarcastically tell that it is c hash guys it's not c it's c sharp right uh so yeah so see c sharp is an object-oriented general purpose programming language all right it was developed by microsoft uh in the early 2000s right uh the development team was led by uh anders hillsborough and it is a part of the dot net framework it can be used to develop different types of uh software's like uh console applications windows applications uh then web applications mobile applications and games and uh so yeah and it is also you being used in arvr development so yeah so c sharp is a multi multi uh like the general purpose program language it can do anything right so yeah this is a very basic introduction to c this is what c sharp is now let's get into the coding part all right so this is a very basic code structure all right so using system name space hello world then class program then static void main then console.writeline then console.read right so don't worry uh the if you are not able to understand what are these don't worry i am there right now i'll be coding this all right and after that i'll be making you understand what is this all right so here is my c sharp compiler right this is my c compiler so i'm going to write using system name space hello world right class uh let's say program public static void mean string args then console dot right line hello viewers sorry then console dot read let's run this program let's see what happens wait it's compiling the program cool now if i click enter the program will be finished so what did just happened man it printed something right it printed something in the console can you see it in here it's it's printing something right it's printing definitely it's printing so let's understand how is this working what are these gibberish right let's understand so by the way congratulations you uh coded your first uh program so let's get back to the notes so yeah first of all let's let's know what a directive is right what is a directive see a directive basically tells our program all right so not the program uh directive basically tells of a compiler what is the compiler compiler compiles the program all right we haven't set up any sort of local compiler because we are using our own online ide for coding all right so directives basically directs our compiler all right it tells our compiler that our program is using this name spaces our program is using this certain name spaces all right so what is the directive right see this using system this this using system is a directive this using system is a directive all right similarly there are others also like system.collections and all those things all right uh like you uh watched in the that uh unity video right in in that unity tutorial that there was uh using unity engine right so yeah there are multiple name spaces sorry multiple directives so yeah this directives basically this using system directive tells us all right this using system directive tells us that our program is using this system name space all right it is telling that to our compiler it is telling to our compiler that hey compiler i am your c program this person created me so i'm using this uh system name space are you okay with that and that compiler replied yes i'm totally okay with that because this uh using system is already pre-defined in my compiler code base right so i am totally okay with that we can run the program so yeah compiler happy our code happy that you are the code are happy right so yeah now as i told you about namespaces right see name spaces now they are basically a collection all right they are collection collection of whom namespaces are collection of whom i just told that namespaces are a collection but collection of whom see name spaces are basically a collection of other code properties you can say or other code structures right or other code elements all right so these code elements can include classes like see recurrently we only created our own namespace this is our hello world namespace it is containing a class right it is containing a class it is containing a program class so we certainly created our own name space right we certainly created our own namespace so yeah now we understood what are namespaces all right what a namespace says is see and uh if i have to repeat namespaces are a collection of code elements all right it is basically a collection of code elements it contains other classes other interfaces other enums other structure a structs all right so name spaces are a collection of those things all right see c sharp our c sharp is a programming language right c sharp has a large amount of code all right c sharp has a large amount of pre-written code that like the team who developed c they already wrote codes for us all right useful codes for us that we are using all right that we are using but can you can you tell that if the programmers if the programmers took all those programs and just put uh put it in only one file or wouldn't it be cluttered up like there are multiple hundreds like hundreds thousands code files wouldn't it be clutter up and now if i had to find one file then wouldn't it be cluttered up so what they did they divided those pre-written code into different namespaces all right see using system is not on is not the only namespace available all right there are many other all right so yeah so our code the like the c sharp the developers who wrote c sharp they they actually divided all those code all right so divided all those code into different uh name spaces all right uh the system namespace all right the system namespace that is available it actually uh contains the code all right codes for methods that allows us to do certain functions all right like if we want to print we can do that so uh i already told that we can actually declare our own namespace we even did we even did uh declared our own namespace all right we can copy this and create our another namespace all right i would show you how to do that and you know uh what are the advantages of using namespaces right see first of all one more thing if you are creating two or three your n numbers of name spaces it is really important for you to name it differently all right the namings should not be same so then if the first name is hello world or you may i mean your first name space name is hello world the second name space name should be hello priyanshu or any other name right or your name so remember that and one of the major things of like helpful things of uh name spaces are name spaces are two different environment you could say all right in namespace one see namespaces basically help us to prevent the conflicts name conflicts like see if we if we if i show you here all right if i if i create if i let's say if i created a same type of variable i know that you won't understand this as of now all right you won't understand this all right i'm pretty sure about that but don't worry all right don't worry i'm going to cover about variables comments and all those things now let's play it let's just play see see it is giving us error you know why it is giving us error it is giving us error the reason is that we are using at the same name the same name all right so in uh in c we can't use the same name all right we can't use so it's really important to give different names but but but if i had to show you all right we can declare we can give the same names in second namespace all that like this is one of our namespace right so namespace hello priyanshu all right this is uh another this is another instance i'm creating so class program can you see i am giving the same name in here right the same name in here now now let's let's try running it man let's try running it see it didn't returned us any sort of error it didn't why because namespaces you can think of namespaces are different environments actually they have the uh in there if namespace one has program and namespace2 has program the same names then it won't conflict it won't create any problem so yeah i hope you understand right i hope you understood this thing now uh we looked into the example right we looked into the example oh yeah one more thing i forgot to tell you that is that this this main method all right see this main method the main method you could see this is the starting point all right this is the starting point of our program the main method is basically the starting point of a program it's where our program starts all right if i if i give the same thing all right let me copy this and put it in here if i give the same thing in here where it didn't got printed or why is it happening wait copy paste all right it isn't pasting i don't know oh oh oh i got to know i didn't ended the program right sorry i'm really sorry about that i was like oh god now let's let's try running this and i'm sure you would get error see it is giving as error see it is writing program a dot out has more than one entry point defined do you know what it means it means that there are two entry points and main method is the entry point so in a program in a particular file there should be only one method alright there should be only one main method because it is the starting point of our program right because if we have if we give two main methods in diff two separate uh name spaces then our compiler will be like hey man which which main method should i go for i'm confused and because of that and because of that you you are very rude to me you gave me two main method i am really angry about that so i will what i will give you i will give you error and you won't be able to run your program so our compiler will tell this so to make our compiler happy to make our compiler work fine means to make our program work fine we need to uh provide only one main method in our but in our any in any of our namespace all right now no no no yeah oh okay okay i also forgot to tell you about these this too right my bad my bad so what see you have already seen that what this console.writeline does this console.writeline basically prints all right this console.writeline prints a statement but what what this console.read read does all right i have written it in here see the console.read all right it basically waits for a key press from the user before code seeing the console execution like if i execute it all right if i if i let's say execute i will show you all right i will show you now if i let's say i try doing something like editing this program can you see you can't edit the source for when programming is running you can you can't edit the source code when program is running means our program is running it hasn't ended if i press enter see our program ended now if i if i had to comment this download i know you don't know about comments don't worry or let's say i remove this i'll remove this particular code line all right if i remove this see i didn't even need to press enter it just uh exited so that's what our console.read does all right so let's let's get uh get an idea about our main method all right so what is it so see the main method in here the main method is basically the starting point or at the starting point of any of any of our uh c sharp program all right yeah so our the main method the main method in here the main method here is our entry point or the starting point of our c program right uh whenever whenever we run a program all right why did why did when we saw the example where we uh like added another added another public static void mean in in our second namespace why didn't it ran it didn't ran because there should be only one entry point of the program i already told you what would the compiler will feel if you give two entry points right the compiler will be angry it will be an insult for him i guess so so yeah there should only be one entry point all right one main method and also one thing that these entry points are called first all right than any other methods like if you define any other methods they won't be called first the first thing that will be called is this main method all right i hope you understand so yeah there's another parameter this string args all right if you don't know what a string is man don't worry i am there now i am there for you i am there for you to make you understand it is i i will make you understand this uh why what is this string args all right what is this string guy this is an array all right this is a collection it can take a collection of strings all right it can takes a collection of string if if you're not able to understand what is this don't worry next lecture is there all right next lecture is there for you after that lecture you will understand what it is what it does all right and i will recapitulate or recapture this particular portion in that don't worry so basically it can take this the string method can take sorry the string argument can take multiple multiple amounts of string data right and i already told you what this console.writeline is and what this console.read is all right so for the for today list for this lecture our our uh first first lecture is completed all right so our module three first lecture is done all right see ya bye bye see you in the next lecture thank you so hey folks uh this is model 3.2 and in this module we are going to learn about comments variables data types and type casting all right and in our previous module that is 3.1 we learned about uh c sharp we learned the basic structure of c sharp or all the very basics of means what is that using a system what is uh like we learned a lot of things all right what is console.writeline right so in this module we are going to learn about uh comments then we are going to move on to variables then data types and last but not the least and one of the important concept that is typecasting all right so without any further ado let's get started so what are comments alright see comments are basically uh some sort of statement or you could say some sort of keywords or something like that all right it has some sort of specific lines that is ignored all right that is ignored by the compiler all right you already know what a compiler is a compiler is uh is a tool that converts the code to a binary form right that that is or you can say machine understandable code right why it does that it does that because uh machines cannot understand english all right it can't understand our words machines can only understand binaries that is zero and one all right so yeah uh so what comments does is comment uh the comments basically all right these comments are basically ignored by the compiler they they won't run that particular line all right they they will just ignore that that yeah it is a comment all right why should we run that it's a you it's a useless thing all right for a compiler for a compiler it is a useless thing they won't run it because uh nothing will come out of that right so a comment is basically uh a comment is basically uh some some sort of lines all right some sort of specific lines that are ignored by the compiler all right and uh how comments are useful all right how comments are useful see comments are useful in a in a way right it is uh useful see uh as a programmer all right we have to uh make our code understandable all right uh because let's say i'm working on some project right now all right i'm working on some project and in that project all right uh the code is of thousand lines or two thousand lines or let's say even uh hundred two hundred lines all right now uh the code is being passed to another developer he has to work on it all right without any proper documentation or comments all right or we can't uh the the coder all right the new developer can't understand what that program is doing all right we have to like put a lot of time to understand the whole code but we can make that thing easier right we can make that thing very simpler we can comment all right we can comment the lines we can comment the lines right we can means we can uh sort of create small all right small documents or you could say small small lines or small paragraphs spot for that particular code like let's say uh currently we are developing uh uh ar app and in there we have to rotate all right we have to rotate that 3d model right we have to rotate that 3d model so i have written some code for that and in the top of that all right in the top of that code what i did i wrote a comment all right i wrote a comment that this particular code right this particular code is rotating the 3d game object all right it is it is rotating the object all right so if i'm passing the code to another developer then he won't have any problem understanding the code all right he won't have any problem so that's why comments are useful all right now let's let's try this out and also uh there are actually two types of comments all right single line comment and multi-line comment so what is a single line all right single line comments works for only single lines all right like it if the line is one then it will be within line one only or it will uh if you are not understanding that don't worry you are going to do the practical all right so single line comments are basically uh they stay in one line already all right if you if you go to the next line that comment won't work all right that comment won't extend actually but this is not the case of with multi-line comment all right multi-line comment can help us in documenting also so multi-line comments uh starts from a particular point or let's say we are starting that multi-line comment from line number three all right and we are writing some multi lines all right we are writing some text within that comment all right in separate separate lines like you can see right in here all right right like you can see right in here we have taken three lines to write some content and in the in the fifth line all right we are ending it in the fifth line we are ending it so that's how we start a single uh multi-line comment all right so to start a single line comment we have to give uh double forward slash all right and to write a multi-line comment all right there are two things a starting point and an ending point all right the starting point is like forward slash star it is the start of the comment and to end that comment what we have to do is start backward slash all right i hope you understand right so let's try this thing out right before going to variables let's try this thing out all right so uh this is our code all right so first of all let's write some sort of code alright let's write console dot right line uh comments all right so this is our code right now let's try to run it let's run uh run this program see it is printing comments right let's let's uh try to give the single line comment notation all right see uh after i have given to forward slasher you can see the whole line has gone brown what does this indicate this indicates that this is a commented line all right this is a commenting commented line although the color will uh will be different in your editor if you are using some other kind of editor all right because this is the theme of it but don't worry about the color but it is highlighted all right when it is highlighted you are you will understand that your code is committed commented so let's run run it all right let's run it see it is not printing anything because it is not reading the line the compiler is just ignoring this particular line all right now let's try out something uh another thing can we add another line of code in the same same single line comment can we so let's try it out why not write it try it out right let's try it out and see so uh line two all right so let's try it out let's see that the single line comment is also ignoring the next one or not oh no it is not ignoring the next line okay do you know what what is the reason the reason it it works for only one line all right if if we give another set of uh forward slashes uh in line to comment means in the console.writeline line two then again it would perform its function all right but it is also like it's it is the task is also tedious to uh give every time uh the double slashes right double forward slashes so there's another thing all right let's say we want to give uh let's say we want to uh write multi-line comment all right or you could say we want to write multi-line things right so first of all let's give console.writeline comments all right console dot right line line two all right uh line two again uh console dot right line line 3 all right so let's try it out all right let's try it out let's run it see uh the code is running but we don't want the code to run we want to comment it all right we want the compiler to ignore it so how would we do that all right so simply give forward slash and star all right see uh as you can see here just as i have gave as soon as i uh gave this comment uh comment notation multiline comment uh starting point all right you can see it has highlighted all right or made the colors brown from where it started all right uh now we have to end it how would we do that so it's it's again as simple as that just start backward slash all right and you can see the commented portion is only brown right let's run it see the compiler is ignoring the codes it is as simple as that so i hope you understood what are comments all right comments are basically uh some set of lines all right that are ignored by the compiler that's it all right so now as we have understood about comments let's uh let's go for variables all right see variables are you can uh see variables are used to store some value all right variables in a programming language are used to store some value right so to see i won't be using any technical terms to uh make you understand about variables all right uh i would be using layman's term all right or you can say the simple term to uh make you understand about variables all right so first of all first of all think the variable as some sort of a container all right a container that can store something all right let's say uh uh let's take a common container all right let's say let's say a water bottle all right take a take and water bottle all right take a water bottle it is a variable all right for now think your variable as a water bottle all right and you are storing all right something in it all right what thing what is that thing that you are storing in that water bottle it is all right it is a liquid all right in a water bottle you will store some some kind of liquid doesn't matter what kind of liquid it is all right uh it can be a orange juice or a chocolate milkshake or a simple water right or it is a liquid all right doesn't matter what what liquid it is but it is a liquid right in the water bottle you are storing some kind of liquid all right and what liquid are you storing all right what is the liquid means is it water is it an orange juice or is it a chocolate milkshake so i want to store a chocolate milkshake in the water bottle right or even a simple water i can store water in the water bottle so you can you can imagine all right you can you can interpret this uh in technical terms how see the water bottle is acting like a variable or you can say a container because variables are containers variables are meant to store some value right variables are meant to store some value all right so variables are container and in our example a variable is our water bottle okay water bottle is our variable all right and the and we are storing a liquid right all right we are storing some sort of liquid in here the liquid is the type all that liquid is the type of the data we are storing all right see water comes in the type of liquid right we all know that chocolate milkshake also comes under the type liquid because it is liquid of course then orange juice also comes under the type of liquid right so we are storing some kind of liquid so that is a type or you can also say data type right we can also say data type right it is the data type right so water bottle is our variable uh liquid is our data type and and the type of liquid you are storing all right the type of liquid you are storing that is uh water or let's say chocolate milkshake that is the data all right that is the data we are storing in our variable all right or you can say in our water bottle so we are taking our water bottle all right we are taking some sort of liquid all right some sort of liquid is the uh chocolate milkshake i am storing my chocolate milkshake in the water bottle all right and the type of the chocolate milkshake is liquid all right so i hope you understand so variables are basically acts like as containers they are containers but in computer programming all right they are containers in computer programming right so let's uh to make you unmake make it more understandable let me show you all right see this won't execute of course this will give you error but let me tell you all right so this is the type all right liquid is the type water bottle water bottle right water bottle is our container all right water bottle is our container and the data we are storing in it all right the data we are storing in is is chocolate milkshake right so yeah here you can see this liquid is the data type all right this liquid is the type this water bottle is the container and this choco milkshake all right is our data this choco milkshake is our data all right and this is how right this is how we initialize all right or create a variable in our c programming all right this is how we create variable in many other programming languages too like java c plus plus so let's uh write a comment for it all right that is data type data type then we have to give the variable name right variable name then we have to initialize the data to it so this is how it works right or you can say if i remove this data only let's say type variable equals data as simple as that nothing too complicated all right so we are storing chocolate milkshake in our water bottle all right and what type of chocolate milkshake it is it is a liquid right it is a liquid so that's it right this is what variable is variable is a container nothing else so i i already show you how to de like what is the way of declaring a container right now let's try it out all right let's let's try uh actually initializing a variable right let's try out initializing a variable in in computing terms alright not and layman's term so it's simple first we have to give the type or you can say data type then we have to write the name of the variable all right let's say i want to store a number all right then we have to use the equals operator also known as assignment operator all right and we have to assign all right we have to put some sort of data in our case in this case the data will be number so i am trying going to put 12 in here all right and let's say it works or not so i'm going what i'm going to do is i'm going to print it out right i am simply going to print this thing out let's see what happens yeah so it has printed our number that we stored in a variable right so we created a variable that is storing the value right so that's great it's a good start actually so we learned what is a variable all right we learned what is a variable how to create a variable one more thing i would like to say is now you you many of you might have a question that we are creating a variable right like uh where do we store our water bottle all right we can we store our water bottle in our backpack all right or in in some place at our house right that's right right so where do we store this variable all right where this variable gets stored see uh in our systems we have random access memory all right that is ram all right and uh this some sort of all right when we create a variable some sort of memory is allocated alright what memory like how much memory is allocated in the ram we will see in the latest sections we'll learn about data type all right but it it allocates all right or you can say makes some space for the variables to store in in the ram so our variables and values are stored in the ram all right so i hope you understand all right i hope you understand the concept of variable all right if you are confused in some point you can comment it down all right so uh now it is there's a dialogue that with great power comes great responsibility right similarly with variables there also comes rules all right and we have to maintain those rules the very first rule all right the very first rule is that a variable name in shisha can only contain numbers uh letters numbers or underscores all right what that means is all right we can't create a variable all right uh let me let me show you actually in dollar num equals 12 or right let's uh try to print it out and you will see what happens all right see it is giving us an error that is unexpected character because the reason is c sharp doesn't allows a variable to have dollar in in its variable naming all right these are called naming conventions but we can have underscores all right we already have letters right we already have letter we can have underscore all right we can have underscore two all right so yeah of course we can also have numbers now here comes another rule regarding it all right here comes another rule regarding it all right so variable name all right variable name can't start with a number see here it is written that we cannot start a variable name with a number that is it we cannot write a variable name as three abc or two name like that all right let's try it out and see all right let's try it out and see if that works or not right so two num let's try it out see it is uh giving us an error that is unexpected symbol but but we can have uh numbers in between all right we can have numbers in between of variable names all right like n to um i know it's it's weird but we can have like this we can have numbers like this all right similarly we can also add numbers to the end of the variable all right we can also put numbers to the end of the variable see it is working perfectly fine right so we learned about two rules that uh we can only add letters numbers and under underscores during any uh naming convention already during the naming of any variable and also a variable can't start with a number all right although it can have all right it can have number in between the name of the variable or at the end of the variable right uh so the next rule all right the next rule we have is that we cannot use a reserved keyword we cannot use a reserved keyword as a variable name because they already have their own meanings and purposes to fulfill right now what does this mean see there are multiple keywords all right or you can say reserved keywords in uh in our c program just like we saw previously like using all right using system they are reserved keywords all right using is a deserved keyword class is a reserved keyword all right int alright in is a reserved keyword if is a reserved keyword all right console it is a reserved keyword so we cannot use any sort of reserved keyword during a variable naming convention right so let's try it out all right let's uh let's give it a variable name as if all right and just let's try it out what happens let's see what happens wow it has given some errors right it is giving unexpected symbol equals then um unexpected symbol f it would it will give because this is not the syntax of f right that's why it is giving the error uh unexpected symbol equals all right so yeah so you uh you learned that we cannot use any sort of uh reserved keywords as variable names all right similarly uh another thing is variable names are case sensitive all right what does this mean see uh it means that if you write a variable like this all right let's say uh if you write a variable like this name equals priyanshu alright see uh this is a string data type all right i would uh tell you what is this but don't worry for now i'm just showing an example and uh let's try to print it out all right so let's try to print it out and let's see what happens right so you can see that it has printed my name right but let's say if i write the name in capital letters all in caps all right all in caps can you can you uh can can you tell that will it uh execute the program execute in the sense of course it will execute but will it give any sort of error or just print priyanshu as it is written right now all right so will it just take your time alright just take a few seconds and think about it all right think about it will it alright pause the video and think about it so let's let's run it now all right see it is giving us an error it is giving us us an error why because there is no variable defined as in a me that is capital letters n a m e there's a variable defined as n a m e as small letters all right this variable is in small letters and we wrote it in capital letters so both of them are totally different all right both of them are totally different so uh always remember that the variable names that is uh the type or you could say not exactly the type uh just check that if the variable name is in caps or in small letters already because these are uh case sensitives all right these variables are case sensitives all right so we can't have like if we write a name in small letters and we are trying to print that name in capital letters means in capital letters is means that we are uh trying to write that name variable in the console.writeline in capital letters it won't execute because it would uh then it would search for another set of variable alright it would search for another variable whose whose text is in a capital letter and is written name all right so i hope you understand that we can't have uh like variables means we can have variables but uh they are case sensitive all right like uh because the see in this example this first name all right this first name you can see that the first is written in a small little the n is written in cap capital letters and ame is written in small letters but in in another is in another uh text it is uh the f is caps but but the other letters are in a small letter all right are in small so this this name and this name are not same all right both are totally different all right now as we have learnt about variable its rules all right now it's our time to get into the data types all right see it is a very important concept all right data types is a very important concept so uh try to understand it all right if you are not able to understand something all right you can comment it down and also i would suggest re-watching this particular portion all right re-watching the particular portion you i have not understood then also you have you haven't understood you can comment it down and i would uh surely uh like to help you all right so yeah data types right see uh i already told you about an example right previously the water bottle example that the liquid is the data type or you can see the type of uh the value right similarly data types are also the same thing they they specify the type of a variable already specify the type of the variable all right the type of value it can store right so the very first data type we have is in all right so basically the int is basically a short for integer all right uh and it has a range all right it has a range of minus 2 1 4 7 4 8 3 6 4 8 2. two one four seven four eight three six four seven all right what this means that it has a range of this to this all right it has a range of this to this if we exceed that value all right let's say if i write 2 1 4 7 4 8 3 6 4 7 then it would return a error all right let's try it out all right let's copy this value first all right um let's copy this value first and uh let's try that in our code editor all right so um yeah int val equals all right so now let's try to print it out console.writeline val all right let's run run the program and see it is printing right it is printing the exact value but but for now let's change it to two one four seven four eight three six four eight can you tell me will it print or will it like give us some error pause the video and think about it all right think about it and just uh tell me that will it print the value all right just pause the video and think about it so let's run the program and let's see my god it is giving us some sort of error why it is giving that error because the range is exceeded all right means we have exceeded the range of integer like here you have seen that the max means the negative range is 2147 483 648 right and the positive range is up to 2147 483 647 but in there we wrote 2 1 4 7 4 8 3 6 4 8 so it is having a plus one value all right it is exceeding the range that's why it is giving error so ranges basically tells us that how much value all right how much value the a particular data type can store all right and we also learned how to uh use integer as that is end as an variable right so another is long all right it is you can say it is a big brother of int alright uh it also store integer value all right that is means non-decimal values you could say or you can also say integer values all right so it has a more higher range all right this long all right that's long has a more higher range than in all right so when you need more values to store all right when you need more values to store that is higher range of values to store then you should go for long all right like let's try out the same example right we like here we see that we put some uh using int it exceeded it uh its range right because the range was up to two one four seven four eight three six four eight right but let's try the same thing out with long will it exceed let's see no it won't it won't exceed do you know the reason the basic reason behind it is because the range of long is much much bigger than off integer all right it is really the range is very much bigger than integer right uh another thing all right as you can see in air basically uh we can also add a suffix all right we can also add a suffix l all right we can also add a suffix l in here and it is not mandatory all right it is not mandatory but it is recommended to add the suffix l all right it is recommended to add the suffix l all right so uh yeah now as we have understood about uh long all right as we have understood about long it is now a time all right it is now time to understand about bite so we are going to learn about uh byte right so another thing uh before going to buy it all right another thing i would like to suggest is whenever you are writing all right it means this suffix l all right in the long whenever you're writing this always remember that to use capital all right capital l there's a very uh specific reason for that because many people what many people does is they gets confused with a small letter l and one it's sometimes uh confusing and even c sharp uh recommends to use a capital letter l all right to use capital letter l in spite of small literal or all right although it will give a warning if you if you use small letter l but uh there won't be much uh issues with that but it is recommended to use capital letter l in spite of small letter l in the suffix of long all right long data type so uh let's get into the byte all right by data type see byte is also uh so uh sort of integer only all right it also stores uh integers but the byte all right bytes range is really low all right byte has a really low range all right byte has a really low range so uh the range of it is from 0 to 255 all right it is it is the range of byte so if we try it out all right if we try this example out alright if we try this example out so basically if we try this example out that is byte all right byte val alright now if we give value uh exceeding already if we give value exceeding 255 that is let's say 300 all right and then try to print console dot uh right line all right val so let's see what it does all right let's see what it basically does let's see all right so it is giving us some sort of error why it is giving error all right why it is giving it it is giving us error because we exceeded the limit all right now if we give something under the limit all right that is between the uh 0 to 255 all right let's say we give 255 only all right if we give this see it is working perfectly fine so yeah that's what byte is it has a low range but it is an integer data type all right similarly we also have other data types all right now we are going getting into the floating the point data types or you can say decimal data types alright that these are the data types that has decimal decimal places all right these data types has decimal places so the very first data type we we will be learning in uh in decimal places uh all right uh that is floating point numbers or you can say float all right so float is a data type all right which can have a decimal means which have decimals places in numbers alright if you want to store the uh some value in points we can't store that in integer of course right so we have to use some sort of data types meant for it so similarly there are three data types all right meant for uh storing uh decimal placed uh values that is float double and decimal all right so the very first thing we are learning is float all right so floating point basically float refers all right to floating point numbers all right and they have decimal places in the numbers all right just like 1.34 then 5.64 all right these numbers have decimals decimal places and them and uh if we talk about the range all right the the float has a range of plus minus 1.5 into 10 to the power minus 45 all right 2 plus minus 3.4 into 10 to the power 38 all right so this is the range of float all right and also float uh uses eight bytes of storage all right and it has a precision of about seven digits all right so basically um it has a precision of seven digits all right what that means is it mean that if you are storing a number like one point two three four five six seven eight nine all right if you are storing a numbers like this so it will be rounded off all right it would be rounded off to 1.2345 678 all right so it would be rounded off to this all right so let's uh learn how to initialize this float variable right let's learn to do so so float all right float value equals all right float value equals let's give some sort of uh decimal value that is 12.5 and also add a suffix f all right then what this suffix uh f does is it tells that it is a floating point value now by default all right by default the val the decimal value is all right the decimal values are in double all right are in the format of double so it is always recommended to give f in the uh back off float uh float numbers all right floating point numbers so val let's try and print it out all right see it is printing 12.5 now let's try it try it out without the f suffix all right let's see what happens it is giving us error the uh the reason is because the the means these decimal values all right by default these decimal values by default are in uh double all right are in the type of double so it is always recommended to uh you uh add f suffix at the last of float variables right so that's what it is all right so as simple as that so yeah let's uh let's see all right let's see other data types too that is double all right let's see double so as we have learned about float all right it is uh a really great data type to be used all right another is a double all right it has a higher range all right this double has a higher range and a good precision all right a good precision so double all right what is a double all right see double is also our data type and uh it is a 64 bit all right it is a 64 double precision floating point type all right and uh it has a precision of 14 to 15 digit all right it has a good precision of around 14 to 15 digit and also all right also to initialize a double variable we have to use the suffix small d or capital d all right similarly in float also we can use capital f but i use small f all right okay uh so here in the example i guess i did a mistake uh i would fix this issue all right here you can see in the example i give float num equals 12f but don't worry in the in the final note that would be that you would be getting all right i wish i'd be fixing this issue all right but for now uh i will show you the actual example all right i will show you the example i'm really sorry about this mistake but uh in the actual uh note this issue will be fixed all right uh so the range all right so double has a range of uh plus my uh plus minus 5.0 into 10 to the power minus 324 2 plus minus 1.7 into 10 to the power 308 all right so let's try it out let's try this double all right let's try this double out so in let's get to the editor of course all right and let's write double all right num equals 12.5 all right d okay and then console dot log oh sorry not console.log i'm always writing this thing because in the unity it is uh to write any sort of comment we do debug.log so it's like uh it it is habituated to me so um yeah so let's try and print it out all right let's see if it gives any sort of errors or runs seamlessly so we can see that it has rams ran seamlessly all right so we have learned about double data type all right we have learnt about float we have learnt about int we have learnt about long we have learnt about byte we have learnt about float we have learnt about double now it's our time all right it is now it is our time to understand this decimal all right let's understand this decimal data type all right see decimal is another floating point data type alright where you can store decimal values all right even the name suggests it so but all right but this data this decimal all right this decimal uh has much greater precision all right than any other all right that is a float or double all right the precision of float and double is lower than decimal all right so the decimal has better precision all right it has a greater precision that is of approximately 28 to 29 digits all right approximately 28 to 29 digits so this double uh this decimal data type all right has an uh greater precision of approximately 28 to 29 digits all right and it is recommended all right it is always recommended to use the decimal data type all right in spite of double or float if you want a greater precision all right if you want a greater precision then you should use decimal all right but the range but the range of decimal data type is uh lower than that of double and float all right so it has basically a range of um plus plus minus 1.0 into 10 to the power minus 28 to uh plus minus 7.9228 into 10 to the power 28 so this is the range all right this is the range of decimal data type all right similarly let's um try it out let's try it out in our code editor all right so um it's very simple i already included uh the definition right and also the example all right nothing to uh to complicate it in here so decimal decimal num equals 25.5 d sorry the suffix will be m not d i'm really sorry about that so the suffix will be m all right so the suffix for decimal is m so this is how we write a uh initialize a decimal data type all right this is how we do it so now as we have learned about uh decimal data type now it's our time to learn about three other data types all right that is cad bool and string these are very important data types all right all of the data types that i am teaching you all right all of them are very important for you to understand all right so care all right cad data type what does care all right what is care actually care is a care basically stands for character all right or you can see letter all right a particular letter all right it's like like uh like a is a particular letter or a character like b like c like d all right so these are characters all right these are characters similarly if you say have to all right if we want to define any sort of character in our program how do we do that all right how would we do that it's pretty simple all right it's pretty simple just to write care all right also i'm not changing the variable name i'm going to keep it numb only right or let's change it let's change it all right and let's say i want to store a character all right called a alright and if i put ch all right now i want to print it all right so let's see it gets print or printed or not so here it is being printed one more thing or there are some details that you should look out for first of all all right if you are a character alright a character data type can only store only one letter all right it can't store a b all right abc it can only store one letter all right another thing you have to uh put in your mind is that whenever we write a character we have to enclose that particular uh letter in single brackets like just like we did in here all right so similarly let's try another out that is b all right and let's run this program all right see it is printing b all right now what if all right if we what if we try to add multiple all right add multiple uh letters in it so here you can see it is giving us error because of course this is a single this can only store a single character it can only store as uh uh like only one only one character all right so that's we are giving it to it that is only one character so remember uh if you if you want to store only a single character then always go for care all right now our next all right uh let's see what is our next yeah our next topic is bool all right see bool uh is stands for boolean all right it is the short for boolean so bool data types uh can only contain true or false all right true means on all right true means it is executable all right true means uh it will work it true means on and false means off all right you can say it is off right right so if you take an example of a circuit all right or you can say your lights also all right your lights also so you have a switch in your house all right to turn on the light so when you turn on the light all right the value of that particular switch is becoming true all right or you can say the value of that particular switch is becoming on and because the the value is true alright because the value is true the current is flowing all right the current is flowing through the circuit and lighting and putting the lights on all right and and it is putting the putting the lights on similarly if you turn off the switch all right similarly if you turn off the switch then the value of the switch will be false and no current will pass through it all right it will just terminate so that's what true and false is in terms of programming similarly how would how can we uh basically um how can we basically initialize it i have also given you example also all right and i will also show you how to do that all right so bool is running so am i running no i'm sitting right i'm i'm sitting right so if i print it now all right if i print it now let's see what happens see it is uh printing us true that the value is true right that the value is true now if i if i turn it false that is yeah i am running then let's say what happened it is printing false see we uh we will understand the use of true and false all right this true and false in further lectures already because we'll be using this often uh especially in the if else all right in the if else and the development so you at that time you will understand the use case of bull and how important is it all right now similarly we have another alright string now previously uh you might think that it is also similar to care and it is somewhat true all right see a string all right a string is basically collection of characters all right the thing that we can't do in cad data type we can do that in string data type all right string is a collection you can say it is a collection of characters all right every letter in here is a character p is a character r is a character all right and we are able to contain it all right you can say ah we are able to unite them in a single variable all right that we can't do in character because it can only store a single letter right so that's what a string is string can store multiple characters in a single variable all right because it is a collection of characters all right let's try out string name you can write your own name all right my name is priyanshu all right so oh also i forgot to give the semicolon this happens a lot and then name let's try it out and see what happens see it is printing priyanshu it is not giving us any sort of error just like the candidate when we try to store abc right so string can store multiple characters because it is it can store a collection of characters all right so another thing already that is noticeable in here is uh whenever you are writing a string or that whenever you are using a string you cannot use uh single quotes alright you you should only use double quotes all right so whenever initializing a string remember to uh enclose the characters or you can say the let uh means the word all right the word that you are uh assigning in the string string type variable all right remember to enclose them in double quotes all right just like we did in here all right so yeah now it is our time alright it is our very time to understand or you can say learn all right it is our very time to learn uh about strings in depth all right because strings is one of the most important concepts all right in in programming so let's understand it all right the very first thing we are going to learn is concatenation all right what is concatenation all right see concatenation is uh nothing too much of a complicated thing all right it is a really simple thing all right see concatenation uh is basically the joining all right it is basically the joining of two strings all right concatenation means it is the joining of two particular strings all right that is what concatenation is so let's try it out practically right let's try it out in our code editor all right so see here we have the name right i'm not going to edit anything in it just i'm going to add some another instructions to it all right so add a plus in it all right add a plus and all right and then add the title all right that is rg all right this is my title right also i would like to give a space before bhattacharjee because then it would add some space to it then let's let's try to print it all right see we i am able to print my full name and we have successfully concatenated all right see uh you might think that hey man this ad is used for adding two numbers right we can use this ad to add two numbers right we can use this ad to add two numbers means addition operator but if we talk about in terms of strings alright if you talk about in terms of strings then this uh add operator becomes a concatenation operator right means it is used to uh concatenate two strings into one all right uh this is what this addition uh operator does in terms of strings all right as simple as that all right so yeah now as we have understood about concatenation concatenation is nothing but but the joining alright the joining of two different strings all right now here comes some very important uh string methods all right it is very important to understand all right so let's see see uh this uh length method all right it basically tells us what is the length of the string all right it basically tells us what is the length of the string let's try it out all right let's simply try it out let's uh see we are going to do it with a very simple string alright that a string that doesn't has a lot of characters all right so let's take a b c all right see this we all know that this this particular string has three characters right this particular thing has three characters so let's try to print the length of it and let's see what happens wow it has given three now let's add another all right let's add another character in it and let's see what it or what it does so as you can see it in here that it has printed four so our length means the strings length is four of course so that's what the length does all right and this is going to be really helpful in our further sections all right even in the development so always remember to go through these notes all right after watching a particular lecture all right so always go through these notes to clear your concepts again all right or you can say revision of your concept now here's another function all right that is equals all right what this equals does see uh this equals will just compare one string to another all right it would just compare one string to another nothing uh too much in here all right it would just compare one string to another all right so let's try it out in here right uh i give it uh let's write another string alright string name two all right equals uh let's say dc ba right and let's try to use this function all right how to use this function first of all select alright select a variable all right that you want or to compare to all right so i'm going to select name as my parent variable on it i want to compare name to with name with name all right so then you have to give name dot equals all right and then within the parenthesis all right within the parentheses of equals we have to pass the second variable that is name two all right and then simply print it out as simple as that all right guys uh sorry i had to change the ide all right the code editor i was using that is gdb compiler uh it had some server issues all right so now i'm using jdoodle all right and let's try to run this program again button jd all right and let's see uh what will be the output so here you can see false why is it false because of course of course dcba is not equals to abcd both are different all right now if we try to give abcd again all right let's say what will be its output see it is giving true why why is it giving true it is giving us true because abcd is equals to abcd both are same right so yeah of course now all right we are going to see two more methods or you can say two more functions of strings that is index of and element at but before that all right we have to be aware of the concept of indexing all right where uh where this uh concept comes in picture what is this uh what is that all right so yeah see indexing is basically tells the placement all right it basically tells the placement or you can say where the particular character is present in the string all right like it is it works sort of look uh sort of like a location in the particular string all right now in programming all right in programming indexing always starts from zero all right so remember the first character alright the very first character of the string all right the very first character of the string will always be zero all right will always be zero now if we take uh take an example of abc all right and we want all right we want the index of let's say b all right we want the index of b so basically the index of b would be 1 how i already told you that the starting point all right it is the indexing always starts from zeroth position all right the indexing always starts from zeroth position so a would be zero b would be 1 and c would be 2 so the b b's address is 1 the a's address is 0 and c's address is 2. that's what indexing is it tells us the index or you can say the level location now there are two or two certain functions all right there are two certain functions available all right there are two certain functions available for getting the index and getting the index and the element present at the index all right see the in what index office does all right in the index of function we have just um pass all right we have to pass a particular um means a particular character present in the string all right and it would return or you could say it would give us the index all right the index position of the particular character all right let's let's try it out let's try it out it would be as simple as that nothing nothing too much complicated in here all right so now if i if i had to remove this weight yeah so what we have to do is we have to just write index all right index off and then let's say i want the index all right i want the index of c how would i do that all right before this pause the video and try uh okay it's giving us error oh i understood why it is giving error actually i use single quote uh single quotes i'm really sorry about that although ah the quiz is still on so you have to guess all right you have to guess or not even guess try to try to calculate all right try to interpret by yourself that what will be the output of this all right because we are trying to get the index or that we are trying to get the index of c or at index value of c from that string that is containing a b c d all right now let's execute it all right so it is again giving me errors i'm not sure why wait a definition for index of no instruction type code string all right wait oh sorry yeah as i told uh case sensitivity i uh i actually used a small letter i that's uh that's why i was like confused why it is giving error it would the cap the first letter will be in caps all right so the index all right so the index of c is 2 how if we talk about a the index of a is 0 because it is the starting point so of course it would be 0 then index of b is uh 1 alright index of b is 1 and the index of c is 2 all right similarly after this all right similarly after this there's another unlike that is element of all right let's see let's see sorry element at i'm really sorry about that so uh it got a rhyming so uh yeah so the uh this is the element that function what it basically does is see we have to pass all that we have to pass some sort of index value alright we have to pass an index value in it and and after we pass the index value let's say i pass uh from the a from abcd i pass 2 all right then it would return c because the at index 2 c is present right let's try it out let's try it out and you will uh you will also notice something all right now i will tell you what element at all right and we have to put the index value that is let's say i want the value present at index 3 all right let's see see it is giving it is giving some sort of error what error why is it giving that error see the reason that is giving the error basically in in the system in the system name space there is no dot element at function available right now to uh use this function we have to uh include another name space that is using system dot link all right and then if we run it all right and then if we run it see we got the element present at index 3 that is d all right now if i if i want element present at let's say 1 can you guess what in the index 1 which element is present pause the video and think all right pause the video and think and tell in the comments all right let's try it out let's see wow it is correct at index one element b is present that is uh at zero already at index 0 a is present at index 1 b is present right so it is as simple as that all right now uh i already told you about sys uh link all right so we used a system.link all right it is it is another namespace alright link is basically a part of system name space only all right and it contains the element at method nothing too complicated all right so till now we have learnt a lot all right we have learnt a lot about data types we have learnt a lot about comments we have learnt a lot about variables right and the lecture has almost crossed one hour point all right so now this is our last all right this is our last topic of today alright last but not the least because there are many other topics available that is operators loops conditionals and etc so now this concept all right now i also have a homework for you that you guys have to do all right i won't show you how to do it all right i won't show you how to do it but you have to do it by yourself already because after this type casting i'm pretty sure that you would be able to solve some like a problem uh only one problem means i would only give you one problem and i think you will be i think you will be able to solve it already so see sometimes alright sometimes it is really necessary for us all right to change the value already before assigning means to change not the value but the type of the value before assigning all right let's say if you if we want to assign already if we want to assign a floating point value to our integer of course of course it will give us an error right of course it will give us an error because of course we can't store a floating point value alright we can't store a floating point value in all right we can't store a floating point value in our integer right in our integer right so we we have to convert it all right we have to cast it we have to convert that uh type that typed value right that float type value so let's try it out all right so typecasting is basically changing the type of the value before assigning as simple as that all right so let's take another thing that is int val alright end val equals 23.2 all right if uh uh of course we have to uh add f suffix if we are going to add floating float float type value all right and let's try to print it out all right let's see it uh it works or not so val all right let's see it works or not oh my god it has it has given us some some error right constant value cannot be converted to a end right because of course it can't be converted because because uh a compiler cannot convert it by itself we have to give some sort of instruction to convert it right so how would we do that as simple as that we have to convert it to end right so before uh assigning the value all right like you have assigned this value before that give a parenthesis all right and give the data type you want to convert the value to so it currently uh this value is in float all right this value is in float we want to convert it to end to store in the in data and variable right see it has stored basically what is happening is it is removing that uh value from the point all right from the decimal it is removing that value all right and it is storing the exact value all right so this is what type casting is now all right now another thing i would like to show you is we can also do this with the variable also all right let's let's um create a variable all right that is float fl i have given any name i i could have imagined it all right so let's give 23 point or let's say 24.5 f all right so let's give that all right and whatever i do is i will remove that value and instead of that value i'm going to put the variable all right i'm going to put the variable and let's let's remove this end also first try without converting and then let's see what will be the output right i'm trying to assign a float value in the integer see it is giving all right cannot implicitly convert type float to int all right and xp and explicit conversion exists are you missing a cast see the compiler is so kind that it is also telling us what what can help us fixing it all right so what thing can help us fixing it right so let's do it so open the brackets all right open the brackets and we are going to typecast it that is end all right we are going to type cast it to int all right and let's say it works or not let's see wow congratulations it has worked it has worked right we we have successfully make uh the floating point worked right we have successfully typecasted now now here's a task for you all right here's a task for you you have to convert an integer to float all right you have to convert an integer to float this is your task all right after after watching the video you can surely complete it all right it is as simple as that it is not that complicated task right so for today all right for today's lecture for a module 3.2 we have come successfully completed this lecture all right and in the next lecture we are going to learn about operators all right uh it is really important to learn about the operators so next lecture is on operators hey guys welcome to this lecture and in today's lecture we are going to learn about operators in shisha all right this particular topic is very important for us because whenever we'll be uh coding any solution or let's say we'll be solving any sort of problems all right or maybe coding our own uh mechanisms in augmented and virtual reality we'll be needing operators on a highly basis because this is the very fundamental concept all right all the operations that we perform within a program happens only because of operators all right because for example whenever we are assigning some value to a variable right when we whenever we are assigning some value to a variable the assignment that is the equal all right the equals to option uh or the equals to sign is called assignment operator yeah that is also operator or let's say for another example we let's say we are multiplying all right we are multiplying a particular speed all right to time dot delta time all right i'm just taking it as an example we will be covering time dot delta time in future videos whenever when we will be uh learning to code in unity and uh we'll be developing our ar applications all right but for uh time being just understand this uh there's some function that is time the delta time and we are multiplying uh the speed variable all right the speed variable with the time dot delta time all right and the you know the s means the multiplication sign all right that will be putting in there that is also an operator all right so operators are everywhere in program so it is very important for us to understand the concepts of operators all right so basically what are operators see an operator is basically used to perform some certain functions or calculations within the program all right for an example assigning some values to a variable all right uh just like an equals to operator or as i said the multiplication operator is there to multiply right so similarly we use operators for multiple tasks all right and in today's lecture we are going to see that now the there are multiple types of operators all right there are multiple types of operators there are majorly five that is uh arithmetic operators relational operators logical operators assignment operators and bitwise operators in this lecture all right uh we are going to learn about four the four of these operators all right that is arithmetic relational logical and assignment all right we won't be needing bitwise operators as of now so that's why i am not teaching it but uh if you want i can bring a whole lecture video on bitwise operators all right because uh to understand bitwise operators you need to understand binary operations all right how how we perform binary calculations because bitwise operator shifts those binaries right so that's why i'm not including this uh bitwise operator concept uh in you know in this lecture so in this lecture we are going to learn about only four of these and uh all right so let's start with our very first operator arithmetic all right so see the use all right the use of this operator's operator is only available in its name arithmetic means we use these operators to perform some sort of calculation all right we use this operators to perform some sort of calculation the calculation can be anything it can be division it can be multiplication it can be addition it can be subtraction all right and we are going to look into that so here are all the operators listed in you know in a table that is the plus operator it is used for addition of values you can do it like this a plus b equals 10. similarly there is subtraction then there is multiplication right then there is a division all right you might this might seem a bit unfamiliar all right means of course there's a percentage sign all right but in terms of programming we don't call it a percentage all right in terms of programming we don't call it a percentage we call it a modulo operator all right we call it a modulo operator all right a modulus what this operator does is this operator gives you the remainder all right it gives you the remainder of any division right like for an example divide seven by two all right there will always be a remainder of 1 all right so that's how it gives us the remainder of you know a particular calculation right and here uh in the last two these are unary operators the what these basically does now this plus plus sign increments value all right increments value with one let me uh make you understand this plus plus sign all right we'll be incrementing the value as 1 and this negative means negative negative that is double negative this will decrement the value all right this will decrement the value that's it now to you know understand it more all right understand it more wisely more carefully let's do one thing let's uh do a practical on it right so i'm going to open uh just uh give me a second all right okay here is the editor so i'm just going to open it all right and uh what i uh first the very first thing all right what i wanted to do is declare two variables all right that is the uh first variable i would like to be you know um let's say eight and uh you know the second variable let's uh be it four all right now i'm going to perform the calculations you can see there are two ways to perform the calculation you can create another variable that's in c equals a plus b all right another way around is um you just directly print it all right just directly print it that is a console.writeline a plus b alright both will do the same task but the difference between them is in here you are just printing you aren't means in this particular line you are just printing all right you are just printing the adding additive value but when you are assigning a variable and then uh doing addition in it just like uh like just like this all right what you are doing is you are storing the addition of a plus b that is addition of a and b in another variable c all right you can surely do that let me uh let's do it that way all right that would be better so here you can see all right here you can see that we are performing the addition now let's see it's uh is it even working let's start up yeah it's it's perfectly working what is the addition of eight plus four it is 12 and we got it right now now uh let's try out uh you know subtraction so to do the subtraction it's very simple remove the addition operator and put that minus operator all right or you can say uh in your keyboard there would be a dash put that all right it is called a minus operator and you can see 8 minus 4 is 4 right now let's do another thing all right let's multiply it all right let's see see eight forza is 32 so multiplication is also working now let's let's try out uh division okay uh before uh doing the division operator i want you to pause the video and do the calculation by yourself without using any program uh let's see if you get that get it correctly or not see yeah four to the eight so uh that uh outcome is two right so that's how it works alright so till now we have seen four operators or which one is uh means which are those addition subtraction multiplication and division now let's see all right let's see the remainder operator all right can you guess what would be the remainder of like what would be the output of this particular calculation just give it a thought all right do it manually all right and then again continue with the video it's zero because uh when we divide eight with four all right it's completely being divided all right the division is being completed so remainder is zero now let's say if i give uh let's say for now i remove eight and gave nine let's see the output is one because there's a remainder remaining all right the division is not being completed so that's how this remainder operation works all right it's fairly simple so we saw about uh you know addition subtraction multiplication division and remainder now there remains two more operator all right and those are called unary operator uh what that does is they increment or decrement the value all right see there are two ways all right there are two ways of using increment and decrement variables all right means a increment and decrement unary operators all right so understand it like this so now the basic see to understand unary operator all right first of all we have to understand what it does see unary means these increment and decrement operators now they increment the number or decrement the number all right means it will uh like if i let me show you by example only all right let's remove this particular uh particular calculation from here all right let's uh let's let's perform this increment operator on let's say b all right let's give b plus plus let's see what happens all right let's just see what happens so here you can see all right let let me show you again here you can see the operation is not working means uh i i promised you guys right that uh this particular plus plus operator will increment the value right let me tell you one thing it is incrementing now there's a whole round of concept behind it all right but before that let me show you by incrementing incrementing the value actually so give plus plus b right let's see if this works yeah it works but why didn't the first one work see let me uh let me wrap your head around it first of all the plus plus sign alright let me uh make a comment right in here all right see first of all understand all right this plus plus operator is always used for incrementing all right and this minus minus operator is always used for decrementing right increment means increasing the number by one all right means this operator will always increment a number by one and decrement means this operator will always decrement the number by one all right that is subtract one from the previous value let me show you something like this see our value was 4 right our value was 4 and now it as it has decremented by 1 it is 3 right so that's how increment and decrement works all right now the there's a underlying concept already there's an underlying concept behind increment and decrement operator all right that is post increment pre-increment all right and post decrement and pre-decrement all right now what are those first of all let's uh let's wrap up our head uh around pre-incur increment all right that is the uh pre and post increment so first write it pre increment all right so what this does all right pre means first all right means that it it will perform the tax task first then anything else all right understand this way pre-increment is that is it will be performing all right it will be performing the operation first means in our case the operation is incrementing so it will uh perform the incrementation first all right and how do we write it fairly simple plus plus first of all we would be giving this uh symbol plus plus and then write the variable name all right so that's how pre-increment work all right and post increment is after all right after performing the operation all right now i know this might get a bit confusing and we write it like this all right that is b plus plus post increment now see let me clear this message pre-increment pre-increment what is doing first it is all right first it is incrementing the value then assigning and post incrementing or post increment what is it doing is first it is uh you know assigning then incrementing all right in case of this variable that's why that's why previously the b plus plus didn't work that's the reason because it or it has already first it has already assigned the value of b to the variable c after assigning it then it is incrementing all right that's the difference between pre and post that's the difference all right nothing else or else in both the cases value is being incremented just the difference is one is doing doing it first then assigning it and the another one uh what the other one is doing it is first assigning it then and incrementing it that's that's the difference all right so that's how this thing works all right now let's try it again let's let's uh try pre-decrement all right that is plus plus b all right now just guess the output alright let's let's not uh get b let's uh let's get a all right guess the output what will be the output it would be nine right because why because first of all it is incrementing then assigning the value increment uh increase incrementing by how much it is incrementing by one all right now let's again uh try out a plus plus let's see how that works see uh it is it is not showing that uh it has incremented but but our particular all right this particular value has been incremented right now i know you might not be believing me all right you might think what what is the proof all right and your question is right it's totally right all right so let me first you know uh let's comment out this line let me show you if this this particular function is even incrementing it or not let's see all right let's see so give a uh go to console.writeline and write a plus plus let's see so here you can also see that it is not showing all right that it is incremented right i know it might be confusing now let me show you another way around here is the variable i wrote this variable in here all right and again do a plus plus in here all right don't assign it to any variable just do a plus plus and let's see yeah it worked how how see it is not assigning any variable we aren't printing any variable we are printing a variable but we have we haven't assigned this increment all right we haven't assigned this increment to any other variable all right just like we did in the variable c we didn't do that all right did we we didn't so it just incremented the value it didn't assign itself so it it has not stored now it as it has incremented the value that's why we are getting nine so here you can see that this particular thing is working right it's totally working fine so the major decrement uh sorry the major uh you know difference between uh pre-increment and post increment is that one works first and the other one works last something like that all right of uh means uh this that is the pre one all right the pre-increment will increment the value first then assign it and the post increment post increment will uh first of first of all assign and then increment that's the difference all right so same all right same concept goes around the decrement all right that is pre decrement that would be you know minus minus b and post decrement would be b minus minus right so let's let's try this one two right first of all let's try uh minus minus b all right so our current value for b is you know c and let's print the c right see we are getting 3 because first it is being decremented then assigned now let's again try all right let's again try b minus minus in here and let's see if that works or not no it's not working because the value is already assigned and we are printing that assigned value now to check whether uh act in real all right in real if it is being decremented or not okay i guess i ran it by mistake so um let's go and give b minus minus alright and let's remove the c and let's put b in here let's see if uh works yeah it worked it did work so you can see that this post decrement also works so that is what p pre and post agreement is all right very simple all right nothing too complicated so i'm going to erase this program all right i'm going to use this program and go towards our next set of operators all right so we are clear with this concept of operators all right addition operator is for addition subtraction operator is for subtraction this asterisk is for you know uh multiplication this slash is for division this mod uh module or you can say percentage operator is for remainder all right this plus plus operator is for incrementing and this minus minus operator is for decrementing all right so i hope you understand how arithmetic operative works right now here comes our relational operator all right see again the meaning of this operator is already told in uh is already listed in its name it relation it tries to uh you know tell us that if there is any relation between the two values right now in this operator there are you know uh how many types are there six total six types is there that is equals equals not equals greater than less than greater than equals less than equals uh if you are you know uh i know most uh everyone uh if you uh means every one of you uh have experience with uh maths right i know everyone every single person of you and you already know what uh greater than equals does less than equals does right so let me make this thing clear to you see if all right if the condition is correct then it will return true if the condition is correct then it will return to if the condition is false then sorry if the if if the condition is not correct all right or the condition is wrong all right or let's say the condition is not matching then it will return false all right and uh these operators alright these operators are wide very widely used all right these operators are very widely used in if else operations all right if else for loop operations so we'll be learning those two so don't worry all right the main focus currently for us is to understand all right is to understand how these operators works so for that let me open my uh you know let me open this particular you know this uh editor and let's see our relational operator so let's give it a comment all right relational operators see there are total six operators you know who are those and let me show you what do they do all right let me show you so take two very uh variable that is in a let's uh it 12 and let's take another variable that is no into b and let's assign it 10 right now all right now do one thing write console.writeline rightline all right and the very first operator is equals equals operators now let's see what it will return let's see it's returning false why why see understand the concept behind equals equals this is a this operator all right this operator compares two values all right and if both the values are same all right if both the values are same then it will return true and if both the values are not same then it will return false all right so these equal equal to operator is used for comprising now as i have changed the value of v to 12 and also the value of a is 12. now let's see what it returns see it is returning true because the condition is true the condition means uh a and b is means a and b are equal all right a a is also 12 b is also 12. so that's what uh you know equals equals operators does now the second one for us was not equals all right it's the total opposite it will check if the value is equals to or not equals now let me show you all right a naught equals to b now can you guess what will be the output all right pause the video and think for a few seconds and uh you know try to answer it by yourself what will be the output so let's see it is returning us false why because the it is the the conditional is also is only telling us not equals to we don't want it to be equal all right it means if it if both the values are not equal to each other then only i will return true and if they are equal i will not i will return false now let's try to change the value to you know change the value of b to 10. now let's see it is returning true now we understood about equals equals operator we understood you know we understood about uh not equals operator what's next next is greater than all right next is greater than and less than operator now let me show you all right let's see a all right a greater than b of course you all know it will you know return false because uh sorry it will return true because of course a is greater than b a is 12 10 ah b is 10 now let's see yeah it is returning to now now you know let's uh let's uh let's give it 13 all right let's change the value of b to 13 let's see it is returning false right it is returning false because of course bro uh a is not bigger than 30 it means 12 is of course not bigger than 13 right that's where it is returning false so now let's let's back it up to 10 and let's try it again yeah it is returning true because 10 is less than 12 and 12 is greater than all right 12 is greater than 10 so same again let's try out a less than b all right of course the the condition has to be true all right means uh means this condition is telling us the truth a is not less than b a is not less than b that is false that that's why the output is false how can 12 be less than 10 it cannot be right so that's why it's returning false now let's say if i change the value of a to let's say five okay uh sorry yeah let's change it to 5 and let's see the output now it's returning true because it is returning to because the value of a is of course less than b because the value of a is 5 the value of b is 10 and 5 is less than 10 so that's how this you know this thing works now let's say all right let's give both the values you know equality that is let's make a to 10 b to 10 right now let's see it's returning us false it is returning us false because there isn't any option right because uh see that that means for these type of no for these type of values now uh less than equals and greater than equals comes in all right so we are going to see those uh operators now so till now what we did till now we learnt about uh you know arithmetic operators all right now we are going through relational operators and in relational operators we learned about equals equals not equals greater than or less than now uh here comes two more operators all right here comes two more operators less than equals greater than equals all right now let's see first of all you know let's again uh reset its value let's ab12 and bb10 right now in here it's very simple you just have to give a greater than equals b now let's uh try and run it here you can see here you can see it is returning us true there's no difference right you you might be thinking oh god what am i showing what am i showing it's just like the you know the previous one just like the previous uh greater than equal sign sorry greater than sign no there's a difference you just have to wait so here you can see it's returning true yes of course it will return to because 12 is greater than 10 now let's let's make it to 10 all right let's make it up to 10 let's see oh my god it's again returning false why that's because he has an equals to sign it the condition is telling all right if the number is greater than equals to some other number then only return true and if the condition means if that condition is not matching then return false now let's let's try giving 9 now let's see say it is giving us false right now let's again let's try less than equals it's returning as true because you know 9 is less than 10 now again let's give you know 10 to a let's see again it is returning as 2 because 10 is equals to 10 right now let's give 12 to a let's see it is a returning false alright because then the condition is not matching now condition is not matching it is 12 is nor less than nor equals to you know what nor less than nor equals to 10 so that's how this whole relational operators works i hope the concept behind the relational operators is clear all right now as we are very clear around relational operators let's understand the concept of logical all right see logical operators uh you know they are very simple to understand all right very simple some people like exaggerate it i've seen like some people uh exaggerated uh exaggerated it but currently in the beginning stage and operator and you know these or operators are very simple very simple to understand now logical operators what are they all right these type of operators now all right is used to you know um what can i say i'm not getting the right word these two operations have put put some condition between uh like you know another two condition all right i know it might get a bit confusing i will show you how to you know uh how this works right but for now understand all right it performs logical calculations all right understand it like this it performs logical calculation now you can see two ands all right that is two ampersand signs all right what this means we call it as an and operator what this means is in this example here you can see there are two condition that is a equals equals two and another condition is b equals equals four all right if both the conditions are returning true all right if both that is a equals equals 2 is true and b equals equals 4 is true then only it will return true let's say any of the condition in here let's say let's for example let's say b equals equals force is false but a equals equals 2 is true all right for example then it will return false that's how the and operators works all right so as we have understood the and operator let's you know let's uh try to code it right let's see how this thing works so first of all i wanted to remove this whole code all right now again right in here logical operator all right cool now here assign two values represent equals you know 10 and b sorry enter b equals again you know let's say 12 all right and now you know go to uh console.writeline and in here in here what you have to do is first of all first write one condition that is a equals equals 10 all right we are comparing the value of a to another value 10 all right now here comes the and operator now let's again do the same thing for b that is b equals equals to s now let's try and run it it is returning us true because both in here both the conditions are true now let's let's change one value that is let's change the value of b to 11 let's see so it is returning false so here the concept of for you know and operator is very clear that two or two means to get the and operator return true we have to make sure that both the conditions all right both the conditions which are uh you know using the and operator should be true all right so that's what the purpose of and operator is now another operator is or operator all right it's like if this doesn't works then we will work with these all right so basically what it means is let's say there are two values a equals equals to b equals equals to all right that is uh in our case alright in here b equals 4 right that means in here b all right for b it is false the condition b is false because of course b is not equals to 4 all right means b is 4 of course sorry i just you know uh confused you i i think so let's understand it this way see b is b right in here is 4 and we are comparing b with another value 2 right and of course 2 is not equal to 4 all right it is not so for this particular condition it will be false now for this all right that is a equals equals 2 in here the value of a is 2 and 2 equals equals to that is this but for this condition it will return true so as one condition is true it is going to return us true all right so let me show you so here you can see i already have it assigned that as a equals equals 10 that is 10 equals equals 10 it will be 2 and b equals b equals equals 11 but in our case b is 12 and in we are comparing it with 11 let's see it is returning us true all right now let's do this the other way around let's change it to 10 and let's um you know let's change the b to 12. again it is returning us true because you know one of the condition is continuously matching now let's say change you know change uh both the let's make both the condition and false and let's see here you can see it is getting us it is giving us false right so that's how this thing works that's how odd operator works now this not operator now it's totally different all right now let me show you not operator knight will uh it will you know reverse or you can say inverse alright invert the result all right it will invert the results now for example let's give a equals equals you know or 10 all right the output for this will be true right the output for this will be true now if we all right patch this particular uh condition means wrap this condition with the you know round brackets and put you know and put what is this called exclamation mark or you know not all right not operator in front of that uh condition and then run it here you can see that it is although the condition is true it is uh returning us false why because this this particular not operator now it is uh inverting the result now if if it is you know if it is resulting to you know false it will return us true all right so that's how this not operator works all right so till now we have uh we have learnt about uh arithmetic operator relational operator and logical operator now here comes the last one that we are going to learn all right this one is assignment operator all right see assignment operators are you know going to be very useful to us all right they are really going to be very useful to us and you got to be like you know very uh like you need to understand how these things work all right uh understand it carefully because sometimes not because of these operations that might like especially in this case this uh these uh three for uh for case of these three it uh gets a bit confusing all right so don't worry i'm going to you know understand uh make you understand this concept brick by brick all right so let's remove this all right let's remove this again comment it and uh let's give it a name that is assignment all right assignment operator all right very cool very great now create a variable and a equals you know let's uh let's give it five all right now here we used our very first operator which one equals operator all right how see equals is an assignment operator it's in its team only see equals is assigning a value to a all right equals is assigning a value to a that's how it is working right that's how it is working so equals is an assignment operator we learned about our very first operator right it's not very first but learnt about our first operator in assignment operator category all right now next operator is plus equals all right see i hope you remember we learned about uh increment and decrement operator uh plus plus equals operators also does the same thing all right but it you know it is more modifiable all right it is more modifiable it also increments the value all right it also increments the value but we can determine how much value to increment all right like in the previous one we are giving you know uh a plus plus and it was only incrementing the value all right it was only incrementing the value by one we weren't able to you know change it means if we wan how to do like if we use this we won't be able to increment the value with two all right it will only be incremented with one all right but with the plus equals operator what we can do is a a plus equals two all right and now let's let's print it a let's see it is 7 because 5 plus 2 equals 7 right now you know there's a more abbreviated it's not abbreviated there's a more expanded version of it all right let me show you a plus equals 1 all right a plus equals one okay so plus equals two all right it also has a uh you know big version that is a equals a plus two all right so basically this this would help you to understand how exactly it is working alright how this operator is working so pay attention carefully what is happening first of all it is performing the addition of a that is 5 plus 2 then it is assigning the addition to a to the variable a all right it is performing the addition on e then it is assigning that addition to the variable a that's how it is working all right so that's how this plus equals operator works all right now the next in our you know the so first uh first let's understand what we learned we learned about uh assignment that's equals operator now uh we learnt about plus equals operator all right now here comes minus equals operator this is the decrementing operator but is modifiable all right that is a minus equals 2 let's try it out see 5 minus 2 3 all right now you know let's uh let's expand it that is a equals a minus 2 again it's the do it's doing the same thing right just it is more expanded version what is doing it is first performing the calculation that is it is first you know decrement means decrementing the value by 2 then it is assigning it all right so that's how it is working now uh we learned about the three operators that is assignment plus equals all right that is equals plus equals and minus equals now here comes multiply equals now with the first chapter operators uh your i guess your concept might be clear but let's say if it isn't clear i will show it to you all right the syntax is something like this a asterisk equals 2 all right so what will happen it will multiply 5 by 2 5 with 2 sorry let's try it out see it is multiplying it now if we if we look into the underlying all right means uh the underlying logic it will be like this a equals a into 2 all right and you know 5 into 2 is 10 and then it is assigning it so that's the underlying logic behind it all right now as we understood this also there's another one that is divide equals a divide equals 2 so basically it will divide 5 with 2 now of course i don't want to divide 5 by 2 so i'm going to change the value to 4 all right let's see for the simplicity here you can see 2 4 divided by 2 is 2 all right now let's you know let's simplify it a equals a divided by 2. it's doing the same thing right first it is dividing then it is assigning as simple as that all right that's how this thing works now again the last one remains that is modulo equals let's see it it is returning 0 because of course there's no you know it's a complete division if you divide 4 by 2 right now let let's try it out with 5 now let's see is returning also because one because it is it is not performing a complete division right so that's how this you know this whole thing works all right so uh let me show you the abbreviated version of it also a equals a modulo 2 all right now you know let's uh let's remove this particular line and let's see if our you know our idea works or not see it is working right now let's change this value of a to 4 now let's see so here you can clearly see all right here you can clearly see we are able to do all the actions all right in the assignment operator and i hope it is clear how everything under you know under the hood is working right so let's get to our next topic all right and that is bitwise operators i'm just going to tell you the over like overall idea behind so you know let's see see bitwise operator works on uh bits and perform bit by bit operation all right now in here bit is binary all right so uh before rc the thing is you have to understand binary operations all right you have to understand binary hexadecimal uh octal operations before getting into bitwise operators all right because bitwise operators works on binary level all right and that's why bit by bit wise operators are fast alright so remember that remember this thing and uh i would like see i would like you guys all right after you are completed with the c topic i would really like you guys to do your research and learn about all right do your research and learn about bitwise operators more because it is one hell of an interesting topic all right so do that now here comes another topic operator precedence all right see operator precedence is you know a very interesting topic it's like the bodmas rule in maths all right it's like the body mass rule it maps what bodmas rule tells us all right first of all it is in bodmal's rule the associativity or you know the importance all right the importance is from left to right all right the importance of operators like in in the body mass rule the importance of all those operators start from left to right all right bracket of you know division subtraction multiplication uh sorry bracket you know bracket of division multiplication addition subtraction right so that's how it is means bracket has the very high importance and subtraction has very low importance all right and you know as bracket all right as bracket has very high importance uh the you know the calculations inside a bracket is performed first then other calculations are performed so these all right you know these all right these this is the whole concept of operator precedence so i would like you to go through this chart all right it's very important to have an understanding of this chart it's just that it is telling us all right about the precedence of operator all right that is how important an operator is and uh how much important is it from its next operator so it is telling us that all right and i want you guys to you know have an understanding of this all right so that's it for this lecture and i hope uh you guys are liking this whole series so make sure to press the subscribe button and more lectures are coming all right thank you in this lecture we are going to uh learn about conditional statements all right conditional statements in shisha uh the reason why we are learning is we we need to know how we you know uh drive our program all right means we how we drive our program to a certain direction all right and how do we uh drive a program to a certain direction it's by applying conditions all right it's uh you know it's just like that like when you know uh i guess you guys remember when parents uh used us to know uh tell us that uh we will buy you a thing if you bring 90 percent uh 90 marks in uh your exams like it's like that it used to know uh drive us to study harder to get that thing so that's how conditional works all right we give some condition all right and uh it works upon that condition that's what conditional are all right basically conditional uh statements now they help us to execute all right it helps us to execute some sort of programs all right some programs uh with respect to the conditions assigned to it all right now if the condition is true all right if the condition is true then you know uh a particular statement will get executed and if the condition is false it won't get executed all right so that's what conditional is all right so now uh first of all uh just let me rename this editor to you know uh conditionals um conditionals all right so yeah see there are uh you know there are three or you can say four uh conditional statements out there now let me list them down all right the very first one is if else all right or you can see if and else the next one is if else if and else all right the third one is inline if we are going to learn about that don't worry uh and the fourth one is switch statements alright or you can say uh switch case all right statements so ah there these are the four types of conditionals we have all right so now as we are clear with the like what conditionals are right we should you know get going with our very first you know our uh very first statement uh that is if and else statements all right see these if statements now it helps us you know it helps us to execute some condition already to use it helps us to uh execute some statement under some condition all right it's like that it's it's like you know uh let's say for an example um it's raining outside all right for an example uh it's raining outside or uh let's say uh how can i you know represent it um yeah let's say it is it is raining outside all right and uh you you want to take an umbrella why you want to take an um see the very first thing you are going out all right you see while going out you see that there rain is falling right and you are very sure as it is raining you want to take a condition sorry you want to take an umbrella with you right because uh it is raining and if you you know uh get wet in uh due to the rain uh it will you know uh it will give you fever all right you won't be well all right so you want to prevent it all right and because of that you are getting an umbrella so that you don't get wet right so in here can you all right can you guess what is the condition in here all right in this case the condition is rain all right how let me tell you see as it is raining you are taking the umbrella what if it didn't rain you won't be taking and taking an umbrella all right because of course dude it is not raining why would we need an umbrella we can walk freely right so the condition in here is rain and the statements that are being executed is will uh is that the person will take uh umbrella or he will not take daila all right so that's how it is working now to uh you know to implement all right the uh let me show or tell you about the syntax how we you know represent uh the syntax of ethernet i would uh like i would uh implement the example i told you all right i will do that right now just give give me a few seconds first let me make you uh you know go through with the condition the first thing is uh we have to give a you know first thing is we have to write if all right and within that if a condition goes all right a condition will go on and after that all right within the f block some sort of you know statement will be there statement in the sense some sort of program you have written or some sort of you know uh command you have written that would go on all right and let's say if the condition alright if the condition is you know if the condition is not satisfying or the condition is wrong then another set of already another set of statement will work on right so if the condition is not true then means if this particular kind uh statement condition is not true then this else block will execute now to understand it very you know uh very carefully let's code it first of all create a bool variable that is is raining and you know set it to false as of now or let's say set it to you know true all right that would be better now if is raining equals equals true what i want to do is i want to print i want to print that take your umbrella right let's see if it is working or not yeah it is working as it is raining all right as it is raining that's why we are taking our umbrella let's say what will uh what will be the outcome if we you know uh say false see it is telling us that your program did not output anything what does it mean it means that this if condition uh like you know here our condition is only that if it is raining alright if is raining equal is true then only execute this particular block of code all right or else means we haven't specified let's if if this is raining equals equals to condition doesn't execute all right let's say if it returns false then what all right then another block of code will uh you know show its you know uh what can i say show it's magic that is else block all right and what else block does is if any of the condition becomes false all right if any of the uh you know previous condition becomes false it will go to the else block all right and in the else block we can write okay just all right in the else block we can write don't take your umbrella right so now let's see as israel as it is not raining that is raining full fall so what is happening our code is telling don't take your umbrella all right so that's how if an else statement works it it helps us to drive a program to certain directions all right so it's like that it's it's just like the example i give you like the reigning example and you know the parents are uh like you know uh the parents uh giving us some you know some sort of gift like promising us to give some gift and uh they are telling uh they will only give the gift uh if we bring 90 marks in our exam so it it's something it is totally like that all right it's it's how we drive our code all right it's how we actually you know drive our code that's how this whole thing works all right so that is what it is now our next all right as this one is done right this one let's mark it down if an else is done we are clear with if an else statement now the next one all right the next one for us is if elsif and else statement right now see it is also similar all right it is also similar to um if an l statement just here comes another block that is else if elsif is also like you know if statement but let's say if statement doesn't executes it will go to the else if statement and if else if statement also doesn't execute then it will go to the else statement all right if the these kind of statements comes in real like comes really handy when whenever we are writing let's say uh solving some problem or uh let's say making our own ar application where we have to put some conditions right so this kind of statement comes really handy all right and they are used more oftenly all right they are used oftenly so make sure you understand it all right the syntax is uh you know very similar to the uh previous one you'd uh like just in between uh if and else block all right you have to uh write another block all right that is elsif and in here a condition goes on all right and uh within that uh condition we have to write and you know block and it would contain a statement all right it's uh it's like that now let's let's say uh let's take an example of voter voting age all right let's implement it let's uh take age let's uh currently my age is 17 all right as of now my age is 17. now for the very first condition i'm going to give is all right the very first condition i'm going to give is if sorry if age no is greater than equals 18 then only all right then only i am eligible to vote in india right then only i am eligible to vote let's say what if all right else if our age is less than 18 all right let's give another condition all right if our age is less than 18 and all right and age greater than right greater than zero of course uh a child all right who who like who's not even born he won't be able to you know uh vote of course that's you know that's ridiculous right so console dot uh write line and give not eligible to vote all right so yeah and in the else block we give console dot write line if invalid edge all right invalid age now what does this means all right let's first give it you know let's give the age 19 all right let's see which one will get executed see the first condition is being executed that means the if block is being executed why because e of course of course uh uh the age the age we specified is greater than all right greater than equals 18 it is greater than 18 right that's why we're eligible to vote now let's let's try out 17 right we are not eligible to vote of course because you see i am not 18 in india the minimum voting age is 18 and i am not 18 so how how will i vote if i am not 18 so 17 is like if you are 17 you can't vote right now let's try out you know four let's let's see if a four year old can vote or not no the four-year-old cannot uh can't vote now let's see if a zero all right if a zero your old kid can vote or not invalid age all alright because 0 is not an age right so here is the thing if else if and else that's how we use it all right that's how we use it and you you you are going to use more often when you will start coding your own ar or ar applications or games right or even uh like when you will uh you do go in competitive programming or solve problems you are going to use these statements oftenly all right so that's how you you know we use these statements all right so i hope uh you know the concept the concept of you know this is clear now we are going to you know do a bit of problem solving in here all right so for us uh there's a question all right for us there's a question let me write it down here first first of all let me remove all this you know uh this statement now let me you know write this question in here all right write a program to take certain numbers and if the numbers are if the number is divisible just to it if the number is divisible by 2 then we have to print divisible by 2 and if it is divisible by you know 3 then we have to print divisible by 3 all right else all right or else if none of the condition matches right then we have to print not divisible by two or three all right so this is a very simple program all right you learned about operators all right you know how to perform you know uh uh how to perform remainder operation right now let's understand the logic first all right to check all right if the program is fully divisible all right see to unders understand this if a program uh to to know if a number if a number is fully divided we have to make sure that the remainder is zero if the remainder is zero then only all right then only we say that that particular division is you know is valid or it means it is fully divided that's when we call like like for example uh 4 divided by 2 in this case the remainder all right in this case the remainder is 0 right but let's say again let's take an example five uh let's divide five divided by two in this case there will be one as a remainder and we can't call it divisible by five so divisible by two right so make sure that uh keep this in mind all right keep this in mind any pro any number that is you know that whose remainder is coming zero off like is coming zero after the division it is divided that by specific number all right so make sure you know that now you already know which which one is the division operator this one already this amp or this percentage operator or you can some module operator all right and to perform the division it's very simple let me show you first of all take a value that is end n let's uh as of now let's give you know let's give it 4 now if n percent is 2 alright that is we are how this is working we are taking out the remainder all right remainder by dividing n with 2 we are trying to take out the remainder then we are checking all right then we are checking if the resultant remainder is equals equals 0 or not if it is 0 then we are going to you know print console.writeline divisible by 2. similarly similarly we are going to do the same thing with 3 that is n divided in modulo 3 equals equal 0 if that works that then it is divisible divisible by you know um 3 by 3 all right now if if none of the condition works all right if none of the condition works then i want to print out not divisible by you know by both two and three all right so now let's check this out all right let's check this out and how these things works see as 4 is div as the remainder all right as the remainder of 4 divided by 2 is 0 and it is matching the condition that's why it is returning divisible by 2. now let's try try out 9 all right it is returning us divisible by 3 the reason is 9 is divisible by 3 when we divide 9 by 3 the remainder comes 0 and as the remainder remainder of the resultant division is 0 and it is equals equal 0 that's why it is returning divisible by 3 all right it's as simple as that now you know now uh let's uh let's give one it is not divisible by 2 not divisible by 3 all right so that's why in this block it is returning us not divisible by both 2 and 3. so i hope you understand how we exactly use if and else you know if else if an else statement all right and i hope it is uh you know uh clear so yeah let's uh you know uh we can conclude all right we can conclude that if else if an else statement is also done all right now here comes two other statements all right very important all right means actually uh see you are going to use inline if if you want to assign you know it doesn't have extra conditions in there like only one single condition means only one if actually let's let's you know write the program first all right let's understand the program first then you will understand what i am trying to say all right so see you can uh you saw the you know the syntax of if else statement it's a bit big right it's a bit big now inline if not is uh uh is basically now inline of a basically a shorter version of effects all right it's the shorter version uh of if and else and it is you know mostly used uh you know it is mostly used or you can say it is more convenient to use when you assign assign some value to a variable depending on you know some condition all right it's so you it's more convenient to use in there all right rather than using it any uh or for taking any input or something like that all right so it's uh it's uh it's very convenient to use those statements while uh you know being in the variable so make sure you keep this in mind right now if i talk about the syntax the syntax is you know pretty simpler all right first of all there's the condition all right after that there's a question mark all right then here's a value all right and it will be assigned all right only if the condition is true and then here comes the colon all right and this value will be assigned if the condition is false it's just like if an else statement right let's say you know let's try it out let's try it out let's create a string variable alright let's say string statement and let's uh give a condition that is 4 greater than 2 all right now let's give the equation mark and let's write 4 is greater than 2. all right else else what we can do is 2 is greater than let's say 1 or uh just uh give me a second just give me let's you know let's uh change this whole statement all right change it will uh actually confuse you a lot let's change this whole statement uh let's say if 4 is greater than 2 then you can say 4 is assigned all right else you can write 2 is assigned all right let's make this simpler so here you can see that what i'm i'm trying to say right now also let's print the statement to see if everything is working right or not all right now let's try it out see it is telling us 4 is assigned because this condition is true and if this condition is true then only the first one first one statement will be assigned if the condition is false then the second one will be assigned let's change this a greater than sign to you know less than sign let's see see as this condition is false that's why it didn't assign the first statement it uh rather than assigning the first statement it assigned the second statement so that's how it works all right so it's just like if an else statement all right just in you know abbreviated form so i hope you are clear with inline f all right this uh this statement is very simple to understand now let's mark it as done and here comes our last one that is switch case statements all right see switch case now it's like you know pressing some switch if you press a switch up certain perform will um a certain you know certain function will uh performed will be performed and if you press on the switch um another set of functions will be performed right it's something like that all right now you can uh say all right see let me you know make it simpler for you the uh i can say that you know the switch statement is uh you know very similar to an if statement all right just that all right just that it does not you know work with a range of values all right it's simple as that it it's just that it doesn't needs any uh range of value it doesn't works with that all right it's it's a switch case statement now it requires you know um a case all right it requires a case all right which which you know is based on a single value all right it will be based on a single value and uh depending on the value of the variable all right it will be it will switch you know uh it will turn it will switch to some statement all right and the program will execute the correct block all right i know what this definition you know uh this this wordings might get a bit confusing all right i totally understand already when if i was uh in in your place i would also have got you know confused now to remove our confusion all right to remove our confusion let's code it all right let's code it first of all let's understand the syntax so it's very important to for us to understand the syntax okay see the very first thing all right that comes to us the very first thing that comes to us is which one can you guess switch all right in inside that switch you know inside that uh switch statement we pass a variable all right you pass a variable that would work as our choice all right and then we start you know two uh curly braces brackets and then we write a statement that is no case ah wait case all right and in that we pass some value and we give a colon all right and we say that bro do something all right do something and now see this choice now this choice will work as this value now if this choice all right if the value of this choice is similar to this value then this switch case statement will work all right and then we you know uh give another statement that is a break statement all right i would tell you what that uh what is that all right and what happens if you don't put that in there now here comes another case all right that is yeah let's give another value to all right and uh let's again say bro do something all right do something now again break now after that here comes default statement alright default is basically this default statement will occur if all right this default statement will occur if none of the you know none of the value works all right means none of the case works alright so this is the basic syntax right this is the basic syntax of switch case now there's no need you know there's no need to get confused all right there's no need to uh be confused let's you know let's create a a simple very simple grading system right like uh let me make you understand the logic in here basically what it will do now it will tell us all right we have to tell that uh which grade we got all right and then based on that grade it will tell us that the grade is good or not all right if it is good if it is bad it will tell us that all right so that is what we are going to code so the first thing i want you to create a variable all right that is care ch and assign it like let's say first for now let's assign it some you know value eight right now here what you have to do is write the switch statement and here pass the ch variable it will be work as our choice variable that i uh told you about right and in here right case alright and in that case give a single uh you know single colons and write a all right then if you want you can indent it then you know console. right line what i have to do as the grade is a i'm going to save very good right very good because you know the grade is really impressive right so now after that after that let's uh give another case that is case b now again write console.writeline we'll just going to write good all right b is also g grade b is also no bad all right so as we have defined two grades all right you can you can you know give more such grades in there all right you can add c grade you can add d grade all right you can get add e grade you can add f grade all right but for now for this example uh this this one is enough all right so see now let's give default all right one thing you would notice that i haven't uh you know uh gave the you know break statement all right i would show you why i'm actually wait let me write the break statement first because what will happen it will be more easy to make you understand how how this break statement is working let's give the break to every you know every particular step or you can say case all right now let's uh try and run it see as uh the you know as a grade is a it is retaining us very good now try with b it is telling us good now let's try with c it is telling us default why default because uh we haven't defined all right kc we haven't defined case c that's why it is uh going to the default block all right it's also you know very similar to if an else statement there's just a you know bit of difference now let's try and remove this break statements from there all right let me show you what is it exactly doing now let's let's start with a grade so here you can see it is giving us all right it is giving us some error or it cannot fall through from one case label case a to another all right in general all right in c sharp it is giving us error in java if you would code in java or any other language you will find that uh they are not skipping like uh after they are as i've stated uh a they printed the case a then without the break statement they are going to case b and without the break statement in case b they are going to default so that's why we use break statement in here of course in shop it's giving error but in java all right in java if you don't give break statement it will print like every other statement in there all right so that's why i hope you understood the reason why we give break statements right so yeah so make sure all right so make sure you understand alright you understand this concept uh very carefully all right because this concept is you know going to be very very very very useful all right and always remember this break statement now it it it is a jump statement alright statement is a jump statement it basically breaks the execution of after some condition is met all right you can understand that it like that all right so break statement is just breaks the work work like breaks the working of the statement right so this is it for uh this lecture all right see you in the next lecture thank you have a good day guys welcome to this lecture and in this lecture we are going to learn about loops all right uh see this is a very important concept already because we are going to uh use loops a lot all right we are going to use a loop or like loops a lot because whenever you will be developing something all right you uh you won't be like uh like if you don't want to do everything manually right you can loop through it all right for example if you are um what can i say let's say uh if you are let's say you uh like created an array all right you create an array i know you you might you you don't know the meaning of array as of now all right but that's totally okay i would uh like in in the next lecture only we are going to discuss arrays all right and for arrays we are going to uh need loops all right we have to understand the loops to like work with arrays right so see we can use loops in multiple ways like for example uh let's say uh we want to apply some materials all right so i i'm taking an example all right in terms of er like the application we are going to make during uh like after we learn euphoria right so the basic all right the basic understanding of the basic concept of looping is to loop through something all right look through something loop uh see the formal definition all right for loop would be loops are basically a way to you know iterate over something for finite or infinite number of times all right so let's say for an example all right let's say for an example do you remember uh i'm not sure if this happened with you uh but this happened with me a long time back i was in like you know in class fifth and at that point of time uh i was in uh like i i learned my first programming language all right that was q basic all right in class fifth i learned my first programming language and uh you know uh i got punishment at that time i was like uh like you know very you know what can i say a very naughty kid i used to like you know disturb my friends and because of that uh what i got it was uh they the teacher punished me told me that you have to write something i exactly don't remember i think it was i'm sorry you have to write i am sorry a hundred times all right and uh you know at that point of time uh i knew how to use for loops right i i understood the concept of follow-up i understood uh how to use it so then it came to my thought let's why not see the teacher is you know teacher is trying to tell us that you know uh you have to write i am sorry a hundred times right and you know teacher just wants it a hundred times she didn't told me how to write like i have to write it manually or i can you know use some dynamic way like you using a for loop tighter to iterate over 400 times and print right uh print i'm sorry right so what i did is all right what i did i basically i uh use the technique of for loop all right to you know iterate hundred times i use the technique of follow titrate hundred times and print uh i'm sorry a hundred times all right it like it uh completed in four to five lines and uh after i shown it to the teacher the teacher you know scolded me a lot all right and then gave me uh then told me that you have to write i'm sorry 200 times uh for you know manually and after that i never tried tried this with any teacher all right after that actually i never got punishment from class six so it never happened so uh in class fifth this incident was you know was a very funny incident for me because that was the first time i actually used for loop to save myself from you know writing the whole thing so that's the concept of loops all right loop actually helps us to you know reduce all most of the work right like for example uh right now i can give you all right hey brother uh write you know hello world a hundred times all right so you right now you don't know the concept of loops but you are a very obedient student uh and you will start writing like a console dot uh right line all right hello world right you will be writing that uh a hundred times right you'd be writing that a hundred times all right and that that's going to take a lot of time right that's going to take a lot of time so what we can do is we can use you know a loop all right we you we can use a loop to actually do it for us a hundred times all right so that it uh the computer will only perform the you know the function we don't have to do anything currently we are doing it manually but with the with the loop we can like make our computer do the you know write the hello world all right so i will show you how to do that but before that let's understand what a loop so loops basically are a way to iterate over something for finite or infinite amount of time all right so you know first uh let's understand how many types of loops are there all right see there are um three types of lopez all right that is let's first write it down in here all right the first type all right the very common used is for loop all right then another one is while loop and the third one is very least used all right actually i really don't use this loop anymore like i don't need it all right but you have to you have to have an idea about do while loop right so me that's why i'm teaching it right now although i don't think you will also be using do while loop in your career yet uh but uh i i never use like you know whenever developing applications i never use do i loop it it never came handy to me whereas i used for loop and while loop a lot right so that's why uh i'm going to teach you all the three loops today all right and we're going to start with uh fall all right see remember the concept of looping is sim simple all right concept of looping is simple it just tells that we are you know uh repeating ourselves all right looping means repeating all right we or looping totally means repeating ourselves over something right so that's the concept of looping but there are three different ways to loop all right that is one is for loop another one is while loop another one is do value all right and i would tell you all right when to use for loop and when to use while loop all right so make sure to you know listen to this lecture carefully so first of all let's understand the syntax of follow the syntax of for loop is very simple all right so the first is we have to write 4 all right inside the 4 we have to give brackets and the first all right the first would be you know first statement we have to write is start then we have to give a semicolon then we have to give a condition all right condition that for uh how many steps we want to run means for for how many times we want to run right now the next would be alright the last one would be steps all right that is how many steps we want to take steps means how many you know let's say if we give step as 2 then let's say we are trying to uh print numbers from 1 to 10 right so let's say if we give step as 2 then it would only uh like you know if we start from 0 then 0 plus 2 let's say it would give us 2 then 4 then some like it would give us like this all right then inside that would be printing uh like it would we would be instructing the program to do something all right so this is basically the syntax of follow all right now i told you you know my story of how i was punished right now let's try to implement that punish like let's try to implement that all right so for you have to declare a variable right so i'm going to declare a variable within the for loop only so for i equals 0 yeah it's uh and remember that i'm starting the value of i from 0 all right then i want to go till i less than equals 100 i want to go till 100 then i have to give how many steps i want to increment all right how many steps i want to go with so i plus plus means 1 all right every step will be incremented by one now if we if we want to you know uh let's say if we want to increment every step by two what we can do is plus sorry plus equals two all right but for now plus plus is totally fine with us so now what you can write console dot right line hello world all right so teacher told us that student write hello world instead of i'm sorry all right so now let's see if uh it is printed hundred times or not all right so you know there's not really a way to you know we are not able to count it right so let's uh give a plus sign and you know add the i in here let's see now yeah so here you can see that it's starting from zero and uh it is going from hundred going up to hundred now here you can see as it is starting from zero the total number will be 101 all right because if one is starting from here then zero is another extra one so it will be 101 times all right so to fix that we can actually start the loop from one or what we can do is we can you know mark it uh like give the condition as i less than 0 then what will happen it would start from 0 and end up to 99 so it would be total 100 it will be total 100 times we looped all right so that's how we you know work with for loops so for loop is a way to loop through all right some sort of you know some sort of condition now always remember we use all right we use for loop all right we use for loop when we know exactly how many uh how many iterations do we want like right so for in this example we knew all right in this example we knew that we are going to need 100 all right we are going to need 100 iterations so that's what we did we uh go we did 100 iterations in the program to print hello world so that's when we use follow all right so now as we have understood the concept of for loop let's you know let's try uh writing some programs let's try solving some problem program right i want you you guys to try it first all right so pause the you know pause this particular video after i give you the question and try it by yourself then uh come to this video and see the solution all right so i'm writing a comment in here let's uh write a program to print table of a number using for loops all right so what you have to do is you have to code a solution all right which will be able to print table tab uh all right it will be able to print table of that number all right so make sure you do that and uh right now pause the video and try it by yourself it's okay if you are not able to do it all right it just needs some more practice after uh practicing you will be very familiar with the concept of following all right so let's try it out now all right so for i'm going to implement it so for c first of all uh the very first thing i want you to do is to declare a variable all right that is in n alright this would be the number all right that is i want to create a table of two all right so now what i want is for int i because i want to start from 0 all right and i want to end up till 12 all right and i plus plus why because we aren't skipping any step we are just incrementing by one all right we are just we just want one step each all right now create another variable all right that is int let's uh you know let's name it f all right and uh what you have to do is multiply all right this value of n all right with i see remember how this is working first of all in the first iteration the first iteration two is multiplied by zero and the outcome is zero in the second iteration all right how it is reaching to the second iteration which is reaching to the second iteration by incrementing this i by 1 all right so now in the second iteration i will be 1 all right i will be 1 and 2 will be multiplied by 1 and in the again in the third iteration it will be incremented and it will be go to 2 all right then again 2 will be multiplied by 2. so it will be working like this all right so i hope you understand how how this program will be working all right then console dot write line and print the value all right and also make sure you know write it like this so just wait in let n plus given asterisk in here all right and uh plus i it's it's just a you know i'm just maintaining a decrement here all right it means i'm just actually let's leave this thing all right we will try this one later on first of all let me show you if it is printing the table of two or not yeah it is of course printing so two zeroes are zero two ones are two two two the four two three the six two fours the eight two fives are ten two six are twelve and so on it is going up to two twelve twos at twenty four right so we have successfully printed the table of two now let's uh you know print the table of 12 let's see if it is able to do it or not see 12 ones are 12 12 to the 24 12 36 and it is going up to 12 12 144 so that's how it is working all right that's how our for loop is working first it is remember it is iterating till the condition is met all right and for us the condition is 12. we exactly know how many times we want to iterate we know that we want to alter it 12 10 that's how we set uh that's how we actually set up you know the condition so that it iterates up to 12 all right now for each iteration it is incrementing the value of i that is in the first iteration the value of i is 0 and you know 12 is multiplied by 0 and it is printed and in the second iteration when it goes to the second iteration the value of i is incremented all right the value of i is incremented and this 0 is changed uh to 1 all right so and then uh again in that iteration 12 into 1 equals 12 right so that's how this whole thing is working all right so i hope you understand how this worked right now i hope you know follow this uh the concept of follow-up is cleared because right now i'm going going to go to a while loop so make sure if you are not uh you know not clear with the concept of for loop make sure you uh practice it a little bit all right watch the portion of for loop all right the one i taught right now so watch that again practice for loop wallet then only go to while loop all right so make sure you do that so now let's uh you know remove this whole uh syntax thing and let's mark for loop as done all right now here we uh go to the follow all right so what is follow why look sorry what is y loop yeah see you can say while loop is a brother all right brother of for loop alright it is also used for looping all right but the thing is all right while loop all right while loop runs all right while loop runs till the condition is false all right it will run till the condition is false and this proves one of our concept that for loop is only used well the for loop is only used when all that for loop is only used if we don't know how many iterations we want all right that's when follow is used all right as simple as that all right so now let's uh you know learn about the syntax so let me comment this out all right so there's the basic syntax we have to you know first uh declare uh a variable all right it's better to declare a variable at first then you know uh write the while all right and in here the condition will go on all right actually this you know this variable is not a part of uh the syntax but i'm showing you because you would be needing it all right then curly braces and inside that you have to you know alright do something all right so that's that is what the syntax of fault while loop is all right now you know uh i told you about the whole hello world example let's you know try to implement it so first of all i want you to declare a variable all right in time equals you know zero it should start from zero all right and give it a condition while all right while i is less than equals hundred all right i is less than equals hundred i want to print hello world all right i want to print hello world now one more thing all right in for loop remember how we were incrementing the value right do you remember that how we were incrementing the value by i plus plus similarly in here also we have to do something and we have to do that after all our statement is done all right that is for now our only statement is sponsored our heart right line and at the end we are going to write i plus plus all right now i will i will let you know what will happen if you don't give i plus plus but for now all right for now let's see what happens if we give it all right let's see uh the basic example see it is you know printing hello world till 100 all right it is printing hello world till 100 and it is stopping when the condition is becoming false all right it is stopping like uh say uh like see when it reached 100 when it reached 100 after when it was go it was going to 101 as the condition is not meeting as 101 is greater than 100 it stopped looping all right so that's how it is working so let's understand first of all we declared a variable declared a basic uh you know a basic variable all right we declared a variable i then we created a while loop in the while loop there's a condition i less than equals hundred now this condition will be like what can i say this condition is responsible all right for executing this particular line console.writeline all right and then we are going i plus plus that is incrementing the value of i by 1 all right that's what we are doing let's say if we you know let's say if we uh remove this i plus plus let's see what will happen see it uh you know this uh particular website now sort of crashed for for a moment like it you know it uh not exactly crash but you know uh what can i say to freeze or it freeze for a moment all right and here you can see the val you can't everything in here is zero all right everything in here is zero and at the end has a error that range error all right range error max buffer length exceeded that's because only that's because we ran into an infinite loop all right means it it is a never-ending loop it won't end ever all right that's why uh that's because we didn't give i plus plus the reason is what role is i plus plus playing is it is incrementing the value of i all right like for the first order for the first iteration it perform this particular thing then we are incrementing to one all right so then y is the second i uh means then one all right then one is the second iteration in the second iteration means the second iteration completed we incremented the value of i now one has gone to two so like this all right like this we are uh working on the for loop all right so if you don't give the i plus plus then what will happen then what will happen if we don't give the i plus plus then it will run into a infinite loop all right and of course we don't want that so that's how a while loop works all right so i hope you are clear with the concept of while loop all right and also one more thing we can you know we can write this i plus plus 2i plus equals 1 i plus equals to let's try it out with i plus equals 2 also let's see what happens so you can see that it is iterating even number of times like it is iterating half the number of times 100 so that's how it is working all right so that's how we you know code uh you know for loop all right now uh let's all right remember the uh program which i i taught you like to print out a table of a certain number right we are going to do the same thing with with while loop all right so the very first thing i want you to understand is write a variable all right n the that would be containing the number then right all right write a variable i it would be the counter counter variable means uh the i that we had taught you all right it would be incrementing the value after each successful statement right so now go to while i all right just wait while i all right is less than equals 12 all right what i want i want is to multiply all right multiply multiply the number n with i all right then after that i want to print it all right i want to print it console.writeline i want to print it then after printing it i want i am going to increment the value all right i'm going to increment the value by one so now let's see cool so we got the same output that we got for for loop right so that's how the it is working all right so i hope uh you are very clear with the concept of for loop and while loop all right so are you all i guess you also know how when when to use which right so we use for loop when we exactly know how many iterations we want and we use for sorry derive sorry sorry i guess i messed it up so again we use for loop when we know how many iterations we want we use while loop when we don't know all right when we exactly don't know how many iterations we want so that's when we use for loop all right and a for loop statement stops working when the condition know when the condition gets to false all right so always remember that now here comes our last looping statement all right and uh the least used ones all right this is known as do while loop all right it's a see do while loop now is uh you know very similar all right it is very similar to uh what can i say a while loop all right it is very similar to why look just there's a one difference all right in while loop if the condition is false from the starting point now it won't even execute a single statement but in do while loop even if the condition is false all right it will all right even if the condition is false it will execute once all right it will at least execute once all right so let me first uh make you familiar with the concept of do value means the syntax of develop actually so i hope you are familiar with the concept of you know do while loop so do first of all you need to write do then curly braces all right inside the curly braces you have to you know go for uh writing the you know particular code you want to give then you have to give a while statement in here then the condition in here to uh to be executed all right so that's what the syntax is it's a bit weird syntax right i know i know so now what you have to do is define i variable [Music] all right see we are going to uh you know write the same example we did last time that is the hello world one so then write do write do all right then console dot write line hello world then i'm going to increment the count or it means increment the value of i i plus by i plus plus or you can also do i plus equals 1 all right then in the while all right i'm going to give the condition i less than equals no 100 and then semicolon now let's try to run it so here you can see we actually got the hello world now to verify that if we actually ran 100 times or not i'm going to you know add i to the equation so now here you can see it has ran 100 times now you know what i told you just uh a few seconds ago that even if the condition is fall from the starting point do while loop will at least execute once all right so you know let's uh let's verify it all right let's verify it let's give if the condition is greater than equals 100 all right if the value of i is greater than equals hundred and of course the condition is false so here you can see here you can see with being all right even though the condition falls it at least executed once all right so that's what all right that's what i do that's what a difference between dual and while loop is all right and see you won't be using this uh do while loop much i'm very sure of that because i even like i've been uh like using unity engine for almost four years yeah so it's been almost i started in 2019 and it's been almost uh four years i've been using unity engine and uh it's been more like almost two years all right i guess two to three years i have been uh doing augmented reality development all right so here's the thing all right i have never used while loop all right i have never used while loop while developing uh games or ar applications so maybe in your case you might face uh you know some moment where you have used uh where you should use or can use do i look so it's totally totally okay all right but in my case i never used uh do while loop in my you know development journey so yeah that's it now here's something you know last alright here's the last uh concept we are going to learn in the in this conditionals oh sorry not in this condition i guess i forgot to change the name sorry i'm very very sorry so i'm going to change the name so uh in this looping all right in this loop concepts we are going to learn this last thing that is jump statements all right there are multiple jump statements c sharp like there's go to there's break there's a continue statement then there is return statement all right then there is throw statement but in this particular lecture we are going to learn about only two of them that is continue and break statement all right so they are very simple all right jump statements basically now they are a statement all right jump statements are basically a statement that instructs uh the flow of a programmer that instructs the program to deviate from its normal flow sequence and jump to another line of code all right so jump statements are commonly used in loops and other control flow statements all right you will also you you know use this in switch case statements often in uh if else statements alright so let's see what are these so first of all let me uh show you let me tell you which uh statements we are going to learn today all right that is break all right we are going to learn about break and continue all right we're going to learn about break and continue so let's implement it so i'm going to use for you for this already you can try out with while loop do i loop anything you want all right so i'm going to create a follow alright i'm going to iterate you know i trade this for loop over up to 10 all right i'm going to iterate this follow up to 10. um all right now what i want to give a condition all right let's say i want to print i'm i'm printing all right all all the numbers in here so i'm going to print all the numbers in here and now i what i want if all right if uh the i if i reaches to 7 all right if i reaches to 7 what i'm going to do is all right if i reaches to seven what i'm going to do is i'm going to break all right i'm going to break so let's see if this works or not see it didn't print it it broke it broke the program all right after i reached to seven it broke the program all right so that's what is it it is doing now basically uh break statements now after reaching some point a break statement helps us to terminate the whole program all right that's the whole point of break all right that's the whole point of break statement now here comes continue statement all right see continue statement is a bit different it will actually skip that particular value and move to the next value let me show you all right just give me a second so you guys might be thinking all right that i told you that continue statement skips some part right it skips some part and uh then moves to the next one alright but here in the output it didn't happen right because all right because here you can see before the if statement this uh console.writeline is being executed so in this case it already had printed seven then how is it going to skip if it has already printed it right so that's why to actually use the continue statement in this case what we do is we first of all we check for the condition and then we write console.writeline and now here you can see that we are able to print up to 10 by skipping already by skipping number seven all right so that's how this whole looping works all right and i hope this concept is very clear to you all right so yeah that's it for this lecture so see you in the next lecture thank you hey guys welcome to this lecture and in today's lecture we are going to learn about arrays all right arrays is a very important concept all right it's a very important concept in c sharp or any other programming language so uh like buckle up your belts and see tightly because it's really important for you to understand uh the concept of arrays all right because uh when uh see at this stage all right at this stage in the beginning stage you might have very less use cases for array even actually in the beginning stage also you'll be using arrays more often all right then you know so what i want to say is let's say take for an example in augmented reality only all right we we use arrays in a lot of things all right we can we like in plain detection when we want to like you know uh let's say we want to place all right place multiple objects into the real world all right means in marketless ar whenever we want to try to let's say place multiple objects in the real world we create an array of this object so that we can uh you know place them in the real world all right so uh you are going to use arrays in everywhere all right so it is one of the very important concept so let's dive into this topic all right without waiting anymore so see in general when we store values we use a variable all right but there's a problem all right the problem is the problem that comes with it is that we can only store one single one single value all right we can only store one single value we can't store multiple values all right and that's a problem if arrays or ratif arrays or lists or uh they wouldn't have been there now then uh we wouldn't have been able to you know store multiple values in a variable all right so what arrays does is arrays actually enables us right arrays actually enables us to store numerous number of value of any data type already it can be of string it can be of integer it can be of double it can be a float all right it can be of care so they help us already provide us uh a technology so that we could not we could store multiple values all right we can store multiple values within one single variable all right so that's how we use an a sorry that's what is an array is an array in simple words all right an array is a collection of data all right an array is simply a collection of data all right now as we have learned about what actually array is let me tell you about the agenda of today's lecture so today we are going to be uh going through the very basics of array all right that is we'll be learning how to initialize an array then uh would be uh learning how to access values within an array all right then it would be learning about some different different methods all right available in in uh an array all right so let's get started so the very first thing is that we have to understand how to uh you know implement an array all right see there are two ways of uh implementing an array let me uh first of all not in comments wait so let me show you all right there are two ways one is a dynamic way and the one is a static way all right i would tell you why they are called those all right first of all let's try out the dynamic way so the first thing all right see whenever you declare variable how do you do that so you can say into val equals 12 right you declare a variable like that now all when creating an array or when creating an array make sure all right that you don't miss the square bracket wait to put the square brackets you have to put the square brackets after end variable all right you have to put the square brackets after in variable after that this variable all right this variable you created would be considered an array all right it will be considered a a variable that can store arrays all right now to store arrays what we have to do is open curly braces all right and within that curly braces put some values all right 2 1 6 let's say 3 4 all right so now let's run it and let's check whether uh it's returning us any error or not all right so here you can see it is uh telling us your program didn't did not output anything all right don't worry about that alright because we actually haven't printed anything i would show you how to you know how to print each and every uh value within an array right so don't worry about that so this is one way all right this is one way of you know initializing or creating an array and this is known as dynamic array all right now another way around all right in creating array is you have to again follow the same thing that is uh int square brackets then give the variable name all right after that all right after that what you have to do is you have to write a new keyword all right then int then again square brackets now this square uh this square bracket has a spatial meaning i would i would uh tell you all right so what is the meaning all right see there's a reason why we call this type of array and static array the reason is we already all right from the start only when we declare the array all right from the start only we specify the size of an array that's what we are doing right now so in this square brackets we have to give a size of an array so let's let's give it five all right so now this is a static array all right this is a static array it doesn't have any value in it means uh of course it does have all right it does have value in it but all right but it is static the reason is we have already all right we have already initialized this array all right we have already initialized the array and uh because we have already means declared the size of the array because we have already declared the size of the array in the memory all right in the memory it has created a static space already the ram it has created its own memory that cannot be exceeded all right so that is it now after after this whole bracket thing what you have to do is again open uh your curly brackets all right and after that write the number you want to give all right so yeah that's how we declare a static array all right now let's again uh run it and let's see if it's retaining any any around no it's not returning any error because the syntax is totally correct all right now all right see the difference now the difference between both all right both dynamic and static array all right is basically it means now see static why is it called static audit why something is called static static means which can't be changed afterwards all right which we can't change afterwards what if it is declared on the start it is declared declared all right we can't actually change it or means we can't actually add something more up to it all right we can't exit that memory all right but dynamic means it is you know uh what can i say it is adjustable in the runtime dynamic is adjustable in the right time so that is what the you know that is what the difference is between dynamic and static all right i hope uh you are clear about this all right so yeah so i'm going to uh keep working with dynamic arrays only all right now here's the thing all right so we have learned about uh initializing array we have learned about what exactly is an array all right now let's you know learn about uh accessing values within an array all right do you remember when i uh taught you about the window in the audience in the second lecture only i taught you about indexing all right i hope you remember the concept all right but if you don't let me uh tell you indexing now it defines all right indexing basically defines positions positional value of some data all right in simple terms it means all right it means let's say there how many how many elements are there in this you know how many elements are there in this particular array there are total five elements all right and if we start indexing them all right indexing uh in in uh in simple words you can you know you can understand indexing as uh um basically address all right means exactly uh if we talk about memory address of any variable it's totally different it's totally different topic i'm just trying to make you understand how like what is indexing with indexing now it's uh think of it as an address of someone all right like uh for example i am priyanshu all right there are two priyanshu right and uh both live all right both live in two different uh like two uh different places all right but both are priyanshu uh both are means whose name and title are totally similar all right but how will how will we uh know that uh priyanshu uh means the priyanshu he is finding is the actual one all right so that's how address comes in all right the person will ask for the address and if the address is right he'll get to the right financial so basically now indexing is basically the positional value of some data it's simple as that it's it's the address of some data like see uh for two the for the first element all right the first element of an array the address is zero means in the index value of first element is zero the index value of second element is one the index value of third element is two and it goes like this all right it always goes like this so that is what indexing is and this is how indexing will help us accessing the values all right now let me show you so uh let me uh show you by printing it all right so i want to access all right i want to access let's say this all right three three from the array so how would i do that so let's count it so as it is starting from zero zero one two three all right so this is in the it is in the third position so what i'm going to do is i'm going to write 3 in here and let's see if it works yeah we got it right we definitely got it because the positional value of 3 sorry the positional value of three is three right uh if if you are confused all right let me let me uh give uh give you another way around all right so let's say i want to you know um access this alright uh this particular value already means i want to access the six so how would i do that so let's count it 0 1 2 so it is in the second position right so now let's run it so here you can see we are with the index all right with the help of index values we are able to access it and always remember whenever you want to access index value now uh write the variable name then open uh square brackets and inside that put the index value all right so this is how we access all right this is how we access values within an array now let's say if we uh let's say i want to print all right each and every element within this array all right i i let i want to print each and every element within this array so what i'm going to do is for in thai equals zero i less than equals all right how many elements are there one two three four five right so what i'm going to do less than all right val dot length all right see this is a method all right you already learned another um for your first method all right dot length all right see this dot length method now this length method returns the total length all right the total length of your array all right so as our total length is you know 5 that's why it has returned 5 now here's comes the problem here you can see what i've written in equal 0 i less than means it will iterate less than 5 all right do you know why it is ideal and why this solution will work and why why not less than equals will work actually it is better to try by yourself actually uh pause this video all right pause the video try both the uh both the way all right try both the way and check which one is running all right i will show you right in here just give me a few seconds so now uh as we have you know try to access as we are trying to access the values with each and every value what i'm going to do is i wrote console.writeline then i'm going to take the variable name the square brackets and i'm going to put the i inside because you know with every iteration the value of i is increasing all right so here you can see we got all the elements we got all the elements because we started from 0 zero is this one all right and ended with four all right and the fourth positional value is of this one right now let's try out less than equals one let's see what happens let's see see it has printed but here you can see it has returning us error now what's the error index was outside the bounds of an array the reason is the reason is the length of an array or the length of an array is uh 5 all right the length of this array is 5 but indexing ends at 4 all right and we are trying to access the elements of we are trying to access the elements of this array through indexing so if there is all right if there is no element present if there is no element present in the fifth position all right if there is no element present in the fifth position then of course it will return error it because it doesn't have any value all right now here's a fun fact all right here's the fact that you you must know all right like i guess i forgot to tell you about this like when we create this kind of array now just wait when we create this sort of array all right if we let's say if we don't assign values in here now like i assigned previously if we don't assign those values in here now it will automatically like automatically zero all right zero will be assigned to each and every position all right so this is for a fact and you guys must you know know it all right so now we have learned the very basics of array right we have learned how to access elements in an array right so now it is our time to look into the methods all right the methods are present in an array all right you already saw all right you already saw method length now let me show it to again so here i am declaring a variable that is int val all right so into val then let's give it uh 5 2 0 a 7 let's say 3 nine eight so here you can see all right we got uh we created our own array now the first method we are going to learn about is length method all right and you you already know uh what exactly is length right how length method works so what i'm going to do is console.writeline val dot length all right so what this will do it will return all right it will return us the total length of the array so here it is returning 6 because there are six elements present in the array similarly we have let's say we have another variable all right we have another variable uh not exactly a variable just uh just so we have a variable of array all right so we have a variable of array now what we have to do is now what we have to do is we have to uh learn another function all right and that function is basically sort function all right see sorting or sorting is basically rearranging uh re and rearranging you know the rearranging the values all right means the gibberish values in an ascending order or descending order all right so that is what uh you know uh sorting is all right so here comes the function all right so this is the sort functions first of all let me remove this length one because uh of course we don't need it anymore now what we have to do is let me show you that we have uh you know i have an array initialize now what you have to do is you have to write a function array dot sort all right and inside the sort for function we have to pass an argument and that argument will be an array all right and now what you can do is for int i equals 0 i less than array all right so oh sorry not array val dot length i plus plus all right and let's uh try to print it all right let's try to print this value all right let's let's try it out let's see let's see what happens all right currently uh this is uh this this particular array is not ordered all right and now to make it ordered we use the sort function so here you can see it has uh arranged all right it has arranged all the uh elements in an ascending order all right so that's how uh this thing works all right so now we we are going to learn another function already that is index of alright this is index of function that is it will return the index of some value all right so you already know how this works right i guess i showed you previously means not in this uh and not in case of arrays so int idx equals array all right dot index of all right and within that we have to pass two arguments the first one would be the array all right means the array from which you are looking for the value and the second one will be the value means the value on which you will be taking out the means uh you you have to put the value uh which you want to get all right means which you want to get in the sense let's say i want to put a value and i want to get its index value right so that's what i am i will be doing so i am just going to put a certain value in here so i'm going to put 7 in here all right and you know let's uh let's print it all right console dot writeline idx all right so let's uh run this program and let's see what happens so here you can see it is returning 3 the reason is 0 1 2 3 7 is available in index 3 all right so that's how this whole index of function works all right now here comes three more functions all right that is maximum minimum that is max min and sum all right so the meaning is hidden in their name only so it's like the max function all right first of all understand this math function max function will return the maximum value available all right the maximum value available in array the min or the mean function will return the minimum value available in the array ah and the sum all right the sum function will return the total sum of elements from the array all right so let's uh try to print it out alright so console dot right line all right and inside this val dot max and give parenthesis all right so now let's see what is the maximum value in here in our case the maximum value eight is eight now let's see the minimum value and that's totally right and let's see the minimum value the minimum value is zero and that's also totally right now let's print out the sum of you know the sum of total uh array so you can if if you want you can perform the calculation and you will be surely getting 25 all right so these are the array methods all right that you must like you must have an basic idea about all right and uh i would suggest all right i would suggest you guys to look more into arrays after this session also all right because array is a very important concept all right and uh there are a lot of algorithms that works on arrays like there are multiple sorting algorithms searching algorithms so i want you guys to have a very good idea and understanding of arrays all right so make sure you do that and so yeah that's it for this lecture see you in the next lecture thank you yo we are going to learn about functions in c all right see functions uh are a very important topic all right in terms of programming all right the reason behind that is because functions uh helps us to manage our code all right it uh helps us to you know lower the number of codes we write uh function helps uh our means uh function helps us to keep our code clean all right so function a function has a lot of use cases all right in uh when you will be developing all right your ar applications you'll be working with functions all right like uh update all right like the update method in unity is a function the start method in a unity is a function right so basically functions and methods all right are an essential part of programming any software all right see whenever we code we have to follow a very simple principle of dry now what is dry dry means don't repeat yourself all right why because it increases the code quality it saves a lot of time all right and functions uh in simpler terms functions or methods are basically a block of coder right they are basically a block of code which can be used anytime we want all right without repeating ourselves all right like for an example you uh i have implemented an algorithm all right that is a sorting algorithm let's say you have implemented a selection sort algorithm all right now you have to use that algorithm at multiple places in your program right so the let's say the algorithm is of 10 to 20 lines all right for example now the problem would come that if you like you know manually write that algorithm in each and every portion now it will increase the code base all right it will increase the code base then it will uh you know cost you a lot of your time all right and time is money right so uh what function does is we can create a function of that particular sorting algorithm and use that function everywhere all right so that saves a lot of time and makes the code base more optimized so it is very important all right to understand the concept of functions all right so basically there are two steps through which we can you know use a function the first is we have to create a function all right and the second is we have to call a function all right now see call i would show you what what does calling a function means is all right see for an example if i had to show you a function right now this you can see this main method right in here all right or main function right in here is a function all right the difference between a regular function and this main function or the main method is that main method calls itself automatically all right it is called automatically whereas a regular regular function has to be called by the user all right or the developer so ah this is the major difference between a specified means of this main function and a regular function all right now by calling it we means we have to you know call the function we have to say to the function that function do this task for me then only the function will work all right he won't do the task by himself we have to command him all right so that's why we call a function okay now as we have discussed about function one more thing is that you have to keep in mind whenever creating a function now you can't write means create a function inside another function all right always remember that so whenever we create a function it should be outside a function alright like this public static all right void set score all right and like this all right we create a function like this now i know this might be a bit confusing all right so i'm going to explain you each and everything first of all let's start with the syntax right let me comment or create a comment third line all right in this commented light the first or all right the first that would come will be an access modifier all right the very first thing will be access modifier i will tell you what exactly is access modifier all right after that there will come a return type all right after the return type all right you have to give your function a name all right and then you have to give a parenthesis all right inside the parenthesis you can add parameters what are parameters parameters basically takes uh it is basically a list of arguments all right that we provide like like uh an array.sort function that i taught you in the arrays lecture what happened in there we provided an argument inside that sort function right so that's how uh that's why we use parameters so parameters would come inside this function means this parenthesis and then you already know what to do open and close curly brackets all right and inside this you have to put some code all right now you know let's see the actual code for it first of all all right here you can see we are writing a function first of all we are giving access modifier all right public all right void all right and then what you have to give is a function name what would be the function name the function let's set the function ms set scope all right and now inside this function we have to give all right some write some code that is console dot write line and inside this you have to print something let's print hello world now to call this function or let's say let's rename this function to hello world only all right so now to call this function what we have to do is just wait yeah to call this function what we have to do is we have to write the function name like this and then add parenthesis into it and let's run it so here you can see all right here you can see it is giving us an error what is this error it is telling us an object reference is required to access non-static member all right the reason is we didn't give any reference to the object alright and currently as you uh have not learned about object-oriented programming we'll be learning about object-oriented programming in the next class so here's a keyword all right static all right right now you don't you know you don't have to put your mind into the keyword static and public all right because uh these two keyword will make more sense after the next lecture all right because uh these uh these two uh basically these two keywords uh are mostly used in object-oriented programming only all right so now let's run the program and let's see what happens see we are able to get the output all right now uh i would explain you all right i would explain you this code all right what exactly are these first you can see we are specifying an access modifier that is this one this is access modifier now what is what exactly is an access modifier access modifier is like a gatekeeper all right like uh like let's say you have a security guard in your house all right the secret the you have guided means you have told that the security security guard that you are like you don't want anybody to uh disturb you all right so at that point of time here you have gone private but if your security guard if if you haven't like if you have told your security guard that brother uh if anyone comes to meet me then let him inside all right let him come inside so then you are public all right the security guard will let it go it's the access modifiers are also something like this public and private all right public and private public means you can access that particular thing from any class all right whereas private means you can't access that particular thing let it be a variable or method you can't access it outside of their class so i know this might be my this might seem a bit overwhelming or maybe it might seem you know a bit confusing but that's totally okay because all these concepts all right you will get a grip on all this concept after the next lecture because in object-oriented programming we are going to learn more about methods we are going to learn more about access modifiers we are going to experiment with it all right so don't worry all right now so as we uh i hope the basic concept of access modifier is clear it just access modify helps us to modify the access all right it help us to modify restrict the access of any variable or of any method all right so that is what an access modifier is next here comes the static keyboard all right don't worry about that don't worry about the static keyword all right let me uh i'm going to explain the stat keyword uh uh in the next lecture alright because this static keyword is one of the very important uh concept that you should know all right after the static keyword comes return type all right return type all right return type is basically what kind of value we want to return to the function all right return type basically defines what value can be returned to the function it can be of void all right it can be float it can be string all right so now see access modifiers can be of multiple types all right it can be boolean all right it can be of bool it can be you know of a float it can be of string all right another type uh is void in a void all right in a void return type we didn't we do not need to return all right we do not need to return anything in a void you know in a void function but let's say we create a function with a different return type let's say in all right so public static int all right let's say we are you know let's let's create a function that would you know give us the square of some number so let's write a function that is square off all right then in here what i'm going to do is i'm going to create a variable all right that is int let's say square square all right square off square off i'm going to create this variable all right in here the s is small and in the function it is uh in caps all right so don't worry so now what i can do how to you know how can we exactly uh make a square of the number right multiply that number with the same number right so here i'm taking an parameter all right so the parameter would be uh integer n all right you can take as many parameters you want all right i can even uh take another parameter as a float all right i can even take that that is float n one all right i can do that so the thing is i you don't you know you don't have to be like uh the function can only take one parameter you can give as many parameters you want all right so now as we have given the parameter we are doing it n into n and after that i'm returning all right i'm returning we we are using the return keyword i'm returning this square off all right i'm returning this square of variable to the function now in here as we called this function it printed us hello all right but to you know get the value of this function all right that is the square of function it would be a bit different how let me tell you let's try it out actually all right let's take the square of you know square uh square of function and uh let's put a value let's say 2 we want square of 2 now let's run it let's see see here you can see your program did not output anything the reason behind this it is not printing anything it is returning the value to the function now to print all right now to print the value of the function what we have to do is we have to store this uh we store the returned value into a variable so how would it how do we do it do that so create a variable that is in final you can name it anything after you have stored it like this then you can do console dot write line final all right and after that you can simply print anything all right i mean simply print it now let's say try out a square of 4 so the square of 4 will be 16 right so here you can see that it is giving out the output as 16. similarly you can also create your return types as boolean all that you can create your return types as string all right one more thing you have to keep in mind if you are specifying a return type like ink you have to return integer values only if you try to return float value floating point or string value uh it would give you error all right so make sure uh you practice on this all right and don't worry about the uh access modifiers and the static keyword all right because in the next lecture in the next lecture that is uh where we'll be exploring classes and objects that is a basics of object-oriented programming there would be lo there you would be learning about the static keyword the you know about static classes you'll be learning about objects or that you'll be learning about instances then you would also be learning about this access modifiers how we use them right so you'll be learning all those things in the next lecture so don't worry if you are if you are confused somehow by the next lecture the functions the topic of functions will be very clear to you but if i had to say in a very simple word functions are just basically a block of code that help us to reduce the uh means reduce the lines of a code all right we can reuse that function and always remember don't repeat uh always follow the principle of don't repeat yourself all right like let's say if you are creating an algorithm then uh create a function of that algorithm so that so that you can use that function anywhere you want all right so make sure you follow the principles of dry all right so yeah that's it for this lecture so in the next lecture we are going to learn about classes and objects in this lecture we are going to learn about object-oriented means the very basics of object-oriented programming all right and in that we'll be learning about classes and objects all right so this is the very basic of object-oriented programming there are many other concepts already that you would be needing to learn but for now for the starting all right for starting uh this is the topic that i'm going to teach you alright we'll be learning about classes and objects we'll be learning about fields we'll be learning about methods that is class members all right we'll be learning about you know constructors how to create a constructor we are going to learn about access modifier static keyword we are going to learn about static classes all right so without any further ado all right let's start with the lecture all right see to understand classes and objects now understand this object-oriented programming all right we have to understand the uh very fundamental concept of object-oriented programming what exactly is it see object-oriented programming is basically an approach all right that breaks a programming problem into you know uh objects that interact with each other all right basically objects are uh created from you know templates and those templates are known as class all right ue actually we actually can you know think class as a blueprint all right class as a blueprint and you know just like a you know a blueprint of a building all right and from that blueprint of a building we build an object that is the actual building with bricks and mortar and all those things right so that's what object-oriented programming is all right so i hope this uh you have understood what exactly object-oriented programming is right now as we have understood what exactly object-oriented programming is it is our time to understand about classes all right as i told you class is like a blueprint right like here you can see this is a class public class program right inside there is a method that is the main method right so we can write our own class now to write our own class first of all remember you can't write a class inside another class all right you have to write a new class outside of that class all right so what we have to do is write public all right public class all right and give the class a name all right give the class a name and let's give the class a name as person and then what you have to do is you have to open curly braces and close it so this is how we write a class all right this is a public method this is the class keyword and this is the name of the class all right so that's how we create a class all right now there's some there is another thing called fields all right to understand field you can say fields are you know variables only all right they are variables only a field is simply a variable that is we know we declared we declare inside a class all right like any other variables all right they are used to store data like here you can see we can write public all right in or let's say public string name of the person all right then we can write public in age right so this is how we are this this is called fields all right so this is are called this is called fields all right now here you can notice that there is public keyword and you know in front of all the variables all right so they are now they are known as access modifiers they are basically gate keepers they you know control who has access all right who has access to the uh fields or methods now the who in this case is another class all right now if we make this to private now this program class won't be able to access this uh variables from this person class all right now to you know uh to access this class we have to create an object of this class all right so i'm going to teach you how to do that but before that let's learn how to create methods all right let's learn how to create methods inside inside a new class so it's or it's also similar like this public static void main just like i uh taught you in previous lecture about functions so what you can do is public all right static void and let's give it a name all right let's give it a name that is uh get name all right and in here it is not necessary to give the static keyword all right i would there's a reason behind that i will you would be learning that reason after you know after we get into the concept of static keywords so don't worry we are going to get in there all right for now remove the static keyword for now remove the static keyboard what you can do is console dot right line all right and uh write it like this name is uh get the you know get the name variable in here all right get the name variable in here and similarly do the you know same thing for the age variable all right ages all right so now what you have to do is now we as we have created our method as we have created our method what we have to do is we have to create an object of that class all right or in simple word an instance of that class what does that mean see an object is created from a class all right we have already create created a class named person so now we can use this to create objects object is basically an instance of a class all right to you know to create an object of the class we use the new keyword let me show you how all right so it's very simple what you have to do is first what you have to do take the class name that is in our case the class name is person after that give you know give it a name that is i'm going to named p for now and then put equals to in there then write the keyword new and then again call the class like this all right and then give parenthesis to it after that if you run it let's say if you get any errors or not you are not getting any error so that means we are good to go all right so now here we have created an instance of a class or you can say an object of a class all right we have created an object of a class now as we have created an instance of the class we can you know also access the fields and methods available inside the class from our program class all right and make modifications to it all right like in here all right so what i first what i can do is p dot all right here uh first of all to access you know to access the you know fields and methods of the class you have to call that right so what you can do is here you have renamed the class right that is you have name the object as p so write p in there then dot all right then give the variable name and set the variable name to you know anything let's say your name all right and after that set it uh set the age value to let's say uh my age currently is 17 all right so i'm going to put it like that after that all right here you can see uh let's change the name to gate details actually yeah that would be better so now here you can see let's actually uh try it out let's see if any error is coming or not so here you can see we are not getting any error now now let's get the details let's see if uh like the means uh in the object the details we have filled has been set or not to do that what if as i have created a you know method that is get detail so what i can do is p dot get details and let's see if everything is working or not so here you can see all the things in here are working now you can create all right you can create multiple objects all right you can create as many objects you want all right like this let's let's try another one that is person p equals new person and in here what you can do is p dot name equals let's uh you know give it row hit all right and let's give give its age also you know 18 let's give it and now let's see oh all right always remember i did a mistake i you know name both the cla or means both the instances with the same name so don't do that all right change the name in here my bad so now what you can do is p1 dot get details all right now let's see if this works or not so here you can see both the uh instances are working so this is how we create a class and we create an instance of that class all right so this is how we do it now see the fields and methods inside all right the fields and method inside a class all right like this is the field all right this variable is a field this variable is a field and this is a method this uh this whole thing is a method so they are often referred as class members all right they are the member of the class called person all right so make sure to keep this in mind all right so now as we have learned about you know classes and objects now it is our time to learn about constructors all right to learn about constructors i know it uh this you know this term might seem a bit unique you know confusing but don't worry all right don't worry i'm going to tell you how to do it all right see what is a constructor a constructor is basically a special method all right that is you know used to initialize objects the advantage of using a constructor is that it is called when an object alright it is called when an object is created it can be used to set initial values for fields all right means right now all right whenever we are calling this you know whenever you are calling means creating an object of this class no value is being set by default all right we are not able to set any value by default we are setting them later on what constructor does is whenever we create an instance of a class a constructor is called all right a constructor is you know is called so to you know to set means to create a constructor it's very simple what you have to do is public all right then you have to write the class name all right you have to write the class name then parenthesis it it just looks like the function just you don't have to give the return type all right then in the person in the person i'm going to set all right i'm going to set the name to let's say default human and the age to let's say 100 all right now you know let's remove the uh previous code all right let's remove the previous code and let's see how this whole constructor thing is working right see i won't be setting the name uh right now what i'll be doing is i would just i would just be you know uh creating an instance of the class and then we'll be calling this method directly i won't be setting the name right now you you will see what will be the output all right so let me show you so first of all what you have to do is create create an instance of the class so how do we do that person p equals new person all right semicolon and then p dot get details all right and in here let's see if it works or not so here you can see here you can see we didn't said uh set the name all right we didn't set the class name in here we didn't set it explicitly all right we didn't set it explicitly the constructor all right the constructor is called when the object is already created so that's why by default by default the constructor has set the variable name and age to the specified value and in our case for the name the specified value is default human and for the age the specified value is 100 all right i hope you understand that you know the concept of you know constructors all right now there are a few pointers that you need to remember all right a constructor name must match the class name all right and uh always remember our constructor cannot all right cannot have a return type all right and all uh remember this a constructor all right a construct is called whenever whenever an object is created or you can say an instance is created of the class all right and always remember uh see all classes now have constructors by default all right all classes have constructors by default if you don't create a constructor by yourself now the c programming language all right or any other programming language will create a you know default constructor for you all right by himself all right by means the c sharp will create uh automatically a constructor for you all right however the problem with that comes is that you won't be able uh to you know set the initial values for the fields so that's a problem that's why we can you know we define a means we define a constructor manually all right so i hope the concept of constructors uh classes and objects are clear all right i hope you have you know understood the concept of classes objects and constructors you have understood about i hope you have understood about fields and methods about class members so now our next topic all right our next topic is of constructor parameters all right like you know in functions how how i told you about parameters uh this is also something like that all right this is also you know same so to create a parameter what you can do is in within the parenthesis you can create variables all right that is you can create parameters now let's create a parameter name all right and let's create another parameter as age after that what we can do is what we can do is we can remove the default human from name and set it to dash name and again do the same thing for age to dash age all right now what is the you know what is the benefit of it let me show you all right let me show you the first of all this will reduce the lines of code all right this will reduce the lines of code by a lot so now as we have said the parameter it is very simple you know it is very simple so i'm going to create another object that is let's say person all right person b equals new person all right and then p dot get details and now in here here you can see there are parenthesis inside of this parenthesis we pass some value so how do we do that it's very simple first of all the first parameter is a string so we are going to give it a string that is priyanshu and the next parameter is age and we are going to give it 17. now lets run it and here you can see just within two lines like previously we were using four lines now we have reduced it to two lines so now here you can see we are getting the same output we got previously all right so that's how they save a lot of time time so i hope constructors the concept of you know the cons concept of constructors are clear to you all right because the next two topics are going to be very interesting that is access modifiers and static keyword all right so let me show you see access modifiers basically defines from where we can you know access our methods and variables from so far there are two access modifiers that you that you should know all right that is public and private now public means that you know we can access the class members from outside the class whereas whereas in other side private doesn't allows us to access the class member outside the class but only can be accessed within the class all right so i know it might uh you know it might seem a bit overwhelming or uh you know it might get a bit confusing but that's totally fine all right that's totally fine the thing is i'm going to show you show it to you by doing it practically now let's remove this constructor because we don't need it as of now all right let's remove this all right now in here let's change the name all right let's change the public keyword to private all right let's change it to private now let's create another instance that is person p equals new person now in here p dot name equals let's set it to you know priyanshu all right again let's set it to priyanshu and again let's set the age to let's say 17 all right and let's get try to get the details now let's see what happens first of all let me ask you will it return an error or will it work will it work or return any error just give it a thought all right pause the video give it a thought and then return so i'm going to show you here you can see there are three errors the errors are the uh hello world all right the person.name means this is the name page hello world all right the person.name is inaccessible due to its protection level again another is person dot age is inaccess inaccessible due to its protection level the same goes for personal.getdetails is inaccessible due to its protection levels so because of the private all right because of the private you know uh this private keyword what is happening it made our fields and methods private so we can't access the variables and methods outside of the class whereas with public keyword we can do that right and uh let's say uh there's another way to you know make uh you know field or method private is that you can simply you know remove the private and it will be go to private by default but you know i don't you know i i always like to write private because i i don't know but it seems really good to write private at first so that's why i always write private and i also suggest you for initial stages all right for initial stages uh write private all right if you are creating any private method then for initial stages write private all right so that you know you get it more clearly that what is the use of private so i hope you are now clear with the concept of access modifiers what are public and private all right now there are two more access modifiers that is you know protected all right protected is there and uh so you can you know learn more about them all right you can learn more about them you can search about them you can learn more about them all right through google so make sure you do that now next all right the next concept we are going to learn is static keyword and static classes all right so first of all let's understand the concept of static keyword all right see the static keyword actually helps us to get access to the class members such as variables methods etc with it without needing to create an instance or object of the class whereas um i hope you understood this right right now all right let's make this you know variable to public as of now let's make them to public so now here you can see we are creating an instance of the class right we are creating an instance or object of the class to access these variables right we are creating an instance of the class to access these variables now the thing is if we put a static keyword already if we put a static keyword in front of every variable or field of method like this static all right static public again public static and let's you know let's not create the object now what we can do is person dot name equals priyanshu sorry then person dot age equals 17 then person dot get details now let's see if this works or not see this is working this is totally working now let's again try the same thing without this you know static keyword let's try it out let's see if that works or not here you can see it is uh telling us an object reference is required to access static member so non-static member so here you can see remember all right always remember if if we if it creates if we make something static now we don't need to create an object of that class to access it we can access it directly but if any variable or method is non-static all right like currently this uh all these all these methods and variable right in here are non-static alright that means they are not static so we have to create an object of of this particular class to you know edit or you can say access all the fields and methods present inside the class all right so i hope you are clear about this so basically what we get static keyword helps us to get access to the class members all right without needing to create an instance or object of the class all right so that is how the static keyword helps us all right i hope you are you know clear about the static the concept of static keywords now what we have to learn all right what we have to learn is about static class and this is the last concept that we are going to learn into today's lecture see just like we learned about you know uh this static you know variables basically let me tell you in uh you know just like having uh static methods or fields or properties or constructors we can also have you know static classes you know our static classes can only contain static members all right a static class can only contain static members that means let's say if i you know create a static class right now and again let's let's uh you know let's try the old step we are doing like creating an object let's uh do it now all right p p dot you know p dot name equals uh let's say priyanshu then uh p dot h equals 17 then p dot uh get details now you uh you'll be getting an error all right the error is cannot declare instance members in a static class cannot declare instance members in a static class the reason be the reason is all the variables and method right in here all the variables and method right in here is non-static and let's let's turn it to static as of now all right let's turn it to static and let's see if we are getting an error or not here we are getting again an error the reason is the reason is not because all the all the variables are in here are static the reason is because as the class is static we are trying to create an instance of the class and that is not possible because uh stat we cannot create instance of a static class we have to direct we have to get direct access to it right so for that person dot you know name equals uh uh priyanshu priyanshu then person dot age equals 17 now let's do it person dot you know get details as let's see it now see it is working like that so this is what a static class is all right so i hope the concepts of classes objects fields method class members then access modifiers and you know static classes are clear all right and this is going to really help you to understand how we you know work with c sharp in unity all right so as of now this module all right in this module we have completed our lectures we we have successfully completed this lecture all right so next will be start creating our own ar applications all right with euphoria so yeah let's get into the next module thank you hey folks uh welcome to module 4 and this is the first video of module 4 and in this lecture i'm going to explain you all right we are going to dig deeper into the concepts of marker based augmented reality that is we are going to learn about the architecture we are going to learn about the available sdks we are going to learn about how things work in market based augmented reality all right and later on i'm also going to tell you what you uh what means how like which tools are we going to use to develop our uh like ar applications right so without any further let's get started so what is see first uh let's recap all right first uh let's recapitulate our concepts of uh market-based augmented reality all right see market-based augmented reality all right uh this is a type of augmented reality all right that makes users that that makes use of uh recognition and tracking alright it is the property of or you can say it is the uh feature of computer vision all right so it make uses the uh properties of computer vision that is our tracking and recognition all right to to uh recognize and track a marker and uh put all right and place or augment a 3d object or any kind of digital objects on top of that marker right you can even augment a video on top of that marker so that is what marker based augmented reality is all right um so yeah that is what marker-based augmented reality is you can even see the diagram right it's not exact diagram but the gif right in here uh there's a mobile and there are some a b c d uh are written some alpha alphabets are written and they are working as a marker right in the sen in the center marker the batman is like the lego form of batman is uh placed so this is what marker-based augmented reality is it basically makes uses of markers to uh augment all right to place digital objects into a real world that's just it all right now if it uh see we already know what uh what our marker based augmented reality is now it is our our a very time alright it is our time to understand uh or learn about different types of game engines all right different types of development engines available all right if we talk about uh there are multiple available in the market alright these are just some of them right i have i have just listed down some of them but there are many others available in the market all right if we talk about the things that are the engines that are available here uh that is unity unreal go dot cry engine then uh if you want to uh develop your own ar filters let's say for uh you want to develop for uh instagram or facebook right there is park air studio that we are that i am going to cover in this course also so this is the bonus section all right in the bonus section i'm going to cover the sparkier studio similarly uh if you if you are a user of snapchat and you want to create your own uh filters for snapchat then uh there is there is lens studio all right these are augmented reality technologies all right um then then there is appertus vr although i haven't used uh used apart svr uh the engines that i have used till now right the the development tools that i have used till now is unity unreal go dot uh i have tried out cryengine but it wasn't suited for me i didn't like it so and another i used was sparky studio all right i haven't used lens studio or apertures vr but you guys can try it out all right uh so these are the development engines uh that are currently available in the market and the most used all right in the in the field of augmented reality and virtual reality and mixed reality the most used is the unity all right like the major major companies uses unity for developing arvr applications unreal unreal engine also is also used so these two are the main like major uh development engines that are used even go dot uh godot supports uh a ar vr you can even you can try it out same does a cry engine two they also support ar vr all right so you can try these out all right and in this course i am going to teach you unity all right and we are going to cover uh the ar ar part with unity all right so as we have learned about the development engine now it's our very time to learn about the software development kits available all right here you can see there are multiple available like like google's ar code then there is kudan then there is apple's ar kit then maxed is there then viewforia 8th wall xr then lightship ardk then easyar is there and wikitused is there right see these are uh software development kits that is sdks the they come in packages all right they come in packages all right and in this course i'm going to cover the euphoria all right i'm going to cover euphoria as viewforia is very famous and very good for marker-based er and it is also easy for beginners so it is better to cover euphoria in this course so i'm going to cover euphoria all right and the tracking tracking feature of euphoria is better than any of these all right means better than any other uh marker based ar technologies all right so that's why i'm going to cover euphoria in this course and also if i if i tell you which sdks have i have i tried i have tried out uh ar code i have developed multiple apps with it i have uh tried out ar kit that is apple's uh then i have tried out euphoria of course then uh i have tried out eighth wall xr although i didn't like that much but it's a decent enough all right then i have also tried out niantic light ship ar all right uh it it has just launched like it has launched uh on 8th of november currently it is in beta alright you if you want you can go through the documentation and download the sdk and try it out all right so uh niantic has launched their uh own lightship sdk niantic is the same company who developed pokemon go all right so uh they have released their technology behind pokemon go on the uh like publicly so i would suggest exploring the light ship ar dk all right um and yeah i have tried these already but if you want you can try the others also like you can try out kudan you can try out max you can try out uh easy ar wikitude and all these available in arc these are not just all right means there are many others also all right like i haven't listened to all of them but there are some of them that i have listed all right so try to do some research all right do a research by yourself and find out uh what more sdk that uh ar sdks are available in the market all right so yeah these are the sdks that are available and uh in the development tools all right in the development tools i'm going to use unity all right i have already taught uh unity and uh in module two and in module 4 i'm going to teach you euphoria all right so we are going to uh for this course we are going to uh we are going to cover this whole course in unity and euphoria all right so yeah let's get uh dive into the concepts all right see what is recognition all right what is it uh uh think of in human terms all right just think of in human terms see a person is coming to you you all right he is uh the person is uh you're relative all right uh you know you know the face alright it is stored in your brain already uh the face of that person is stored in your brain now you can recognize that person right you already know that right you already know that so that's how you are recognizing right that's how you are recognizing the person yeah this person's name is abc and uh he works at this abc company and this and that all right you know that person you you are able to recognize it similarly if you think about devices all right uh let's say um barcode devices right see if you buy any sort of product all right let's say we go in a mall uh when you buy any sort of product you uh submit it in the counter to make the bill all right what they do they have some sort of reader right i exactly uh don't know the name i think it is called barcode reader so what they do they uh with the help of the device they read the barcode all right and then uh push the uh object or the thing that you are buying uh forward right and make the bill so how the how the device is recognizing the barcode right because uh the device also already knows like it already has the data about the barcode right it already does have the data so that's how it is recognizing it so uh like i have bought some some let's say i have bought a pair of shoes all right and there is a barcode the person i have submitted in the counter the person scan the barcode and push the shoe forward to uh for the billing for the billing all right so the particular barcode is stored on the database all right so that's how the barcode reader recognized it similarly if you talk about face recognition system same thing works like in big big companies they use face recognitions also to verify the employees right they use fingerprint recognition also so these are stored in the database and uh some algorithms are there all right there are some algorithms some computer vision algorithms which which are able to uh recognize the person right similarly in ar also there are some sort of databases all right in marker-based ar there are some sort of databases uh databases in the sense there are markers all right those markers are stored somewhere right those markers are stored somewhere and our app and we design our app in that way all right in a way we design our app in a way so that it can recognize all right it can recognize the marker if the marker isn't in our database then it won't be able to recognize it right and if it is not able to recognize it then how would uh like then how will it uh put the marker like uh how will it put the marker on top of that uh sorry put that object on top of that marker right how did he do that how would the algorithm how would the sdk do that so it is always important all right to uh whenever working with markup is there we have to put a marker on the marker on the apps database and don't worry we are going to see how this is done all right there's a very basic of euphoria only so uh yeah so that's how uh recognition works all right uh in in marker based ar and uh this this uh process is uh valid in multiple uh ways right so this is what recognition is recognition is basically recognizing something all right that is in the database like in our human mind all right if i if i see a person i uh i must i might know the person right like uh i know my brother all right he's a person that is in my brain's database right i know that person so i will be able to recognize it all right now let's say some new person come all right i won't be able to recognize him right i won't be able to recognize that person if if it was a random person because i don't know the person his uh his details aren't stored in my database right so these things work something like this all right so yeah this is what recognition is now if we talk about um tracking all right see this is a this is the image alright this is the image of ganesha lord ganesha all right and in here you can see multiple plus right you can see multiple plus are there do you know what is this these these are uh basically uh the trackers small small uh trackers the these are feature points you could say all right these are feature points of the image that help us tracks all right that helps tracking the uh marker all right that helps track in the marker how this help see uh basically whenever uh whenever we uh upload a database all right uh in in our database system all right in view for you in viewforious dashboard after you have uploaded your image in the database all right you can you can view the tracking points all right this is the image from viewforia only like uh i means i uh uploaded this uh image on the database so that i could get the feature points alright i can i will show you how to get that feature point how to see the feature points by yourself right yeah in the next video only so these feature points all right these are some sort of patterns you could say all right see uh the tracking all right the tracking technology all right in ar basically finds all right they they try to find some sort of pattern all right they these feature points are useful for tracking and recognition all right means see if the how would uh see uh if i if i had to give an example all right you you have created a marker already you have successfully placed all that you successfully place the digital object on top of that marker all right you have successfully placed the detail object on top of the marker now how do you think will the like if i if i move my move my marker on onto let's say 10 units to the left side all right how do you think the object will also move because yeah yeah it is recognizing the marker right it is recognizing the marker that part is done and it has been placed on top of that marker but uh when we will move our our marker from one place to another all right how will how will the digital object move can you think of it that's where the tracking helps all right how it helps see the uh there are you can see the feature points right here are the feature points and these feature points all that these feature points helps the marker or it helps the app to to track the track the marker all right to keep the marker in track and also move or and also move the particular digital object along with the marker if i am moving alright if i am moving uh the marker to the left uh all right let's say i have moved 10 units to the left all right the same thing will happen with the object also because the marker has moved all right and our app has tracked that the that the current position of the marker is uh 10 units from the center right so uh our what our app has done it has tracked and again placed it in there all right although if you try to move it the object will also move with itself it will be as smooth like it will be really smooth so that's how tracking is tracking helps in market-based augmented reality all right so tracking and recognition all right these two are very fundamental and important technology of marker-based augmented reality all right so yeah i hope you have understood that what is recognition and what is tracking and how they are helping in a marker-based augmented reality all right so yeah the same thing it is written here markup page augmented reality makes use of both recognition and tracking all right and you you and now you know how it makes use of them right why it makes use of them what is the use case of them right you know right now so also before moving to the next section all right so uh do subscribe my channel all right because it helps me uh to bring more videos all right more uh courses for you for free all right and also join our discord community all right and if you have any doubt alright if you have any single doubt join our discord community you can ask in there we are we we will be helping you in there there are many like-minded people who are uh who will if i am not available for some time then they will help you to figure your doubt so uh make sure to join our community and if you have any doubt you can ask in there all right i would like to help and also if you uh you can even comment alright comment down in the comment section that what your doubt is and i would clear that right in there all right so now our here is our another topic that is marker design detection and recognition all right see uh this is a this is a very basic fundamental thing all right now there are colorful markers also all right but uh to make you understand i have taken example of a black and white marker all right see basically uh majorly all right many people prefers to use uh like black and white markers something like this all right which are basically square shaped and uh and uh a black and white like uses black bordered images and uh also like the image inside those black borders are black and other are white so uh basically what it does right see the these this uh this type of images already this type of images helps in image unwrapping all right here you can see that this is a bird all right this is a bird all right aft after the image unwrapping all right after the image unwrapping technology is applied here you can see uh like in this image alright from this image the face all right the white borders are there and here is the face it the face has been unwrapped from that whole sorry black borders right so here you can see the face has been unwrapped and it has been positioned like this the similar thing will happen with this bird also all right it would be unwrapped alright this image would be unwrapped and then it would be uh placed like this all right this would be the main image so this is how image unwrapping works all right and image unwrapping is also a very important concept similarly uh here you can see this is a uh like many people use this all right and it this black and white image makes it easier for the algorithm all right makes it easier for algo for the algorithm to do the detection uh to uh unwrap the image all right but there are many powerful algorithms data that have been designed and they can efficiently extract or you could say unwrap the images of unwrap the color images also so that's why we can also use uh colorful markers too all right so yeah and even if you if you notice all right uh if you go to uh let me show you in here also all right here you can see uh the marker already i have already told you that this is the the marker this is the image of the marker that i have uploaded on viewforia's database right for marker-based tracking as you can see the image has been like the texture of the image has been is really low like the quality of the image is really low it has been pixelated you can literally count the pixel if you want all right although it would be hard because there are lacks of pixel in there but uh here you can see that the image has been pixelated the quality has been lowered all right the image is distorted alright that's how it it helps to track right and that's how it helps to track it tracks pixel by pixel it this things helps to unwrap the image also so that's how my uh marker image unwrapping works all right it unwraps the mean mean particular portion from the whole image all right so now now it's our time alright it's our very time to understand ar system architecture all right see if you understand the architecture you can even create your own ar sdks or red marker based ar sdks although that of course won't be easy all right because uh for before developing any sort of sdk you need to have a good amount of knowledge of computer vision already because see augmented reality was built upon uh computer vision only it is it is uh you could say uh a product all right or you can say it is a technology of computer vision only if computer vision wasn't there then augmented reality also wouldn't have been possible so come to vision is the is the root all right it is it is the root of uh augmented reality so it is really important see if you want to create your own uh ar sdks all right if you want to create your own ai sdk you need to have a good knowledge of computer vision you need to know the algorithms all right even i'm learning computer vision for augmented reality so i can get a more deeper understanding of how these things work all right i have a like i currently have a decent understanding all right i i understand how these things work but i don't know how to uh develop these things all right what algorithms are used so for that i need to learn computer vision so i'm also learning that so it is very important for you all right if you want to develop your own sdk you have to learn computer vision all right so without any more talk say let's start with uh understanding the uh ar system architecture all right see in this architecture you can see there is a camera all right then uh from the camera the image is passed all right uh image is passed to the tracking module all right some things happen in there all that will understand what things happen in there all right then it is passed uh to the rendering module where the real world and the virtual uh objects are combined in the rendering module all right and the augmented uh augmented output all right the output is passed through the rendering module to the display all right so this is this is how it works you can see the diagram all right like like if i if i had to show you like this all right uh pen first of all it is uh moving from here and there uh then from here it is going to here alright then from here it is literally going to the rendering module and this all right this virtual module is adding all right this virtual module is adding to the uh real world component all right um sorry for this bad handwriting but this is rc means real world component all right and real world component and real world component sorry virtual component and real world component are like actually attached all right uh the real world uh the virtual component uh is attached to the real world and then the output all right then the output is generated that is the augmented image all right and after that it is being displayed in in your systems display all right so this is it that's how it is working all right now if we talk about understand the module all right see if we talk about you already know what is the camera right what this camera module does right because it it renders like it renders the image of a real world all right into your phone that's what a camera does but uh what is the capturing module all right see the things that you see from your mobile camera right you cannot even capture it right you can even capture it so uh through the camera some sort of image is passed to your display all right and when you click on that centered button available in your mobile camera software when you click that it is captured right so the capturing module basically helps to capture the image all right basically it helps to capture the video or the other image all right so this is what capturing module does now if we talk about the tracking module all right see the tracking module is the core all right the tracking module uh is the core and if we talk about uh see the tr how tracking module works now it it calculates all right it calculates the pose already of the camera all right in the real time all right like it will uh calculate where your camera is and if i talk about uh fovs all right that is six degree of freedom it means that uh you have a freedom of uh to look anywhere already you could this is a very basic definition of uh six dofs all right see what this term pose does let me tell you uh pose estimation all right basically helps uh helps to get the orientation and location all right get the orientation and location of of a particular object this is what the tracking module does all right it is basically the code alright it helps to calculate the pos pose of the camera all right in real time it's not like he uh it will uh only capture once then it won't do it again it happens in loop so the pose estimation is done and also because of that we get the 3d location or you can say the orientation of any sort of object that is the work of tracking module all right if we talk about the rendering module all right see uh what this rendering module does is basically it uh combines all it it combines the digital object all right it combines the digital object with the real world visual all right with the real world image right if you if you you have used any sort of augmented reality you might have seen that right that some 3d object is appearing on sort of on any marker right on an image a 3d object is occurring so a virtual uh a virtual basically a virtual component is being attached with that image and then it is being processed and pushed forward for the display all right and if you are confused already if you conf if you are confused about these uh modules don't worry all right we are again going to look into another all right this is a very much more simplified version all right this is a much more simplified version of that ar system architecture i have included this because i thought that for the first for the first iteration i think people will get confused that how this like what did i explain to you you might not understand it right so i have also included another architecture all right the same thing happens in here also but i will re-explain see in here all right a live video feed all right is going through the camera all right to the image capturing module all right and it is alright and it is divided uh in frames the the video is divided in frames and then it is going through the image processing mode module all right and in there in there the marker is detected and tracked all right means uh in there the marker is detected actually all the processing is done all right all the post calculation is done and then we go to the marker tracking module all right where the post calculation is generally done and all the tracking stuffs are being done in there only all right all the uh what can i say those are virtual points right those feature points are applied in the image in there only uh the pose calculation is there only see if you are confused about ports pose calculation don't worry all right uh let me explain it to you again suppose calculation is basically it calculates the position all right it calculates the position of any object all right that's what pose calculation is it calculates the orientation of the object and the location of the object all right so that's what pose calculation is and then after all these processing and tracking is done it is passed to the rendering module all right the virtual object all right the that the virtual object that we want to augment all right that we want to augment is combined with the real world image all right the virtual object is combined with the real world image then then it is passed to the display screen and we actually see the output on our displays so that's how this ar system architecture works all right i hope you are clear with the concept right again the same definitions all right the image capturing module that takes the images it breaks it to frame by frame then and all those things are that are being done then there is image processing module already the processing that are being done all right means the detection or you could say the recognition techniques are being applied in there all right then if we uh talk about the marker tracking module in there the position is being calculated all right the position is being calculated and then feature points are provided and uh the rendering module all right this rendering what this rendering module is doing this rendering module is basically uh combining the virtual object to the digital object this is just it all right it is doing that and yeah that's it so that is that's it for our today's lecture and i hope you have understood alright i hope you understood uh how all these things work all right i hope you have understood how the market based ar system architecture works all right so i don't think now it would be any problem as you have uh as i have cleared all the very basics or the very basics of marker-based augmented reality now i don't think it would would be any problem learning marker based ar development in this lecture i'm going to tell you how to uh set up your unity and euphoria engine for developing ar applications and later on in this video only we'll be creating our very first augmented reality application with unity and euphoria so yeah the very first thing you have to do is go to this website developer.viewfourier.com all right and in there you have to create your account after creating your account all right you can see right in the top that there's a download section click on that particular section and you will be redirected to this page all right and in this page all right you are seeing multiple options and the uh yesterday only like in 15 november uh the latest version of v4d engine has got released that is 10.3 view 4d engine 10.3 all right you can even uh select your particular version right from here already that is 9.8 or 18.3 uh i have seen one problem that is uh when using any version of any 10 uh like any view fourier version of 10 uh i am facing an error in unity uh so i would suggest using 2020 only all right for this course because i'm going to use the latest version of euphoria and uh now you have to download the sdk all right what is an sdk sdk is the software development kit that will help us to develop for uh means ar applications with unity and euphoria right so we have to download our uh sdk now here you can see there are multiple options available all right uh let's say you don't want to develop with unity alright you don't want to develop your marker based ar application with unity you can go for android studio or if you want to do it for ios you can uh that is xcode you can you can download for ios then there is a uwp then there is uh lumen so you uwp is a basically universal windows platform so uh you can use that too so for uh for this course all right for this for the sake of this course we are going to use um view fourier engine alright the very first option that you are getting that add view for the engine to a unity project or upgrade to the latest version so just simply uh click on it all right and uh some things will be loading up in here all right and then click on agree i'm going to decline it because i have already downloaded uh the sdk but you can you have to click i agree and then download the sdk all right so yeah after downloading it all right after downloading what i would suggest is first let's set up the web version all right like set up all the things from the website right and then after that we'll be moving towards unity so how to do that right so now we have to get uh into another page that is this develop section all right remember you have to create your account first to uh get all this thing so do create your account so now click on this develop i've already opened it on my second window and here we go so here you can see uh there are target manager license manager so what are these two the license manager actually helps us to manage the licenses all right licenses means there are some particular lines of code all right there are some particular lines of code code you could say some special unique code that helps view fourier to connect with the backend server and verify actually uh what kind of uh services are we using right like uh i'm going to use the uh basic uh service of euphoria that is free so yeah all right so that uh that uh basically uh particular key actually uh we call that a key that that particular key would help us actually to uh connect to the viewforia portal all right from our unity all right so that our app can utilize the features that we uh get after uh using the different versions of euphoria that is basic premium all right any of these two versions so yeah now uh the very first thing we have to do is we have to create our license so how would we do that see uh you can even buy the premium version but i don't i don't have the money to buy it so i would uh simply get the basic all right i would click on the basic all right and uh it would load some sort of page so as you can see it right here it is loading some page and uh in that page all right uh keep your license name all right let's say i want to uh name it to view first first ar app all right this should be the name for my license and here you can see this these are the things and uh we have to check this box all right we have to check this box and after that uh click on confirm all right and that would uh redirect uh that would create actually our um license and we can click on that and then simply go uh go to that license and copy the license for us right so i would simply click on the license all right i would simply click on that license and here we go we go uh it copied uh it got copied in our clipboard now another important thing that we have to do is we we have to go to the target manager right just click on the target manager see what uh this target manager does is it helps us uh keep the markers all right see i've already told you that in market based ar we need markers and we have to store like store it somewhere right so uh the target manager uh helps uh keep track of the marker on the servers of euphoria and also we have to download a unity package for that so that we can include it on our unity means local uh local computer right so how would we do that so for this simply you have to click on add database right and then you have to uh name your database let's say uh first ar app right first first ar app uh oh i missed that r no worries yeah so then i have to click create all right and then uh turn it on then then go to that particular target and you have to upload your target in there like means the marker image so that we can use it right and i would show you some other things also so that you can choose your right marker all right uh choose the right marker for your application it's really important to get the right marker because if the marker is of low quality then marker based ar won't work well so that's why right so click on add target all right so i i already have some images so i'll be choosing from that now here are three other options all right uh we won't be looking it now all right so just uh click on the single image all right basically a single image is selected by default so no worries but then you have to click on browse you have to choose an image all right you have to choose a image so yeah here we got an image of a car all right uh i don't have any other image so i'm gonna use that one and you can give any width you want all right so my uh i would like prefer to give six basically what would happen now that uh the width you give all right it would uh get that particular units of width in uh the unity engine right so uh remember that that won't be like give any sort of difference so i want to name it marker all right so then click on add and now it's uploading our target all right it's uploading our target and that's really cool so let it do its job cool now as our means marker is has been added i want to show you some other things also so to get those things click on the marker right click on the on the marker it would redirect you to the marker properties you could say that so then i'm going to show you some very important things all right and that would give you an understanding that what sort of marker you should use and what sort of marker you should not use for your marker based ar applications all right so as you can see here all right in the in the if you can see in the right side there are multiple texts right type single image status active target id augmentable all right this is the section that this is the text we want to focus on as of now what this tells us five star means this image is very good already it it is going to be superb for uh tracking now see remember always that three uh the range between three to five star is okay all right below uh below it won't give you good results even three sometimes won't work that great so always remember to take a picture all right always remember to take a picture that is that has got four to five rating all right four to five star rating and it's really really really important all right so uh yeah so now as we have seen that what sort of marker we should use so we should use remember we all we always should use a marker that is really good now you have to click on this uh show features option all right i'm going to see here you can see that remember that slide that uh that uh in that slide there was uh a ganesha's picture and there was some dots in it so you can call those as tracking points all right those are known as tracking points with the help of these the marker actually tracks the marker and helps to put it up on the marker right so uh yeah this is these are the details that you need to know all right and now uh another thing we have to do all right another thing we have to do is to download this database and then after that we are going to set up our unity engine all right we are going to work on our unity engine so first of all let uh let the scene load let the scene load all right and uh then click on this download database all right and here you are going to find two options that your android should export or visual studio but of course we aren't working on any of them so we are going to choose unity editor right we are going to choose this unity editor and then simply click on download so it is compiling our database as of now all right after it is done compiling uh we are we are uh going to save that file and uh then we are moving towards unity right so yeah that's cool so now just click on save all right and our unity package uh will be downloaded just as you can see it has got downloaded so let's move towards unity so as uh we have uh created our viewforia assets that is we have created our marker and set it a set at i have set a target so now we have to actually change our platform so how would we do that right see uh basically we are developing ar application for uh our mobile right for our mobile devices that is android devices so what are we going to do see uh currently currently if i if i show you as you can see in the top the the currently we can develop for pc mac and linux standalone right that's what we can develop for but we have to develop it for android so what we have to do it's fairly simple all right just go to this file all right then click on build settings now here you are seeing multiple options that is pc mac and linux standalone and the unity logo you are seeing here it means this particular thing is active all right now if i click on android you are getting multiple options don't look at that as of now all right you can uh actually take a look uh at that afterwards uh this uh whole lecture all right you can try it out by yourself but we have what we have to do is we have to click switch platform but let's say you don't want to develop for android you have an ios device so you can click on ios also uh see these things won't work if you haven't installed the ios module alright i'm on a windows laptop so uh it doesn't makes any sense to install uh uh basically to install basically ios module uh in unity so i haven't done that uh but i have android ones right so what i'm going to do is i'm going to uh click on android and then switch platform it's simple as that what it will do is it would uh make our unity uh means it would uh give the means it would give the power to unity to develop for android so just click on switch platform and it would start doing its work all right and after it gets switched uh i will return back with uh with the next section so now uh basically our platform has been converted to android or you could say shift it to android now we have to import our sdk and one tip i would like to give you guys is that before all right if you are developing for any platform let's say you are developing for android only or ios only always remember first change the platform then import anything you want because after importing all right uh this happens to me a lot like still it happens what happens uh is basically uh i do the development all right let's say i'm doing doing it for android all right i do the development and later on when uh i noticed that i haven't shifted to android platform and you know when uh after half of the things are done multiple modules will be there multiple assets will be there in your unity and when you will shift that now it would take a hell of time so remember whenever starting with unity if you are going to change platform do it do it at the first then only import any asset module or anything you want alright because it would reload all the script things it would recompile it would uh make the assets compatible for android and all those things background processors going on so always remember to do that right and now it's our fair time all right to import the sdk so how we do that two steps means two methods are there that is first of all simply open that whole folder all right open this folder and simply drag and drop all right simply simply drag and drop it in here all right one way is this another way uh is to basically right click import package custom package then import it all right it's uh simple as that well so now uh as uh as that whole processing thing is done now we have got an another window all right basically this is the package window all right don't worry about anything here and just click on import all right and it would import your uh view for your module and into unity all right and give it its time so that it can do so all right and also when it says something like this what you have to do is click on update all right and it would again start means resume with the importing uh stuffs so guys now our view fourier engine has been imported all right and one of the uh very good things all right actually uh there's a problem with sometimes uh it occurs or what happens is that uh sometimes when you import uh euphoria right uh unity fails to compile it or something like that some sort of like that happens all right and your uh view for a engine doesn't get imported successfully so how would you check that your v4 engine has been imported successfully right so what you can do is click on the hierarchy panel right click and out of all these uh default options you will get a new set of option that is view fourier engine and that's when you know that we you have successfully imported v4 engine and if not all right maybe due to some problem you ha you wasn't you weren't able to import it successfully what you can do is reimport it as simple as that and i'm sure that that would fix your problem right another thing all right uh uh do you remember when we uh create our created our marker database in the target manager in developer.veforia.com we downloaded another unity package all right so what that what is that unity package that unity package contains the markers all right and we have to import that unity package all right so again uh previously i showed you uh the drag and drop method now i'm going to show you the right click method so click on the project panel right click all right all right simply simply just right click click on import package custom package all right and then get that marker package the uh the my marker packages name is fast ar app so i'm going to import it all right so again the same steps you will get a window like this and click on import and your files will be imported so now as we have imported our asset all right uh so now as we have imported our marker database and also the view fourier engine sdk now it's time it's our very time to develop our own ar application right so how do we do that the very first thing all right the very first thing our viewforia developer does delete the main camera we don't need that main camera all right because that main camera is meant for uh virtual rendering all right it is only for virtual rendering not real plus virtual what euphoria does is viewforia is really good and he provides us an ar camera built into it so just right click in the hierarchy click on view fourier engine and then click on ar camera and here we go you got an ar camera now this camera is going to work for augmented reality that is it is going to capture the real world and put the digital object in the real world all right and that's what we wanted now remember we copied our license previously uh during the web part all right when we're covering covering the web part we are going to need that license so just click on ar camera in the inspector menu yeah you are going to get this open viewforia engine configuration all right in the view for your vf script click on that you are going to get something like this all right and click on uh in this app license key section right this is the main section so what i'm going to do is don't click this button it would redirect you to that website and you have to create another license but we have already created our license right so i'm going to just paste that license right and voila viewforia got the license right so yeah that's cool now as we have done the very basic setups all right see uh in this in this one i'm not go not going to uh tell you how to create advanced v4 app this is just a setup video and this is a video of how we set up our viewforia and also uh we'll be creating our very first ar application with euphoria all right so unity is doing its processes so let it do it it's taking some time but don't worry yeah it's done now what we have to do is we have to right click again go to view fourier engine and now see in marker based uh as i already told that we need markers so how would we add those markers in unity so right click view fourier engine then there's something known as image target click on that all right and you will get another game object known as image target right now i know you might not uh see if i if i zoom it to you you will be seeing it totally white now believe me uh uh this one uh we have a fix for this right see by default unity uses image type that we have to uh specify from unity only this that is image uploaded in unity but as we already have a database all right we already remember we made a database we made a target manager database so we are going to use that so click on the image target all right go to this inspector menu and you will find something called image target behavior all right don't look into another other options we are going to explore these options in our next like in project videos or next videos so what we are going to do is click on this type uh selection menu all right and from here you would find multiple things cloud record basically cloud record what it does it it fetches the data from cloud that is the images from cloud and here is from database that we uploaded in our unity all right and now uh we have selected our database now we have to select which database alright maybe we have multiple database in our ar application so we can we have to select it that is our first erf and voila it will automatically get you the first marker the very first marker available in the database so we have this marker available in the database right so as simple as that nothing too complicated now what we have to do is all right now what we have to do we have to right click again all right see i'm not going to include any 3d models right now all right yeah we'll be doing that in our future videos but as of now this is only a setup video so just add a 3d object all right add your favorite 3d object there's no favorite one of mine so i'm just going to add a cube yeah and voila a cube got added now reset it transform alright reset its transform so it's back to zero all right and put it up a bit right put it up a bit and voila you got your cube now if you play this all right if you play this scene the cube will be there right the marker won't perform its functions why because uh you haven't put this cube inside of this image target so that's what we have to do we have to make the 3d model that we are using the child of the image target all right so now we are good to go all right that's cool right one of the good things of unity uh and euphoria is that you can test viewfordia on your pc only so how would we do that uh just click on play button alright and it would start the camera all right nothing to complicate it so let's do that so now if i put the camera all right i mean if i if i basically put the marker right in front of the camera right uh it would start tracking the cube it would uh start showing the cube all right just see it in here right uh you can you can see it clearly right now if i remove it all right you can see that the cube is staying here all right now this is a feature that called extended tracking of uni uh for euphoria only but uh it is useful also but not in this case so i'm gonna remove it how would you remove that all right just get out of the play mode all right uh so i got out of the play mode uh click on image target then here is a in the the default observer event handler only here you are seeing multiple or an option that is tracked or extended tracked so what i want you is to select only tracked all right and what would do uh what it would do is it would set uh like it won't uh now it won't have the feature all right now it won't have the feature of extended tracking all right let me show you by entering the play mode all right now if i uh if i show you all right just just check it out in here see the cube is here right i the cube is here now as soon as i remove it all right as soon as i remove it the cube goes away right see the cube goes away so this works much better if you try it on android all right so i would recommend you to build that application i would also show you how to do that all right i would recommend you to build that uh android application and then try to try it out on your android phone so and i guess you all are happy all right you created your first ar application i know that this is a cube but the project will be doing is going to be really interesting all right it is going to be really really really interesting so now to build our viewforia application what you have to do see i i already told you in the very first video of installing unity you have to have the android module open jdk all right ndk and all those things so that you can make the things work right you can build your application that if you don't have that then it would be a problem all right and now what you have to do is go to asset all right now the scene all right uh the scene we are on is known as sample scene all right we are using the sample scene and in here in in this particular section you have to add that scene all right you can just click on add open scenes like it would add the scenes that are currently open my sample scene is open i can simply click uh add open scenes you can even add uh it by drag and drop right it's as simple as that but uh as uh now we have added alright remember without adding the scene if you build that application it won't work out right so it's really important to include the scene you are working on then click on build all right then just click on build and then name your application i want to name it test all right and then click on save it would start building building your application in this particular section of the video i'm going to tell you about some of the free resources that you can use uh in your development all right see as a exact developer i need 3d models animations all the time all right and these resources are a life saver believe me like when i started or see i am not a 3d modeler all right when i started i didn't knew about these things but i got to knew over time and believe me these resources have helped me a lot and one of the resource is sketchfab see sketchfab is a really good place to find your 3d model alright see if you if you want a 3d model of a car you can just search for it you will get multiple 3d models for free all right there will be paid 3d models free 3d models too you can get your own all right so sketchfab is a really great place if you want some other options all right if you want some other options also there is uh another that is cg cg trader i guess its name is cg trader then there is turbo squid all right boost code is there there some some sort of free 3d models are available also there are also available in there but what i prefer the prefer most is sketchfab sketchfab has a lot of 3d models available for free so i'd suggest whenever you're looking for a 3d model go to sketchfab this is from where i get my 3d models all right so here's another resource that is known as turbo squid i already told about it to you but let me show you see this is another website from where you can get multiple 3d models for free and also for paid all right you can get it from here it has multiple 3d models of 3ds like it you can get blender 3d models cinema 4d models maya models 3dx models obj models all right similarly you can get cars models of multiple cars you can get models of multiple characters you can get models of animals then there is of vehicles you can search for any model you want all right so this is another very useful resource that you should have a note on this is another resource that you can make use of this is known as ready player dot me see if you want avatars all right if you want avatars for your uh games let's say you want your own avatar you can go to this website uh go to this website and make your own avatar based on you all right you can make your own play playable characters with this ready player dot me all right this is a really good avatar creation engine even if you want to um build your own uh like if you want to implement all right if you want to implement this ready player dot me avatar engine they also have a unity plugin for it so you can check that out too all right the thing that you are currently seeing is a is a output all right uh there is a 3d model that i customized all right that i customized so there's a 3d model that i customized and even you can make your own avatar so here comes another website all right from where you can get a lot of free 3d models all right there's a really great website i prefer this one too all right my next uh means after sketchfab my next choice is alwaysfree3d.com you can uh don't worry if if you are if you want these links all right i will provide a link down below all right i will provide all the links of the website that i am using down in the description or description box and also i would also create a pdf of it and upload it on my course website all right so you can check the links from there also so free 3d is also a really great website from where you can get a lot of free 3d models so this is also one of my choice here is another website alright known as nasa 3d here you can get all the free resources from nasa all right the i guess all the models in here are totally for free you can get all the models uh free uh models related to space all right related to nasa at this place all right i would provide the link down below so this is another great platform where you can get the 3d models it also provides you textures all right so this is a really great place so this is another website known as render hub from here also you can get a lot of 3d models both paid and free so you can search any model you want all right and i'm pretty sure that you might get those models in here all right even sketchfab is also there i already showed you turbo squid is there then there is free 3d now comes render hub 2. all right so this is another resource all right this is known as 3d leashes so it can if you want any sort of low poly household items you can get all the things from this website uh this particular 3d website so this is a really great platform also so you can simply go into this website and download your 3d mode here's another resource known as opengamer.org this is a really great website if you want to have free assets all right free ui assets for your application you can go to this website all right if you want uh if you are making any game this website is also going to be really helpful for you for getting the ui assets for free all right so it contains both paid and free assets this is another website known as archive3d.net all right from this website you can get any 3d model totally for free all right now none of these models available in here are paid so there are free models means the models that are available in this website are totally for free so you can also visit this website and search for your models here comes another free resource known as mixamo this free resource is provided by uh adobe you can add animations to your humanoid 3d models and there's a really great website that you should look for yeah this website lags a bit all right but there's a really great website from where i get animations for my 3d models all right so here's another resource all right this is going to be the last resource of the video that i'm showing alright but there are plenty of more resources available over the internet all right i would include all the additional resources that you might need also in the i would also add them in the pdf alright that i'm going to share with you all right and to get the pdf you can simply uh search for like search for it in the description below in the uh video and also you can get that from the course website all right so this is this is another website that says smithsonian digitization all right this is also a really good uh website for getting 3d models as you can see here there are many models available like of like skeleton of triceratops then skeleton of mammoths then there is orbiter space shuttle model is also available so you can there's also a really great resource all right so this much for this video in this lecture we are going to look into multiple tracking all right so this is basically a feature of euphoria where you can track multiple markers at the same time all right it's it's a this one is really useful whenever you are making uh an ar book all right whenever you are making games so these this feature uh helps a lot all right like for example if you are going to make an ar pokemon game right so with within one mobile there will be one there will be two cards and you would be scanning those card and make and two pokemons would appear and you would make those two pokemons fight each other all right so multiple uh market tracking helps a lot in many ways all right and in today's today's lecture only i'm going to show you all right so first of all uh i want you to set up your euphoria account your sd case all right you already know how to do that i have shown you in my previous video so if you are confused you can watch it watch that particular portion again and uh if you have any doubt you can comment it down in the comment section all right so without any further delay let's get started the very first thing you have to do is click on this main camera and delete it all right because of course we don't want the main camera and uh one more thing i would like to do is to stack up stack this game window or to the side all right to the side of my scene window so that i can uh see whatever thing is happening all right so yeah so just wait a few seconds all right cool so here you can see that it has been written no camera is rendering that's because we don't have any camera so now we do what you have to do is click on hierarchy uh go click on view fourier engine and select ar camera all right uh so you can keep it like this or you can stack it up uh on top of directional light i prefer stacking up on uh directional light it feels better actually looks good actually so that's why it's just a personal preference alright and now what you have to do is uh click on i means right click then again uh click on image target all right select a marker right from here click in the image started behavior click on from database and select the database my day for for my uh case the database is first ar app all right and the marker i'll be using for this is m1 and let's name the image target as m1 all right because i'm using uh the m1 marker all right so yeah so here we got our very first marker all right i would be placing the 3d models later on first let's set up our second marker so again right click click on view fourier engine click on image target all right then again name it m2 all right so then again in the inspector window only you will get a type selected from database then select the database that is first arf in my case and uh take this uh m2 marker that i have all right so you can uh you will get the marker what you have named after all right so make sure you do that now we have two markers in in place now the problem with that is if we if we try to show one marker all right if we try to show one marker at a time then uh means let's let's uh say for an example all right uh i'm using this app alright and now i want to show uh that total how many means i i'm trying to uh means track both the markers at the same time all right so i'm trying to do that and uh of course that wouldn't work all right so to figure out uh this problem we have a solutions all right so currently the problem we are facing is uh it will only track one marker at a time all right but we want to track both the markers at a time all right so we are going we are going to go to that feature but first of all let's uh set up our 3d models all right so right click or not right click uh i already have the 3d models all right i have the uh i have one dinosaur 3d model so i'm just going to import it right in here all right uh let me reset its uh transform all right so here we actually got the dinosaur i know it doesn't looks that good i just uh choose one random from sketchfab these are objs and believe me i don't uh want you to like use obj files all right i want you to use uh gltf files because they have better quality better texture quality and all those things all right that's that's the major reason but for the sake of this tutorial and to make things work first fast so i go got to go for uh this obj model all right now there are some materials all right so i will create the materials it's uh it's pretty simple here you can see there are multiple materials in here albedo so what you can do is uh right click in the texture section and create a dinosaur material so here i create a darkness of material now if i try to find where is uh exactly the means this is the normal map right this is uh the albedo one already so i found albedo one drag and drop it in uh here all right and drag this on top of this now this this one looks uh looks pretty good all right so now i need i also need to add the normal map so that it uh gives a better look all right so yeah it's it's uh looking really really great so i uh currently have click on fix now because it is not being marked as a normal map so what uh the what this fixing process would do is it will uh fix that uh texture to a normal map all right so just just wait for a few seconds and uh this process would be done all right now let's let's see we have ambient occlusion we have metallic texture so uh let's apply the metallic texture first all right so here we got the metallic texture but uh actually let's remove the smoothness all right then here we have the roughness all right uh so and uh then where is it yeah there's another albedo one this is uh maybe for the eye so i'm not going to go into that much so uh for now this this thing looks good all right so just uh as our model is ready so what you have to do is uh put this model under the hood of m1 that is make it a game object of m1 marker all right so for now our this this model is set up now again we have another uh model that is of a cake i uh like i was thinking to take another dinosaur model but then i thought let's let's take a cake how many dinosaurs would be there right uh so now i need to bring the scale up all right so i'm going to make it 50 50 sorry 50 and here goes another 50. all right so this this seems uh pretty big um so i would scale it down a bit so uh don't worry okay yeah this this uh this thing looks good all right okay cool now i wanted to save this all right uh save this and uh simply drag and drop this inside the m2 all right so yeah so now uh here uh one thing we would be seeing is all right one problem we will be seeing is that whenever all right whenever we are going to like play uh the scene what would happen is uh we only one marker will be detected alright if we give if we feed it two markers all right then it will only detect one of it because uh we haven't set up the settings that is needed right so that's what we have to do or click on ar camera all right then click on open view for your configuration all right so here you can see here multiple options and the one that would be uh our preference is that this one maximum size simultaneous tracked images all right so and there's another one maximum a simultaneous tracked object so basically the first of all let me tell you what the this two does basically the uh currently you can see uh one is written there alright and that means only one marker or only one object would be detected all right at a time so what we have to do is uh we have to increase it to how many uh like to harm to as many as as many numbers as we want all right like let's say if we want our app to detect four markers at a single time right so we can uh write it four in there all right or if we want it to track four objects at one time then we can write uh four in the object section but for for for this course we are only uh like we aren't exploring the tracked objects portion all right so we are going to explore those maximum simultaneous tracked images so what you can do is currently it is one just simply change it to two all right so that's how it's uh it's going to work all right so it's pretty simple as that there's nothing much to like exactly scare about all right but yeah this is uh this is it right see uh the thing that i would like to say is whenever all right uh generally generally uh whenever we actually like create ar books we don't usually uh keep making means we don't usually track two to three images at one time we just track one images at a time all right and that's what i would recommend you to track one images at a time because then that would make it more efficient all right or else uh the the ui might get cluttery if you if you don't manage it in that way all right and that gets a bit more complicated so i always recommend people to uh like for ar books all right for specifically ar books try to use only one marker uh means set the maximum sample antennas tracked images to one because at that point uh you guys will want or to exactly use already to exactly use one marker at a time all right so let me show you all right let me show you um just just see this now all right so we have uh we are able to just oh yeah we got it so we are able to see that uh at at a single time all right we are able to detect two markers all right so that is what how it works all right so i i would recommend you to try uh play with this this features feature more all right so that uh you explore more new things all right um so yeah that that's it so that's it for today's lecture all right so see you in the next lecture thank you in this particular section of the video we are going to look into virtual buttons so virtual buttons are another way all right are another way to add buttons in your view for your application all right you there are two types of buttons that you can add first of all ui buttons all right like uh using simple canvas and those buttons in world space all right you can do that another another way is that is to use virtual buttons all right so in this tutorial we are going to look into the virtual buttons uh and before starting all right before starting with virtual buttons there are some rules to be followed all right some suggestions some rules that are needed to be followed the very first thing all right the very first thing that should be kept in mind that the size of the button alright the size of the button should be equal or greater than 10 all right of the overall target area always remember that the size of the button should be equal or at least all right at least 10 percent of the overall target area all right now if the like if the area is 100 then the 10 uh the button should be at least the size of 10 percent of that area all right that's it another thing all right another thing that is always all right always try to place the button all right always try to place the button where the place is reach with feature points all right see in the introduction video i already uh showed you how to check for feature points and open the viewfor your website and look for where the feature point is much greater all right where the quantity of feature points is much greater and always place the button there all right another thing is that uh insert insert the buttons all right what does that means that means uh is that don't make the buttons all right don't make the buttons touch the image target borders all right the borders of the image target so always uh give some padding in the button from the outer side all right so sorry from a margin in the button from the outside all right so always remember that so always insert the button so that they don't touch the borders of the image target another and the last point is don't stack the buttons upon each other all right what does that mean see when you are viewing all right when you are viewing uh from some point all right when you are viewing the image target from a particular point you would see all right you would see that if you place those buttons on top of each other all right you won't be able to reach the uh second button it would be really like it would be really hard to get uh to the second button so don't ever stack the buttons upon each other all right so that's it so let's start the development of our virtual button let's implement it see uh i would like to mention is that i'm using the same project all right the same previous project that i used to uh develop the what like show you the very initial steps of euphoria all right so i'm using the same project so i i haven't had changed my license key and my database although if you want you can do so all right it's totally upon you if you want you can do so you can even create a new project for implementing virtual buttons i am doing this because i want to keep all the source code at one place and provide provided to you all right so it won't be cluttered up so yeah let's get started the very first thing alright the very first thing is you have to delete the main camera and then add a ar camera select view fourier engine and click on ar camera so let me uh place it on top of the directional light don't worry it won't have any sort of effect so it is totally upon me now i have placed my ar camera another thing is to add the image target now the image target would be same as the previous one because i haven't changed my image target but you can do so if you want all right now if i click on image target here i get my image target now let me uh select the database so i'm going to select from database and now i'm going to select the database that is first ar here is the marker that is selected all right now what i want what i want is to create a 3d cube all right i would show you why just wait for a second let me reset the transform of it so as i've reseted the transform i'm going to uh place it at the back all right i'm going to place it at the back so see i'm using shortcut keys q w e all right q for uh the this hand tool uh w for this uh anchor tool and e for the rotational tool and r for the scale tool all right so these are some shortcuts so uh i'm using those shortcuts all right if you think how am i getting this then yeah that's how i'm getting it now uh this cube looks a bit dull right like it doesn't have any sort of colors it's totally white and i don't like it so let's create a material for it all right now uh in this i'm also going to show you how to add textures to your material all right and i have already imported a texture i have downloaded downloaded from 3d textures dot me all right the links are given in the ar resources file you can check them out all right it is available on my website now let me show you the textures here are the textures all right and i'm going to tell you how to implement it now this is not a texture this is just an overview file so you can check how this how the cube will look but i'm directly going to implement it all right so first of all delete this uh delete this particular material we don't need it all right so and another thing all right another thing is that first of all create a material all right create a material let's name it textured textured box or let's say cube all right this is what i will name it after that what i want you is to go to the inspector panel all right go to the inspector panel and select the textures you want so what i will simply do is i will click on albedo it would pop up a panel now i have to find all right i have to find a texture i want now i'll find a texture that that has been named as baseline all right so it's not showing the full name just wait let me lock it cool now from here i can find what textures i want so for the very first thing uh in here i have to get a base color texture all right this one this is i'm going to put this in the albedo section all right now you might not see uh the effects in here all right you might not see that because we haven't applied the materials so just drag and drop the material in here and see it has been applied in the cube i know it has the texture has been applied but it doesn't looks good but you won't say this after watching the whole material uh applying thing all right now and here's there is another section that is metallic now let's find a metallic texture so here i got a metallic texture all right so see uh it's not like i'm identifying these textures it is just written in the end of the names now i would adjust the settings a bit all right i would adjust the settings a bit uh see you won't uh like you won't like it as of now the reason is i haven't applied other materials that that's why it's not looking realistic or good so i'm going to apply those now here i have to add a normal map this is a normal map so i'm going to apply the normal map and here you can see that uh the bids all right here you can see the bits in here are coming to show up all right they are putting the 3d aspect in here you can see it right now we have to add another thing that is a height map all right so let me find the height map okay yeah now i have applied the height map and this uh this height map will help me to adjust the height of the like height of these uh particular things right you can uh let me show you from like from uh from nearly all right so here you can see that it is moving right it is moving right so that that is what height map does now another thing all right another thing is that we have to add an occlusion now this is the ambient occlusion all right this is the ambient occlusion mask so now you can see that we have also added the occlusion mask now if you want to increase the smoothness you can do so but i am not liking the smoothness that much so it should be something like this all right now let's see if anything is left um roughness no um all right let's see okay as of now all right for us it's uh we are good with this cube alright this looks realistic too now you can get all the textures all right there are really great textures available at 3d textures dot me so i would really suggest to go in there and check out the textures alright and take the texture that you like as simple as that all right now another thing all right is another thing is we have to put this cube all right we have to make this cube a child of image target all right we have to make this cube a child of image target now click on image target all right and another thing that you may you might see that the inspector panel is not changing that's not any sort of bugs it is basically i have locked the inspector panel now i have unlocked it so i have got all the things all right now in the image target uh in the image target behavior script uh under the add target button you would find something a drop down that is advanced all right you need not to look into these um properties but for us the very important thing is this particular button add virtual button so click on it right and you can see that it has added a virtual button now if you click on it the virtual button will be visible to you all right now remember the rules all right remember the rules and try to resize it all right now i'm not sure all right and i i haven't seen where uh where are the feature points but i'm what i'm doing is i'm putting at a particular place and i'm trying to follow all the instructions all right so i would suggest you to follow the instructions too all right so we created our virtual button now now what see when you click your virtual button in the inspector panel you would get some options all right you will get some options now the very the very important thing that we have to see is the virtual button behavior script all right in here here's an option sensitivity setting that is a drop down all right so in the drop menu you would find high medium low now these are the sensitivity settings what this tells what this tells us is that how often or you can say um how exactly are we going to uh like when we uh place uh place our hand upon or sorry over the particular mark over the particular virtual button all right so how what will be the sensitivity all right or what will be uh the rate all right when it will like detect all right it would detect and start doing the function so that's what sensitivity means it tells that how sensitive the particular button is all right if if it is low then it might like it might take some sort of hard work to get the button to work but if it is high then it won't take that much hard work to make the button work all right so yeah now now as we have created our virtual button all right we also have to add some functionalities to it right now i'm going to uh create a script all right let me tell you first which script i'm going to create on it i'm going to create a script that is that will simply uh when you hover all right when you hover over the virtual button all right whenever you hover over the virtual button what it will do is it will simply disable the cube or let's say uh hide the cube all right as simple as that nothing too complicated all right so yeah let's start coding now see as you can see i have created of multiple folders in here and i i would suggest uh you should also create because that would help you to structure your projects now i would create another folder in here that is uh watch virtual button scripts all right now i would uh create different types of folders for different types of tutorials all right now in here create a c-sharp script and i'm going to name it virtual button all right or let's say virtual button or let's say button behavior something like this behavior so it would take some amount of time to create the script so now we have created our virtual button behavior script right now it's our time to code it all right and you already know that what we are going to code all right so the very first thing the very first thing is we have to somehow target the cube and all right and before that all right and before that we also have to uh use a namespace all right we also have to use a namespace called euphoria all right it's very important to make the virtual button script virtual button functions to work all right so yeah so i remove the comments and make sure that the void start function is there alright and if you have forgot what this void start function does don't worry i'm going to re-explain it all right the very first thing all right was to include the namespace euphoria now uh to like edit the cube all right or do something with the cube we somehow have to uh grab or let's say get the reference to the cube right we have to somehow store that cube somewhere to be edited right so how do we do that it's fairly simple we have to create a variable that is public game object all right as it is a game object so the data type i am keeping is game object all right and then cube now one thing you should note all right if you if you don't give public or give private what will happen is this particular field won't be showed all right it won't be showed in the inspector if i had to show you just wait all right let me show you i have created this particular game object all right and let me show you in uh let let the script compile all right let the script compile and i will show you that what will happen if you don't give public all right now see there there are two ways to reference a variable all right i will be showing you two ways both the ways actually like uh the simple drag and drop reference referencing way and another that is using the script to reference all right so yeah now let's attach the cube to our image target all right you can create another empty game object and attach it in there but the thing is that the process will be following up is it requires us to add the script in the image target only in the image target game object only there's a reason behind it i would show you why all right it depends on our scripting procedure and i'll be scripting it in a in that way that the script should be in the image target game object only all right so you can see that we aren't able to see any sort of uh variable but we did create one so let's give public let's see by default alright by default whenever you create a game object all right or any variable it is public it is private all right those variables are private by default so make sure if you want to make them public if you want to make those variables public then you should remember that to add public keyword in front of them so now let's see if our cube like if our variable has appeared all right so click on the image target and then go uh at the last and check in the scale in your script that you created that the cube is coming or not all right so in here our cube variable is coming now what you have to do is select the cube all right select the cube and drag and drop it in this particular area alright in this particular place it uh it is currently taking all the uh game objects that are of type game objects all right it is taking all the objects available in the scene that are type of game object all right so anything that is game object it will take it in here it can be stored in this variable all right now another thing is that we have to create a private variable all right because i don't any uh want anyone to edit it externally so we have to give a data type that is virtual button behavior and let's name it button or let's say v button that is virtual button all right this uh you already know uh if you don't give public in front of any sort of variable what will happen all right now as we have created all right as we have created a virtual button we have to reference it also right we also have to refer so how should we do that right it's very simple all right there are some uh functions that is get um get component gate component in children we would be using get component in children because we are targeting the like we are targeting the means let me show you all right see you can see in the unity editor all right that this is the image target all right this is the main uh game object all right and the virtual button and the cube all right the virtual button and the cube are a children all right are children of this main game object right so we are attaching the script in this game object all right and we will be trying all right we will be trying to access all it will be trying to access the particular uh virtual button behavior all right virtual button behavior script all right we'll be trying to access virtual button behavior script from the virtual button game object all right so we'll be doing this so very the very first thing alright see as i told you that in normal state all right in normal state the cube should be hidden right and when we hover all right when we hovered over the particular virtual button all right the cube should be visible all right that's what i told you right now the very first thing is we have to make the cube invisible all right so cube dot set active and put false in here so what will happen with this is what will happen with this is uh whenever you start on it whenever the game is starting all the app is starting at first all right at first instance this uh cube will be deactivated all right or in simpler terms it will be hidden all right and you know that what void start is void start runs only once whenever the application is starting all right so that's why that's why whenever the app will start we will run this particular function cube dot set active false so that the cube gets hidden all right another thing is that you can simply hide it from the means hide it from the particular uh hierarchy panel from the scene only but of course that isn't a good idea so let's do it by script now you have to uh instantiate all right you have to uh like contain the virtual button behavior script all right so i'm going to name it uh sorry i have already name it that is we have v button oh sorry v button so yeah now let's let's sort uh what can i say let's um add all right let's uh reference that particular virtual uh button behavior script all right so you have to uh type this get component and children all right and inside of this inside of this particular greater than and lesser than arrows you have to write the script name all right that is virtual button behavior all right now we have targeted the virtual button behavior script now all right now let's create two functions all right let's create two another two function that will help us to activate and deactivate the script so void on button pressed we have to take a virtual button behavior as a parameter sorry vb all right and then what we have to do is whenever all right whenever the button is pressed or you can say button is hovered we have to set the state of the cube to true so that it is visible all right and whenever but a button is released all right released whenever the button is a button is released what we are going to do is we are going to simply deactivate the cube all right so it is as simple as that but all right but we haven't uh like see whenever to make any sort of function work right any sort of method work we have to call it right we have to call that particular function but in our case we haven't called it can you see where we have called it see now all right like when you create normal buttons ui buttons alright in unity there are uh some sort of on click on click functions right and in the button parameters there are on click functions in here all right in here there there is no on kick on click function available so we have to uh like create our own on click all right or you can say register these functions in our button so how do we do so it's it is fairly simple all right it is fairly simple so select the button all right and then we v button dot register on button pressed all right and inside the parenthesis pass the function on button pressed because whenever the button is pressed we have to run this particular on button press function now v button dot again we have to do another thing that is on button released all right so on button released all right so yeah this is it all right this is it now let me recapitulate the whole code to you all right so that you won't get confused the very first thing we did is to uh include the namespace using euphoria then what we did we created a game object public game object that is a cube and referenced the cube to it then we created a virtual button behavior named v button then uh in in the start already in the void start what we did we uh like in the void start we specified that whenever the application starts deactivate the cube all right the cube should be hidden then after doing so what we we created two functions all right having uh virtual button behavior vb as a parameter so the first function that we created is on button pressed what it will do whenever uh the when we whenever we are hovering over the button or you can say whenever we put our hand over the button that means that we have pressed the button so that's why it is written on button pressed so basically you are hovering over it so uh this is what happens now whenever on button pressed function will be called the cube will be like will be restored it won't be hidden anymore but whenever the hand is released from the button all right whenever the button is released again the cube will be hidden after that what we did is we referenced that we referenced our virtual button behavior script in our v button uh component and then we uh used functions to call our own functions right like v button dot register on on button pressed what it will do is it these two works like uh on click all right whenever uh whenever you are pressing the button it will do some function and we have passed the function that is whenever we will press the button this particular on button pressed function should run and another is that v button dot register on button released all right what will what will it do whenever the hand is released from the button it will run the function on button released all right so let's save the script right let's save the script and try it out in real time let's try it our basically let's write our application that we created the very first thing i would suggest you to do is to change the sensitivity setting to high alright and then click on play mode all right so as you can see it right in here all right here is my marker you can see that whenever i am hovering over my hand you can see that the cube is appearing and whenever i am releasing my hand the cube is going all right so this is how it basically works all right as simple as that so congratulations you learn to create how your how like how to create virtual buttons but if you uh if you ask me what do i suggest virtual buttons or ui buttons believe me ui buttons are far better than these virtual buttons all right so i would always recommend you to use uh ui buttons yeah if there is a need to use virtual button then only use it all right because those watch these virtual buttons sometimes even doesn't tracks the hand like it's really hard to get them track the hand maybe it's because of my laptop's camera but it is really problematic and uh creates a lot of problem and also breaks the user experience so that's why i always recommend ui button all right so yeah in this lecture we are going to learn how to use video playback feature all right in our viewforia project so this in this video we are going to uh implement our own video player you in augmented reality using euphoria and unity after this video you would learn how to use your videos in your games all right in your v4d applications now in this video i'm going to show you there are actually two ways to uh means add the video playback functionalities such as play pause and stop all right but there's another way that is the non-coding way all right i'm going to show you the non-coding way that is to use the uh given on click functions means ready-made on click functions give a given in unity all right even i'm going to show you how how to play the video whenever marker is found and stop it whenever marker is lost all right this video is going to be the real is going to be really simple video so follow along all right now first of all delete the main camera after deleting it go to view fourier engines uh add ar camera then again right click euphoria engine and then add image target all right in the image target select uh from database then select the database and the image target all right this is the basic process that we follow along all right and i'm using the previous project only so i need i haven't created any sort of new license or any sort of new database so i'm using the same marker and all those things but in different scenes all right now uh here you can see here is a script default observer event handler in here there you can see dragged or extended track click on track all right then what you have to do is click on image target add a plane all right go to 3d object add up plane all right here you can see a plane is added now we have to reposition it uh move it upwards a bit that is in the y axis then resize it all right so that it can fit the marker all right you can even create your ar video playback like ar video application or you can say ar video player after watching this video all right you can like get all the videos from the file explorer and then show it in here all right you can create your own application with it but in augmented reality all right now let's name the plane to video playback or let's say player all right now in here after that go to uh in the inspector panel only search for video all right click on add component then search for video and you will get a com here you will get a component called video player all right now i have already i already have a video imported all right i already have a video imported in my uh assets so i'm simply what you have to do is you already know how to import it right because you just simply have to download the video and just import it it is as simple as that now you have to drag and drop the video inside of the video clip parameter all right and voila this is the thing you have to do all right now another thing is that whenever you play all right whenever you play this all right the video will be inverted all right now let me show you what are the problems that we'll be facing now so as you can see in here all right as you can see in here the problem with the video is all right it is currently playing all right it is currently playing just wait the video is currently playing and it is inverted also all right you might not be able to hear the audio but the audio is also playing in the background all right so this is the problem we are facing currently let's let's fix it all right let's fix it see the very first thing all right the very first thing you have to do is to invert this all right invert means rotate this in the y axis rotate this whole plane in the y axis so that we get the video straight all right now after this will be getting the video state another thing all right another thing is that click on the plane all right in here the video option there is an option called play on awake what does this mean this means whenever you are like whenever the application is starting it will start playing the video all right this is what it means now uncheck it all right uncheck it now uh all the problems that we we were facing uh is fixed now so let's implement the features that i told now here you can see here are two option on target found and on target lost right what we have to do is an air uh click on on target found click in it all right and then here you can see this is the video right this is the video now drag and drop it in here all right drag and drop this video in here now uh i fall i guess i forgot change the name so name it video player all right name it video player now what i did let me show you the process again all right click on image target here are two options on target found on target loss these are called events all right these events call some sort of function all right these type of events are also available in ui buttons also i'm also going to show you how to create play pause button in ui all right so don't worry now what you have to do is click on this plus icon in on target found then drag and drop your video player inside this particular field then here you can see here's another here the drop down that no function written in here all right in here what we have to do go to the last and you would find an option called video player all right now in here what you have to do here are multiple options available from these options you have to click on means call the play function all right what will happen whenever all right whenever you try to play the video all right sorry whenever you uh whenever the marker is found all right whenever the marker is found it will start playing the video all right another thing all right another thing is that i want also to integrate whenever all right whenever the marker is lost the video should pause or stop all right so for my case i would like to stop it so again uh in here's an another event parameter that is on target lost again do the same thing drag and drop the video in here call a particular function inside the video player i will be calling stop function all right so yeah this is how we basically create our own video playback features all right now this is the basically uh this is basically uh if you want only to use euphoria to control the video playbacks all right like whenever the marker is found you want you want to start the video and whenever the marker is lost you want to stop the video all right so let's try so as you can see in here all right here uh the marker is found and the video is playing all right i'm not sure you are able to hear the audio or not but you can see the video is playing now if i remove it all right now if i remove it all right uh the video has stopped right you are not able to see anything now if i again all right if i again uh put the market you can say the video is starting all over right from uh from the start the video is starting from the start all right so yeah we successfully created our video playback features all right we successfully created our video playback in viewforia now it is our time to do the same thing using buttons all right that is to implement the play pause and stop functionality using buttons so it is pretty simple all right it is not that complicated what you have to do is see i'm not going to remove these two functions because i think these are good all right because whenever uh i want key whenever the marker is found it the video should automatically start and whenever the marker is locked the video should automatically stop all right or you can what you can do is uh you can uh like make it pause all right just make it pause let me change it to pause on it so whenever the marker is locked the video will pause and whenever the marker is again found after being paused the video will play from the point where it has been paused all right so it is it so that's how we implement uh video playbacks in euphoria if you want to do the same thing with markers like marker lost or marker found all right now we'll be doing the same thing using uh ui canvas in viewforia all right so now as we have successfully created our video playback now it is our high time to implement some particular buttons for it all right so how do we do that the very first thing click on image target um sorry yeah click on image target then go to ui alright and click on canvas all right so click on canvas then in the canvas here you can see canvas scaler here it is written constant pixel size changed into scale with screen size it will help help the ui to be more responsive all right so yeah let me make it first let me go to the 2d mode for designing the ui all right now as i'm 2d mode as i'm in 2d mode now i have to implement the buttons it is fairly simple just click on ui then i would like to implement text text mesh pro buttons all right so i would click on button text mesh pro and it has been imported all right the very first button that i have to create is the play button all right this is the play button that i want to create now i have to anchor this button also all right so how would i do so so simply click in here all right you can see this direct transform option click in here and press alt key after that click on the this last this last one all right click on this last one now i also have to change the text inside it all right so that it uh resembles play button all right now let's make it bold now i i see i would be duplicating this button all right so that it becomes more easier for me now yeah now let me change it to pause all right now let's change the text of it to that is to pause all right now again the same thing duplicate it let's name it stop let's change the name to stop and also make it bold oh all right i i have already made it bold now again go to rick transform alt then the right side see our button is anchored all right in a great way now what we have to do is we have to implement the functionalities so the very first functionality i am going to implement is the play button functionality so click on the play button go to a go below alright go below like in in the last and here you will find an option called button option or you can say button component in here all right in here there's an option called on click all right so simply click on the plus button it's it's it's similar to the image target on target found alright it is similar to that now again drag and drop the video player object inside alright drag and drop the video player object inside the play button then select video player and then click on play all right again do the same thing all right do the same thing with the other button but choose different set of functions based on the function functionality you want all right so this is the pause button so i'm going to use the pause function and there's the stop button so i'm going to use the stop function all right cool now let's let's test it out by playing it all right so guys just see what is happening in here all right so whenever i you can see the video has started playing all right you might heard uh some sort of sound maybe i'm not sure all right now let's let's pause the video all right see the video is pause now the video is pause now let's play it again the video is playing all right now let's pause it the video is pause now if you want to stop it the video has stopped now if we want to play it the video has started playing so all the functionalities that we implemented is working perfectly fine all right this lecture we are going to create our own car customizer so this the basic logic or idea behind this car customizer is would uh would be providing the user three to four different colors all right and based on those colors the player would be able to like select uh a particular color and paint the car all right or with that color so this is the basic idea behind today's project and if you want alright if you want you can like customize this app further like you can add detachable doors you can uh add numerous numbers of tires that a person could change right so uh you could you could do those things also to make this app more uh like more big and later on you can launch it on play store already when you can add uh ads into this application all right so the uh let me tell you so first of all i already have a 3d model all right inside of my unity engine all right this is the 3d model actually i downloaded it from uh sketchfab uh actually uh let me show you this is uh the actual model that was there i edited it later on the this is the actual model that was on sketchfab uh so i'll edit it later on basically this uh this kind of color came just because of uh it's a fbx is uh it doesn't already have the properties that i want so i created a new material and me applied those materials into the car all right so that's what i have done so uh the the better option would be for you to is uh download the gltf models all right that is download the models in glta format because they are they comes in much better quality and they have the texture already embedded in it right so it would be much better to work with those all right so let me first reset its transform all right so uh so yeah i've reset it it's transform and uh i'm like just a bit moving it uh in the z-axis just a bit all right and now what you have to do is uh go to your browser all right first of all we have to create a license for our ar application right and one more thing i have already imported the viewforia engine all right and you already know how to do that and you also know that how to check whether it is imported successfully or not so make sure uh you import the view fourier sdk and before importing all right always make sure before importing change the uh build platform alright because if you change the build platform later on that is after importing the model the sdk then it's gonna take a lot of time so what i did is uh after creating the project i first shifted uh the build uh platform to android all right and then uh what i did is i go i got to the player settings all right after going to the player settings what you have to do is uh go to resolution and presentation all right not sorry not in the resolution presentation just wait okay yeah i was actually in the desktop tab that's why i wasn't getting all the options so now as i'm on the android tab uh go to the resolution and presentation you will be getting a default orientation change it to landscape left alright it's totally based on the camera you can choose any uh any mode you want alright but uh we'll be creating our application in landscape mode only so make sure either to select a landscape right or landscape left i chose landscape left because of the position of my camera all right and uh now go to other settings all right here you would find uh android build settings right so what you have to do is uh select uh android version all right that is the lowest standard version you want to support so for me it's a api level 23 that is android 6.0 you can choose a kitkat you can choose uh lollipop and anyone it means any target api level it sorry minimum api level you want all right and leave the target api level to automatic highest installed all right so yeah that's what you have to do uh so after this what you have to do is you got to go to the uh license manager all right uh click on get basic and create a new license all right so give this license a new name that is i'm going to give it ar car all right and uh click click on the check box and click confirm all right after that open this ar car license and what you have to do is you have to copy this license all right you have to copy this license and go to a unity editor then one more thing delete this uh main camera all right in the united uh delete this main camera because we won't be needing it uh now right click view fourier engine ar camera all right and one thing i prefer the most is to put the ar camera on top of everything so after you have done uh setting up the ar camera what you have to do is uh in the in the inspector tab only you will get the properties of ar camera and in the ar camera you'll be finding open view 40 engine configuration right and in here you'll be finding app license key so click on this blank box and uh just pay paste the license all right just paste the license and you would be good to go right so uh our basic project is set up right now we have to create a database so click on target manager all right click on add database give the database a name so i'm going to give it ar car db all right uh make sure that the type is device and then click on create so after it has created a database open it now what you have to do is you have to add uh the target marker i already have the marker all right so you can select any marker you want so i'm going to select the marker now let me find the marker okay got it now give it a give it a width i'm going to give it a weight of 6 all right and i will keep the name marker on right so just let it upload uh upload that marker and after that or what you have to do is you have to download the marker so that uh we can upload it on our unit engine and one more thing always check that what is the rating that is the augmentable rating of your marker and make sure it has four minimum four all right it should be at least four to five not less than that all right now click on download database and uh select the unity data and click on download all right so it would start downloading the database now save this database uh somewhere in your desktop and uh import it all right so right click you can either drag and drop it in here or you can right click import package custom package or that you can do that so i'm going to follow the second one now click on ar card db all right ar card db your uh unity package this is the database i downloaded and click on open and it's going to take some time to process and it did the processing and click on import all right so it's going to take some time to import uh the assets and wow cool so our asset is also imported right now what as we already have imported our uh car model what i want you to do is right click view for engine image target all right and in the image target you will be finding uh like in the inspector menu you will be finding image target behavior from the type select from database all right and in there select the database and uh your marker will be automatically selected if you have more than or two mark one marker that is two or three markers then you you can select it from there right now this is the database i'm going to like reset the transform again so that i get it in the center of the card now i'm going to increase the size of the car all right so that i could uh match the ratio all right now uh what i have to do is i have to put this car uh means make this car a child of the image target right and uh now we are good to go our markerless sorry marker based ar app is set up all right now what we have to do is we have to uh code all right we have to code our means we basically have to code what are the functions we want in the app so for now we only want to change the color of the car alright that is the material color of the car so first of all i want you to create the ui so how are are we going to do that it's pretty simple right click ui um then canvas all right as uh this app is in landscape what i'm going to do is i'm going to choose the medium resolution so that we could uh like easily make our app responsive all right and put it right in here now after i've created a canvas you can see that there are multiple options in here you can say canvas scaler option is there in there in the ui scale mode section you have to choose choose scale with screen size all right and leave it there only all right because that would actually help us to make the ui more responsible right now what you have to do is uh add some buttons all right uh click on button text mesh pro all right so it would like prompt importer you can import it but currently i don't want it so i would be going with the normal buttons only all right i would like to go with the normal buttons only actually we won't be needing the text so that's why i'm going with the normal buttons but what i would suggest you is to or if you are going for text based buttons or something like that all right even buttons in general i would suggest you or to always go for text mesh pro because they are 1000 times better than you know these other buttons so give it a width of 200 all right out let's not give 200 so it's too big let's give 100 only all right uh yeah now what you have to do is in the right transform only in here you'll be seeing a small box click on it click uh alt all right just wait okay now what you have to do is click alt in here or just do it all right now what you have to do is after you have done that give it a give it a name all right let's give it name i want to name it red all right and let's give it a red color all right and make sure you are in 2d mode because we are going to edit this ui all right and uh duplicate this button all right duplicate this button and uh move it right in in here now give it another color that is let's say i wa i want black right uh let's give it another color that is black uh it might not be that visible so i'm going to make it a bit like this kind of black so that it becomes visible all right now here give another color all right let's let's give it uh blue all right let's make the color blue okay now let's give another color that is uh yellow all right okay cool all right so we have our ui prepared that we got our ui prepared we have uh we have prepared our buttons now what we have to do is we have to code right the very first thing or the very first thing i would like to do is i would be coding a script to rotate our car all right so that it rotates continuously and to do that uh first of all what i have to do is i have to just create a folder scripts folder all right and then click on create then again c sharp script and let's give it a name that is rotate all right so i want my card to rotate actually now it's compiling the application all right okay so give it a few seconds okay so all right it's taking a bit time so let's give it its time so that it is able to do the processing it needs to do all right so our script is uh perfectly compiled now i'm going to open the script in my visual studio editor all right now okay here we got our editor all right i don't want it to be in full screen mode as of now so uh remove the whole start function and comments all right we need the update one so first thing is you have to create a vector3 variable all right vector3 uh let's name it rot all right and what in the update function only what you have to do is transform dot rotate all right and pass this rot variable in there and multiply it with time dot delta time all right now save the script and [Music] let it compile in your unity editor all right so after it is uh compiled what you have what we have to do is we have to put it in uh means inside our car model all right that is we have to attach it as a script in our car model all right so that we could uh use it right and uh all right now go to the image target all right and uh first of all unpack this whole prefab all right after unpacking what you have to do is drag and drop this rotate script in here and in in the rot value uh give it a value of 30 alright it would be like moving at rotating at the speed of 30 all right now what you have to do is play this all right uh play this particular scene and let's see how all things work right so just give it a few seconds so just a few seconds and we'll be good to go all right okay cool let let me uh maximize it okay cool now see our car is rotating all right and that's pretty good all right oh one more thing extended tracking feature is on and of course we don't want that uh go to ar camera all right sorry not ar camera or click on image target all right in here uh select track all right and we'll be good to go right so now as our basically our car means we have created our car model right as we have created our car model now what we have to do is uh click on create she sharp script all right and let's give it change color all right so that we could change color of our car after clicking some particular button all right so just wait it's compiling the script all right just wait a few seconds all right let's open the script in our editor okay cool now what i want you to do is uh create an array all right that is a line renderer sorry not like line random just wait public just give me a second all right so what we have to do is we have to create a array all right of first of all uh create an array of colors all right so that we can store the colors in here now again create another array of renderer that is it will help us to get the renderer of our car material there's a reason why we are there's a reason why we are actually creating a renderer all right uh there's a huge reason means not exactly a renderer why we are creating an array of renderer and you know just wait let's name it uh mats all right now there's a reason why we are doing that because see a car might have multiple materials in it all right that is multi car might have multiple sections in it where there will be different different materials will be up uh like applied right so that's why we are creating a array so that we could include all those uh sections in our you know in our model only that is in our script only right now let me show you what you have to do is record public void all right and write a method or function all right called red now make it public so that we can get it on our uh inspector menu right now we have to run a loop all right that is for nti equals 0 i less than max dot length all right it would be running from 0 to that is 1 minus the actual length of the material all right and uh yeah now you can you can either open the brackets or you can simply write it like this let me show you all right because if it's if it's a one-liner all right you don't need bracket and uh currently it's a one-liner only now what you have to do is mat mat of like i we have to give it take each and every like each particular material and apply color to it so max of i ah dot material dot color equals so you can what you uh what you can do is just wait colors yeah we got the variable and give it the first that is the first value of all the colors all right now copy and paste all right copy and paste it so that we can uh basically replicate it all right now blue all right and or let's say which was our second color in here okay it was black right let's give it black and uh let's give it one all right then in here let's give it blue because it was our third and give it two and yellow and do you know why we are uh giving like first index value as zero then one then to the second we are giving one then to the third we are giving two that's because indexing starts from zero all right so we have our script written and i hope you understood uh understood the script now there's nothing else to do we just have to apply the script and the functions all right we have to apply to the variables right so [Music] yeah so now what you have to do is create a empty game object alright you can do that and reset its transform name it color changer all right and attach the script or to the color changer now what you have to do is you have to give uh you know four colors to it give the array size four and uh let's see how many materials we have to give in here all right so basically the body is there all right now all right not this one not this one this one this one all right this roof sweet not sweepers for window front not this one all right so uh okay all right i understood so go to the color change script alright and let's give it two as of now all right now what you have to do is get the body material in here all right the body is for the whole body right and uh let's get the sweepers that has no sorry uh the roof one all right let's get the where is the roof okay yeah we got it so yeah here we got the hood all right actually there are multiple layers in it so that's why that's why i told you to add like create an array of those materials right now let's get the hood in here okay so we got the hood now okay the body is uh done the doors right oh yeah the doors so go to the color changer add another section all right and uh let's give it the dose right take the doors all right okay just do it okay okay here we go another one that is door fr all right now now let's see what are the things we have to give okay trunk a door right let's give it the trunk dough all right i hope not nothing else is left okay no i guess everything seems good right yeah everything seems seems good now let's let's see let's uh now let's give those colors the first element should be red all right it should be red okay the next that is which the next one should be uh you know black all right now the second one should be you know blue let's give it a move a bit sky color all right it would look good and the next one would should be yellow right now what we have to do is click on canvas all right click on buttons all right first of all uh select every button add a plus sign in there and add the color changer script in here right what you have to do is uh go to a red button click on change color click on red go to the black button again or choose from the change color then select black then from the blue color click uh change color then blue then from the yellow one go in here click on change color and click on yellow where is it okay cool now let's try our app so that uh let's try our app and let's see uh how it performs all right let's see so give a few seconds and we'll be good to go okay cool so let me maximize the window okay cool okay all right cool so we are able to see the car right now let's try the color wow see it looks good right see cool isn't it yeah so our first project is done actually all right uh congratulations you have created your first full-fledged application with euphoria all right you can let me give you some idea what you can do further you can let's say you can add varieties of tires in here all right you can add numerous varieties of tyres you can add more colors all right you can uh like create your own own car model or you can even like take the door of it all right and like rotate it somehow or to get like the opening door animation sort of thing right you can create your own animations like that and add it in there so that the person can actually um you know the person can actually view the inner parts of the car right you can add more customization customizations to it you can add more cards to it right now the next process for you is to go to build settings all right and add click on add open scenes all right that is for our the scene is main or you can simply drag and drop the scene and simply click click on build and it would start building our application all right so if you have any doubt regarding this lecture you can write it down in the comment section all right in this lecture we are going to create our second project all right that is ar business card all right how this uh project would help you is let's say you are going to some client alright and you want to or give them your business card alright you can share the apk already if uh like of course yeah you can do this right so would be creating a ar business card today all right and in this project you are going to learn to like implement your own avatar all right and uh you you would also learn to apply animations right so let's do it so what you have to do is right now let me show you first of all you have to set up your project all right it's very simple create a new project go to file build settings all right in the build setting first of all switch your platform to android all right i have already done that and make sure whenever you are opening a new project when it's blank all right that's totally new uh switch the platform first all right because if you do that later on after multiple things are done in your platform means uh in your project then switching the platform would be very tedious because then it is going to take a lot of time if your system is slow all right after you have uh switched the platform i also add uh also click on add open scenes it will add the a primary scene i am using on right now all right and uh go to player settings in the player settings give it a company name alright give it a product product name all right and uh go to resolution and presentation in the default orientation select whichever you prefer all right i am i prefer landscape left because of my camera position all right then in the other settings uh select the lowest android version you want to keep all right for me it's marshmallow all right and leave the target api level to automatic highest install all right and after that we are done setting up the uh like project all right now what you have to do is import view for your engine and you already know how to do that right and uh another you have to import another sdk that is the ready player me sdk all right uh it it will enable us to create uh 3d avatars all right i have already i already have five avatars in my dashboard all right so you can also create yours and upload it in unity all right and to upload them you you have to use this unity avatar sdk all right so click on this download the latest version and download your sdk right and then import it the importing process is totally similar already there isn't much any difference so yeah all the things are there are totally similar all right i have already imported both euphoria and ready player me all right now what you have to do is we have to set up our view for your engine now all right so first of all to do that go to click on this main camera then delete this main camera all right then again go right click view fourier engine ar camera all right you have this ar camera now put it on top alright put it on top okay now after this is done we have to create a license key alright so go to open view for engine configuration and we have to add a license key in here so to do that go to your view for your developer portal click on get basic all right and then you have to get a new license all right give the license name that is business card all right and uh check check this box and click on confirm all right and you'd be having your business card right in here all alright that is the license of your business card so now what you have to do is uh click on this particular means copy this code all right and paste this code in your view for your configuration that is in the app license key all right and we are good to go now what you have to do is open this and we also have to add a target manager all right that is we have to add our own market database so how do we do that uh click on add database all right then let's uh business card marker all right card wait okay marker all right db so i create this database all right and after you create this database you are going to find uh open this database and add the marker already add the marker that you have created in there all right i have my own business card marker all right so i i will simply add that in here and then download it all right so just wait let me find my business card marker oh yeah i got now import it all right after you do that uh give it a uh give it a size alright i'm going to keep it to six all right and you can i am going to keep this name already you can give any name you want and then click on add target all right and it would upload the target in your database now what you have to do is after all all these after all these things are done download the database all right click uh that is click on download database and then select unity editor and click on download all right and this would actually start downloading your database all right and then what you have to do is you have to import this database in your unity as simple as that all right so now open your unity all right open your uh unity drag and drop alright drag and drop this uh sdk all right drag and drop this sdk into sorry not sdk the database into unity and click on import all right so after after all this all right it would import your sdk and sorry not sdk your database and we are good to go all right now what you have to do is right click in here click on view for your engine image target all right so it would create a image target uh game object in here and in the inspector menu you would be finding image target behavior in there click from database select the database and voila you got the marker right so here you can see we i have the business business card right now what we will be doing right now is we have the avatar right i already have imported the assets all right first of all let me convert the asset so select all these assets all right uh all all of them are png's all right so set the asset and in the texture type go to sprite 2d and ui and click on apply all right so it's going to take some time it's going to convert all the textures to a certain type all right that is this sprite 2d and ui all right and after it is converted right i'll be back so our assets are converted all right and now we are good to go all right so now what you have to do is uh you have to import the 3d model all right so how do you do that first of all uh click on this ready player me button in here all right that is in the head and click on avatar loader all right in here what you can do is uh create a new avatar for yourself all right i i already have them uh create a new avatar all right it's very simple to create one and create avatar and then what you have to do is click on that avatar in the three dots all right and copy dot glb url all right copy this glb url and go to unity editor here you can see avatar url or shortcode you have to paste that link you copied all right okay so now have a few options all right first of all uncheck this model caching why see this model caching feature is a feature by uh ready player me only what happens now it will cache your model in unity now if you don't alright let's say if you if you uncheck this model caching what will happen if you make some changes all right if you make some changes on the ready player me web that those changes of the avatar will automatically get reflected in your unity editor all right so for now i don't want uh model caching to be there but if you want that if you want model caching to be there you can do that all right but currently i don't want uh my model to be cached all right and or if if use i animations is not checked click on this use i animations all right and after that click on load avatar all right so it would start loading the avatar all right so first first of all it will download then simply import your avatar okay so our avatar is now loaded as you can see right in here all right so first of all let let me uh keep this avatar in a different place all right and let me add another plane all right that is go to 3d object uh in the 3d object click uh plane all right this plane is of course a big first of all let me reset the transform all right and let me you know put it down a bit and let me go to the top view so that i can i could adjust all right i could adjust this particular plane okay cool all right okay so we have adjusted our you know okay we have adjusted our plane all right now you can simply put it upwards all right cool now uh what i want you to do is attach a material in or to it all right so how do you do that click right click on the project panel create a folder all right create a folder called you know material all right right click create folder material click in here uh go to again material and give it a card material all right card mat all right so that we can add the material in here and in this albedo click on this option alright and select the card material in here okay and then drag and drop it in here all right now rotate it all right rotate it so that we get the perfect alignment all right so now we are good to go now let's uh edit this material a bit right okay of course metallic doesn't look good all right yeah let's let's experiment with this material a bit all right wait so now as you can see we have a menu right in here all right uh click on legacy shaders and click on diffuse okay now it does looks good all right so let me show you how how i did it in the material section click on the shader option all right then go to legacy shaders then diffuse all right so that's how you do it all right so yeah i hope it's clear now what you can do is uh drag and drop this plane all right inside this image target and you get this avatar right reset the transform of this avatar all right reset the transform of this avatar scale it all right scale it a bit scale this avatar a bit all right first of all you remove this directional light alright i don't want this means remove the shadows not the directional light of course after removing the shadows all right rotate rotate this particular avatar all right let me rotate it okay cool now put it right in here all right on top of this blank area all right okay let's make this like this all right cool so now you get a avatar all right you can add a rotation script all right so let's let's go to uh create another folder all right let's create a folder called scripts in the scripts folder create a shop script all right and name it rotate okay i'm going to hit reload in my visual studio editor all right so it's currently compiling and it also reloading my visual studio editor so just wait a few seconds so now uh our script is compiled all right now let's open this in our visual studio editor all right and let's write uh some script in it first of all remove this start and all those comments all right simply create a public vector3 all right vector 3 and give it rot all right and then click on transform transform dot rotate then pass this rod value and uh on the rotate function and multiply it with time dot delta time all right and then uh save the script and uh compile it all right after compiling it we we have to attach the script on the avatar all right to make it work so it's currently comparing the script so just wait for a few seconds and you know it would be done right so um yeah sure so our script is compiled now what we have to do is click on this avatar all right add the script right in here all right and give it a rotational value of let's say um 10 all right and also drag and drop this a particular avatar inside the image target or make it a child of the image target all right so now as we uh did a lot of things right in here all right let's uh let's see if everything is working perfectly or not all right so let me open my uh marker and then hit the play button all right hit the play button all right so that's what you have to do right now so click on this play button so now as you can see our camera is open now let's uh cool see uh all the features that we implemented as of now is perfectly working but here you can see the uh character animation is being played right the character animation is being played but the problem is that it is uh sometimes it's also walking all right it's also showing the walk animation and i of course i don't want the work animation all right and here comes another problem that this extended tracking so we'll be fixing these problems alright before moving forward so how to do that first of all uh let's fix the about or let's let's fix the image target problem all right click on this image target uh change it to tracked all right then in the avatar what you have to do is and you can see in the controller option click on mail full ball with body that is the controller name and double click on this and it would open animator window here you can see that uh there there's two pathways that is first it is going from idle to walk then again it is going to walk to idle all right so simply delete this all right simply delete this particular uh animation and we will be good to go all right now also i want to increase the size of this avatar a bit all right so yeah now let's see how everything works right let's see how how perfectly uh things are working and if it needs any more changes or not right so yeah just give it a few seconds okay cool okay yeah it looks good it does looks good right now all right so yeah and also this uh tracking thing is fixed right and currently you can see the blink speed all right the blink uh you can increase the blink speed all right that is i can make it to like 0.3 maybe all right i'm going to increase it to 0.3 it's the ideal value i i find all right now as our avatar is set up all right now also set up our you know our ui all right now how to do that this thing is fairly simple go to image target click on ui then uh select the canvas right in here all right select a canvas and currently this is a 2d canvas and of course we none of us want 2d canvas uh what you can do is go to click on click on this render mode alright and select world space select the uh here you can see here's an option for event camera uh drag and drop this ar camera into this event camera all right and here you can see our canvas is now transformed to 3d mode all right now let's let's edit this canvas all right let's scale it down alright and let's reset uh not reset let's reset its position all right here you can see we also we need to scale it down more okay now rotate this into y-axis not y or x-axis to 90 degree all right and make sure it it is like this all right give it a bit bit space to it so that you can you know add our ui into this right now what you have to do is you have to add ui to it right what you can do is click on this uh canvas all right then go for uh first of all i want to add an image so click on this image all right and uh let's drag and drop it in here all right so this would be my profile image all right and i already have the profile image so i'm going to just select it and you can see first of all let me do actually uh i guess the rotation of the canvas is uh different let me let me check yeah the rotation of canvas is wrong just wait let me fix the rotation okay 180 all right now let's get this particular image in its right place okay cool so now we got our image right in here all right so you can if you want you can like increase the size of the image all right and let's add our name text on the side of the image so what you how do you do that click on ui then click on text mesh pro all right import the text mesh pro all right because this is the bet best alright there's the best for button and text both all right and it would start importing the assets so it's gonna take some time so give it some time all right so i have imported the text mesh pro all right and also i have also imported the text mesh for examples and extras all right because it already provides some really good fonts so i'm going to use them all right now as you see we have you know the text in here now write your name in here so priyanshu but touch rgb all right so what i'm going to do is i'm going to like in the wrapping i'm going to disable the wrapping all right because i don't need it now uh let's see uh let's let's choose a font from the given set all right let's see which one would be good okay now this one of course not this one no let's see yeah this will uh let's check the anton one okay so roboto looks good all right this roboto one looks pretty good now what you can do is you can adjust it all right i just used more i think this this is good this looks uh just to it okay yeah no just wait let me adjust it a bit all right yeah this this this is pretty good this this looks fine and uh all right so now we have set up uh this particular profile thingy right now what uh i want you to create an empty prefab alright right in here all right create an empty the game object and let's name it a left container all right because as we are going to add animations to it all right so position it in you know in the center of these two assets that is the image and the text put it in the left container all right and let's uh you know sort of add a bio in here okay so this would be a short bio so i am let me write let me uh complete the bio all right then i would again resume the video so i wrote the bio all right now i have to adjust let's adjust this bio right in here all right so that like you know uh this of course doesn't looks good and uh just give a moment all right okay so let's give it a height of 400 not 400 let's give it 200 okay yeah this this looks good now let's reduce the size all right let's make the size 25 maybe or 20. yeah i guess i guess it's fine let's make it 350 all right yeah i guess uh this is fine this this this looks fine now align it a bit alright align this thing a bit and uh actually let's remove this intro thing all right let's add two buttons in here all right let's add two buttons in here go to ui click on button text mesh pro all right go in here you know uh increase the size of the button alright increase the size of the button put it in the middle maybe all right and i have wait i have the logos right in here go to assets okay let's let's make two button for our social media that is you know uh this instagram and uh linkedin all right so i'm not going to remove this particular text i'm going to make it bold and let's name it linked in all red so and let's reduce the size that is make it 20 all right and in the button only click on ui then again add an image all right reduce the size uh in the image add the linkedin you know link this linkedin image in here all right and drag and drop it to the side right put it in the side uh make the text a bit centered right okay let's make it uh side all right let's just give me a second let me reduce the size of the text again that is let's make it 17 maybe okay sorry 20 buy mistake i got 27 all right cool now i would also like like to or just wait okay so i would also like to uh reduce the size of the button so just simply remove these text from there all right now just wait let me reduce the size of the button um okay good now again uh make those text and images the child of the button right so let's adjust it a bit again um right yeah this this looks good okay and also go to gizmos all right and go to gizmos and you can see this 3d 3d icon slider just make it small all right so small that you can't again see those things all right and okay now yeah this looks cool so then name it linkedin all right then again you know duplicate this button all right put it in here all right and let's uh name it uh instagram all right so give the text instagram all right so let me reduce the size a bit for this one okay 15 okay all right here we go and change the image to the instagram image all right and yeah so we got our buttons in here so now you what you can do is you can simply you know take these two buttons all right take these two buttons and simply put it right in here all right or let's try some let's try making this button a bit you know larger in size okay now just give a moment and yeah these looks good right so we got our left container all right that is the left left panel all right it would be like coming like this in the animation and let's create our another container all right let's create an empty container let's give it a bottom all right that is it would be in the bottom container all right so bottom container now in the bottom container again place that uh add an you know uh ui that is an image all right add an image in here uh give this uh image a new you know component that has button component all right because we'll be using them as buttons all right now get this container and drag and drop it in here all right so uh as if you don't get that container all right now what you have to do is take this image and put it in the side and add the discord icon in here all right and let's uh give it a name discord okay this cord all right then again now duplicate this and again place it in a bit you know change the position and place it in [Music] the side of it and again drag and drop the github you know github logo and again duplicate it all right and now it's the time for you know youtube so now rename it to youtube all right now what you can do is okay so yeah so we got our three button containers all right and make sure to place it in the center all right um let me reposition this you know the button of just wait let me reposition this all right just give me a second let me make all the things in center just give me just just a moment all right okay yeah now i guess everything's fine right so now we have the buttons in here all right we have all the things that we would be needing let's uh again let's reduce the size of this one too let's make it 14 maybe all right okay now let's go for 15. all right this looks good so now as our buttons are created right now what you have to do is we have to create a script all right because of course the these buttons have to do something right these buttons have to do something so what uh this buttons will be used to open the links all right so how to do that click on create a new she shop script all right and name it link manager all right because we would be adding the links in here all right and after it gets compiled open the open the link all right so [Music] so we have to write some you know some functions all right to open the links the the script is pretty easy so now as our script is opened all right uh everything's pretty simple just remove all this comments and start an update function we have to write our own function that is public all right void i'll say open linkedin all right give give the function name anything you want all right and now uh within that function we have to write a particular line that is application dot open url all right and in that uh pass your linkedin profiles url all right so here i have the linkedin profiles url and now i'm going to paste it right in here all right similarly write some other function that is public void open instagram then again application dot open url then you know add the instagram url copy link address okay there's some problem with the link all right let's remove this yeah we got our linkedin uh that is instagram pro profile all right now again uh let's create another function that is open github all right so um application dot open url and let's put our github profile in there copy link address all right so we got our get get a profile too right all right so now let's add our you know uh which one is left now let's see discord yeah so open discord so this is uh the discord server of android so you can join that so application dot open url and uh all right just wait let me copy the url copy link address all right so here we got the url all right now another uh was youtube right public void open youtube all right so application dot open url now again uh put youtube in there this is the put the link of the youtube in there all right so i'm just going to copy the link all right and you know just paste it in here and let's compile the script so uh so our script is compiled all right now you what you have to do is create uh empty game object alright reset its transform all right just just do it ah yeah so reset its transform and add this uh also rename it to link manager alright because we'll be attaching our link manager script to it all right and attach this link manager script in here now what you have to do is uh go to the first of all uh this is the these are the button all right so first of all go to this linkedin button all right in here you can see on click click and uh click on add then add the link manager then click on link manager and find open linkedin all right so and we got the open linkedin function now again go to instagram on click link manager open instagram okay and in the bottom container click on discord on click link manager and then open discord and again github save do the same thing for github all right so add the github one then click on open github there again youtube add the link manager link then again open youtube where is youtube yeah we gotta so that's how you do it all right now let's test if everything is is working fine or not right so just give a few second and let me show you so here you can see that our business card is created all right and uh click on any button all right let's say that's this discord button so what will happen it would uh start opening the url in my browser all right so here you can see it has opened the url in my browser and so you can do similar things with that you can add more features all right and now it is our time to add the animations to it all right so how would we do that see uh adding the animations are very simple what you have to do is click on this left container all right then go to your window uh go to uh sorry in here go to this animation section and click on animation and a window like this would appear so uh create all right click on create then what you have to do is uh create a new folder in here let's uh name it anim solid because we'll be storing all our animations in there all right and uh in the adams folder give it uh give it a name called left container left container anim already done save the animation all right now what you have to do is here you can see first of all see here in the record button click on this record button all right and you know put this inside alright put this inside of in here all right now uh let's give it a let's say 50 second gap all right and again pull it back in here all right now let's see okay if if you want you can make things more slower by dragging it to like uh one all right so now our left controller animal is done right so let's make it up to full all right and now in the bottom container what we have to do is again click on create all right and let's name it bottom container and all right and uh save it then again click on this red icon all right this record button drag drag it in in here all right drag it in here and then again go to one then again bring it up in here all right so that's how we do it right so that's how everything works right so now our animation is recorded you can play the animation and see it's working all right now here's a bit of a problem all right this animation all right this animation would be looping all right when when the animation works right so to fix that click on go to the anime folder all right and uh you can see these triangle icons right so click on them and uncheck the loop time option alright and again in the left container also uncheck the loop time option all right now let's see if the animation is working or not right let's uh let's check that all right let's check that so let's see oh our animation didn't work but can you tell why because uh see when the scene started now it already played the animation all right means uh let me show you again all right let me show you again let me uh you know bring it up in here all right and let me show you what is happening in the background okay so just give me a second and here you would see that when the scene start it would already play the animation now we all we do have a fix for that and i will show you what is the fix it's a very simple fix only all right i will also make you understand the concept of that all right so just give me a second and uh would be good to go right so here you can see the animation is actually not playing because it has already been played right so this is the problem so how to fix this let's let's see how to fix this all right so the very simple way is to go to the image target all right and here you can see uh there's on target found and on target lost right and uh currently our work is with this on target found right so what we will do is click uh click on this get the left container in here go in here go in animator all right and click on you know play right and if on target is lost all right away uh okay if on target is lost what you have to do is go to the left container all right and uh just wait click on stop playback all right now let's see if if it's working or not all right so our camera is active all right let me uh maximize the scene all right let me maximize this game view all right and let's see see our animation is perfectly working all right and let's remove it and then again bring it see our animation is working so we have to do the same thing all right we have to do the same thing for the bottom container too and you know what will happen our first business card will be created all right okay so drag and drop the bottom container then again click on play all right and then in the on target lost again drag and drop this bottom container and then uh click stop playback all right and let's see so now let let me show you all right see the animations are perfectly working right isn't this uh great so like this you can create your own avatar like see uh this uh means your own business card see here you can see this there is avada and it is also blinking can you see that see it is also blinking so our business card is perfectly created all right so now what you have to do is uh you have to build this application and to do that you simply have to go to file build settings and click on build the application and give it a name and save it alright so that's it so this is how we create a business card all right so hey guys in this lecture we are going to create our last project that is of euphoria that is we are going to create our last augmented reality application in these series all right after these after this uh module we are going to start with spark ar so it's also going to be really exciting to work with sparky so yeah without any further ado let's get started so the very first thing all right i want you to uh is set up your unity engine already is to set up your view fourier engine you already know how to do that it's fairly simple first the very first step is go create your unity like unity project all right after that uh go to your build settings in the build settings all right you would be finding android option all right if you don't have android option means if if it is showing something like this uh no android module loaded install it install with unity that means you haven't installed your android module so do that after that what you have to do is click on build so in not build i'm really sorry you have to uh an app an option would be coming called switch platform all right like uh like this switch platform so as i'm already switched to android it's showing me build but uh in your case it will be showing switch platform so click on switch platform and after you are done done switching your platform go to the player settings all right go to the player settings and here add the company name at the product name all right then go to resolution and presentation in here you'll be uh getting an option of default orientation i uh for in my case all right in my case i want it to be landscape lift uh i'm adjusting this just because for the camera position of my device all right and in the other settings we have to set up our android build version so currently it is getting all the api levels all right uh the one i all i means i always go for is android 6.0 all right you can even go for android 4.4 alright it's totally upon you uh so i'm again going to go with android 6.0 all right so here here i have selected android 6.0 there are multiple api levels i have i have up to api level 30 that is android 11. you can choose any one from these and i suggest you not to go above android 6.0 all right because nowadays most like most of the device starts from 6.0 like four to five year old mobile phones have android 6.0 in them so uh means take the api level as high as 6.0 all right don't go above it as of now now you can even select android 4.4 kitkat all right it's totally upon you and leave the target api level to automatic highest install all right just like it is and uh yeah we uh our setup is done all right now what i want you is to uh import the viewforia engine you already know how to do that and i have already imported view 4d engine just cause because it's going to take a lot of time to import in my system all right if your system is fast it's it's not going to take so much time but in my case it took a lot of time so i've already imported it and you already know how to import it all right so now let's uh first create our user interface all right that is the main menu after that we are going to set up our viewfore engine all right and uh you see i'm pretty sure that you already know how to use the ar camera how to use the image target right how to use uh means how to use the dashboard means the website for getting the license for adding the image targets all right i'm pretty sure you know that and i i want you to try this ar encyclopedia yourself first all right try this one first by yourself all right and then watch the video all right because that would be a really good practice for you so you can do that or even watch the video and develop along with it all right now let uh i i already have a scene this is the sample scene all right i just want to rename it because the uh in here i am going to create the ui so hit a rename and let's name it main menu all right it's asking to reload okay cool so we have basically renamed our main menu all right now what we have to do is we have to uh provide a canvas to it right uh because uh the main menu is going to be our ui all right and uh one more thing i would like to tell you that this this ar encyclopedia project is based on dinosaurs all right currently uh i have included three dinosaurs all right you can add as many as you want the three are triceratops uh t-rex and the spinosaurus all right so you can add as many as you want and even launch uh this product after developing it all right and i have al also created the ui assets already all right i'm also going to show you how to play pause and stop an audio in this tutorial so hang tight there and for the tutorial so first of all right click in here and go to ui and click on canvas all right and in here in the top you would be finding a 2d option click on that 2d option and then double click on the canvas option and it would be focused all right so and the thing go to the game window all right and choose a resolution see for uh developing a responsive ui what i generally do is i have three resolution all right one one is of iphone 6 that is the medium resolution one is of uh not exactly the medium all right but i have iphone 6 that is the lowest resolution i have oneplus 7 that has the highest resolution and redmi note 5 that has the medium resolution all right so what i want you to do is uh you also follow these uh three means these three presets you can create your own by like uh in the game window here you'll be finding a drop down go in here and click on this add button give it a name uh give it and width and height all right so and click on ok it would help you create a means a basically a resolution of any phone you want all right so currently i want to go with iphone 6 all right this looks good now what i want is uh in this canvas i'm going to create a you know panel all right for attaching my background image in here so i just want to stretch this you know stretch this panel out a bit because let me show you why uh go to a game window if i'm not sure if it's visible to you or not but uh just wait if if you can see uh here are some edge edge spots like uh the panel isn't covering the whole uh you know whole canvas so that's creating a problem so that's why i'm going to you know stretch it out a bit okay and uh now what i want to do is i want to uh click on the panel all right then in the color image here is an option of alpha i want to increase it all right so that it doesn't uh means it is not transparent all right and in the background here you can see source image i am clicking this button to select the image all right and in here let me see yeah i got the background image in here all right so this is the background image i'm going to use let's see how it looks yeah it looks good all right and now what i want to do is i want to give it a heading right so i have also created an asset folder so click on this image all right click on this image and let's let's give it a name that is heading all right after you give it a name of heading what you have to do is you have to choose the title all right that this is i have kept the title as dynapedia all right so i'm going to adjust this particular asset a bit all right so that you know it uh it fits good to the ui and you have to do one thing all right go to this particular transform alt and you know then anchor it on the top all right now uh adjust it a bit all right and let's see how it looks yeah it looks good let's stretch it out a bit no let's uh let's stretch it out a bit okay yeah all right now it looks good now let's drop it down a bit all right let's drop it down a bit okay cool now i have to add a button in here that is a start button all right so i'm again there are two ways you can do that all right i'm i'm going for the image one but let me show you first of all go to uh ui you can simply select uh button you know uh simply select a button and then from that uh button delete the text all right but uh i don't want to do that i'm going to do a very simple thing that is go to ui select an image all right and you know select the start button asset all right and then again uh you know stretch it out a bit all right so that it looks you know looks good all right now now that it looks good what i'm going to do is uh also anchor it all right and cut it maybe actually let's anchor it in the center only let's keep it at the center click on start button all right oh i guess one thing i forgot yeah see i always forget to make this change all right whenever i'm created creating a ui and i just it just comes to my mind after many things are done and i again forgot to do that all right i'm really sorry about that actually in the canvas all right click on this canvas here you'll be finding an option or means a component in the inspector called canvas scaler in there you will be finding ui scale mode what you have to do is uh you have to change it to scale with screen sets and see this is why uh i like i really hate it when i forget about you know setting up all the things in the ui so it happens with me a lot all right so yeah forget uh forgive me about this but uh yeah now as everything's working fine all right we are good right so yeah let's you know uh let's make this button a bit more shorter just wait all right where is the button here gotcha all right yeah it looks looks good now in the start button all right as it is an image we won't be able to click this image or of course we won't be because it is not a button right now to make this image a button what you have to do is you have to click on add component in here all right you have to search for uh something called button all right and here you would be getting a option for button all right and now this image is a button all right this image is transformed into a button right now i want you to create another image all right go to the ui um then you know let's let's give it a size of let's say 60 60. yeah i guess that's that's really cool then again select another ui that is the quit you you quit button all right of course you want to give a quiz button right so so that people can quit from the application right now what you have to do is again click uh click on this rec transform click alt and yeah here you go we have our button aligned right on the bottom left all right now let's see here it looks good now let's just do one thing let's you know shift it on a bit or change the position of it all right and let's make the size 50 50. yeah now now again let's change it to 40 40. yeah this looks this looks really good right so we have created our main menu all right now as we have created our main menu now what you have to do is uh we have to create our arc all right so let's see how to do that first of all as you have created a main menu congratulations and what i want you to do is go to file click on build settings and add this main menu on the top all right and always remember whenever there's let's say there are multiple scenes alright three to four scenes always remember to put the main menu all right to put the main menu on top of every scene all right because uh this would mean the scene in the top all right the scene in the talk will be the main scene all right would be the means in in the sense that it would uh means after building the application the application would start with the scene that is on the top all right so always remember to keep the main menu on the top all right so yeah as our you know our main menu is done now what we can do is we can create another scene uh that would be our ar scene right so right click click on scene and let's name it arc all right and let's open it now i want to enable the directional light so let's do it i'm going to select the common lighting settings i have all right and yeah we are good to go now what you have to do is let me show you first of all uh first of all the very first thing is i want you to create a basic ui the the ui would be containing back button all right so what you have to do is go to canvas in the canvas what you have to do is uh change the constant pixel size to scale with screen size all right and then in there click on ui then add an image all right then select the back button um change the width to 50 50 all right and uh let's you know anchor it to the top right side top left right now let's change the position of it let's say 50 and minus 50 all right so let's see how it looks now it's uh it's a bit too much so go for 40 and you know minus 40. yeah this looks good all right so this is one of our ui and also add a button component to it okay so i i somehow added another component this is virtual but button behavior and of course i don't want that just to wait let me remove this whole thing okay yeah just uh let me again reconfigure the button okay cool now go go in here and add a button component all right and yeah our button is created and rename this button to back button all right now for uh further all right for further development we have to set up our view for your engine all right so it's fairly simple delete the main camera all right delete the main camera then add a v40 engine ar camera all right and you know drag it and drag it to the top all right now as we have the ar camera we have to you know create a license so what you have to do is click on get basic and in here give a license name or as i want as my app's name is dynapedia i'm going to give it a dynapedia license name all right and simply just you know copy the license key great so now that we have our license key go to ar camera click on open view for your configuration all right and paste it okay so now our license key also set up now one thing uh just give me some time alright i'm going to prepare the markers all right and then i'm going to come back and show you how to also add the markers all right and how to use it in your project all right so now we have downloaded all the markers we needed all right now what you have to do is go to your target manager click on add database then give it give it give the database a name let's say dynopedia db all right so then click on create and it's going to create a database for you so now what you have to do is after opening the database you have to add the targets all right so click on single image all right choose the image file all right so this is not the one just yeah here i got it now this is the marker one all right so let the name be marker one and give it a width of let's say six all right and uh wait it for wait for it to add the target and let's add another target all right okay let's again give it a weight of 6 and add it all right let's add another target all right see all these markers are taken from google all right so you can find them on google only then click on add okay cool so we have our markers all right and all of them are four star markers and that's totally fine anything uh between three to five is okay but less than that don't even like give uh don't even work out with those markers all right and even i would suggest not to go for three star markers also because their tracking is also not up to mark all right so always have markers having four to five stars not less than that now we have to download the database all right uh i'm going to download the database so it's going to take a few minutes and then it would uh start downloading all right so let me save the dynapedia you know package in here and after it's downloaded let's import it all right so here got a window pop-up and uh click on import so now it has started importing our assets means our markers all right and we are good to go now as everything in here alright is is working pretty fine our air can uh ar camera is set up all right now we have to set up our marker so how we how do we do that first of all go out of 2d mode all right go out of 2d mode and uh click on uh there's right click view fourier engine image target all right in the image target click on from database select the database and get one marker all right and i'm going to get the first marker for the first marker of course all right here is our first marker now what i want you to do is click on the image target in here you will be finding an option tracked or extended track click on track all right and let's give it a name marker one or let's uh keep the marker one for the t-rex all right or let's name it t-rex marker all right let's add you know another another marker and uh again let's select from the let's get the marker too all right let's shift it uh in the side a bit all right now name it spinosaurus marker all right now again view fourier engine another image target now name it triceratops all right now select from the database get the database and you know there is our marker 3 all right so we also got about so we have our three markers right in here all right okay uh let me uh shift it to tracked only all right oh all right so let's check if everything is set up correctly or not yeah everything is set up perfectly fine now i have the models imported in here alright it is of spinosaurus t-rex and triceratops now what i want you to want to do is i am simply going to add first of all i'm going to add the t-rex model in here all right right in here all right and you know it's uh it's really really big and i'm going to scale it down a bit all right and make it like this all right okay cool so here we go we let's you know let's make him settle down a bit all right okay cool so here our first you know first model for the marker is ready i'm just going to drag and drop it uh instead of the tdx marker all right so our first one is ready uh let's you know let's get the second one that is of the spinosaurus all right ah very cool great one actually let's set up this one too all right if you want you can add rotations but uh for the dinosaurs one i'm going to i'm not going to add the rotation all right i'm not going to add rotations in here all right i was actually trying to get uh animated 3d models for uh for dinosaurs but uh actually didn't uh got any like not in the asset store not on sketchfab even i got some of the animated but the animations weren't working so you know that's why i had to get these now let's again add this one oh this says triceratops all right let's add this buddy in here okay cool so now we also have our triceratops right in here all right okay very cool so now uh let's uh again make it a child of our tri set of marker all right so now our 3d models are set up now you might be thinking oh this is it our third project is done no it's not because i'm going to show you something more what see this is an encyclopedia right there is an er encyclopedia how can we call something an encyclopedia if it doesn't have any information about that particular thing that it is in there right so of course i'm going to add some more things to it all right as there's an ar book this is an ar encyclopedia i'm going to add information too so how would we do that fairly simple you need not to worry first of all go to the tx marker create a canvas yeah right create a canvas so create a canvas all right remove the remove the constant pixel size and change it to scale with screen size all right in here you'll be finding sort order give the sort order all right sort order means it would be means it would keep this particular dinosaur layer means this particular tdx canvas on top of the main canvas in here all right so that's why i give it a sort sort order of one all right so that it doesn't overlaps or something right now uh go to your 2d mode all right go to your 2d mode select the canvas first of all i want to disable this you know this main canvas so that i get the full trx canvas in here now what i want you to do is right click ui image give it a width of you know 60 all right give it a weight of 60 anchor it down to the you know bottom left and you know change the position to 40 and 40 all maybe 50 and uh 50 actually let's check if it's aligning with you know this particular canvas let's check this one all right and uh you know select this i button all right this is going to be our information button and i'm i want it's size of this button means i want size of this button to be like this all right so width and height is 50 and 50 let's give it 50 and 50 all right and let's make it 40 and 40. all right very cool all right so yeah one of our canvas is ready now what i want you to do is you have to add uh you know another image that is go to ui image all right in here i have a panel right in here all right and i want let's say let's just scale it up a bit all right and uh let's anchor it down in here and let's reposition it okay all right let's see if any spaces are left or not i don't want any spaces to be left or all right okay cool so now let's see in our canvas all right let's you know let's let's increase the size of of the panel a bit all right now it looks you know good right isn't it let's let's check okay so yeah this this ui works with you know all the basic resolutions we have right now first of all this it's i is a button so i'm going to name it information button all right and uh you know what i'm going to do add a button component to it this image is you know a panel so i'm going to name it panel and all the information alright would be all right all the information would be under this panel so what i'm going to do is right click make sure now all the things i'll be creating all right will be this uh panels child already the text and all that stuff so i'd be creating will be this panel style all right so what you have to do is ui image all right we have an image select the heading that is information heading right now let's resize this thing a bit mm-hmm all right okay cool now again rec transform alt anchor it in here uh reduce you know scale it down a bit okay cool we are good to go now also one more thing we have to add in text in here before adding a text all right first of all let's name the change the name of it i'm going i was going to say name the change of it now we have to add some more button that is play pause and stop button again go to you know image and let's anchor it down as of now all right and let's let's get the button uh size that is the player this will be the play button all right let's you know drag and you know let's change the size of it okay cool so now just wait all right okay let me let me start it from again so again go to you know ui image you know bef let's do all the thing before anchoring it all right let's get the width to be 20 maybe okay cool now anchor it down all right now reposition it so you know it looks good duplicate it all right again duplicate it okay so now it does look good all right make it to the center alright so that it looks okay okay that's that's pretty good change the name to play button change this one's name to pause button all right [Music] just give a moment all right and change this one's name to stop button actually uh i i have the audios all right this would be playing the audios in there so also select all the three buttons uh add uh you know button component in here and we are good to go now oh yeah also i have to change you know the picture of it right so i'm going to do that okay so pause button got the pause icon stop button is going to get the stopper now oh yeah you got it all right it looks good right now let's add a text in here all right so click on ui always use text mesh pro all right use nothing except xmas pro now first of all let's change the text color to black all right and let's resize it all right let's resize it um change the text size to 20 and uh first of all we have to create a font asset because we have a different type of font and let me show you one thing this uh text mesh for only except sdf type fonts alright so currently the font i already have a font called comic new all right so this is uh comic new bold so this is a font already but we won't be able to apply it uh let me show you see we are not able to apply it so to apply any font for into text mesh pro it's very simple click on window all right click uh here we'll be finding uh text mesh pro click on font asset creator uh window will be popping up drag and drop this font asset in here all right click on generate font alias all right so it's going to take a few seconds and uh it would be like you know creative create the font asset for you within no time all right and uh click on save so here we got our font asset right in here all right and now what you have to do is click go to the text all right just wait go to the text and uh drag and drop this font asset right in here and see we got our description panel which is description text now i have some text already written in here all right so i'm just going to copy it in here and simply paste it in the panel all right cool now these looks pretty good all right doesn't they and center them all right like this okay cool now as we have got our information panel we have to also code all right code is code means uh i want to click this button all right and enable and disable this particular panel and creating the script is fairly simple what you have to do is go to asset uh create a folder of called scripts all right okay the folder didn't got created alright okay scripts all right after you create this folder scripts all right you have to create a shisha script so now our script is created i'm simply going to open it all right on my visual studio so let's get this thing going in here all right great so first of all let's start coding it see first of all understand the mechanics all right you there are two ways you can do that all right first of all uh let me tell you one way that is the first way would be a very simple way actually both the ways are simple all right so the first way would be uh adding a set active function to it all right set active means uh when you will click this button this panel will be deactivated from the first so set active function would actually activate that and with that all right also disable this button and add another button all right that is activate another button that would be like looking similar like this but would be having a different function that is it would be setting uh it to false alright setting the set active to false and that would make this particular information panel disappear right another way all right this way is uh i prefer to do it this way so what you have to do is first of all create a variable so basically in this winner you would be using the single button only to uh switch on and off the panel all right so this is a little this is less hectic so first of all uh create a boolean variable and uh set it to false all right let me uh increase the size of this editor a bit now create a serialized field all right that is i will tell you what is it so game object in for uh mission panel basically see uh this serialize field uh parameter basically first of all uh understand that this is a private all right this is a private variable and the serialized field helps us to serialize this that is show this private variable in the inspector all right so that's what the serialized field does it it serializes this particular variable even though it's private in the inspector menu all right now click on uh create a function that is public void on toggle or button click or let's say toggle panel all right now this this uh thing is fairly simple click on means write if if this panel is on what you have to do is you have to set active it to false all right you have to disable it and set the is on to false now in the else block just copy this let this two lines and paste it in here and change them to you know true all right okay very great so now let the script compile all right so our script is compiled what you have to do is go to uh go to this you know go to this canvas all right add the script in here all right add the script in here drag and drop this you know information panel in here and you have the information button right so uh in the on click parameter click on the plus button drag and drop this canvas in here and you'll be finding an option called panel toggler and click on toggle panel all right now to test the if to see if this is working all right disable this uh panel and uh let's see if you know if this whole thing is working or not all right so let's see if everything's working fine or not okay so nope this is not the one which one was it just give me a second all right yeah here we go we got our information panel button right we also got our model now click on this okay just wait let me disable the battery saver okay so now it won't turn off by itself all right okay cool so now see our information button is working pretty fine all right and let's see if our main canvas is also work okay so our main canvas is uh the button of main cameras is also being clicked so everything's working fine all right so now now what we have to do is we have to add the audio functionality right now to do that go to your tdx marker create an empty object name the empty object as t-rex audio all right of course this is not the audio of you know a t-rex it is the explanation of who he is right and now in the t-rex audio game object add an audio source all right in the audio source uh what you have to do is go to assets all right uh where have i saved audio here yeah i got it so now in the t-rex audio add this t-rex description audio in here all right and remove this play on awake now as we have our tx audio in here now what i want you to do is go in here uh select the three buttons click in here means the plus icon drag and drop this no drag and drop this particular audio game object and in the audio source select the play option all right now all the three buttons have the play option now we have to change one by one all right i do this because it it is more faster than the usual like just selecting one button and adding them one by one it's much faster now in the pause button uh go to audio source and select the pause and the stop button go to audio source and select the stop all right now let's play play it again and let's see if everything is working fine or not all right just give it a few seconds and would be good to go all right so let's see okay so all right let's see tyrannosaurus is it genius see the pause is also working right dinosaur all right so the pause play and stop is working see this is working pretty fine so our first marker is totally ready now we have to do the same thing for every marker so i'm just going to you know duplicate uh these two game object right and drag and drop it under the spinosaurus all right i'm gonna get going to name it s audio all right it's too much to write its whole name and uh this this canvas let's put it up in there in the canvas all right here's the panel drag and drop it in here and in the buttons all right we already have the s audio all right means the this audio source so we don't have to do anything else also enable this particular button you know and uh in the panel all right in the panel in the text we have to change the text all right in the text i have got one text just let me bring it up in here and let's see let's enable this particular panel and let's see how it looks oh it looks really good right doesn't it and again duplicate it all right and drag and drop in the all right and not uh sorry triceratops not terrance or slicks uh and in the canvas select the panel all right and inside of the panel let's see if the buttons has the right audio or not yeah they do now in the text all right enable the panel and we are going to get the actual all right where is the text here got it now simply go in there and put it in here right okay cool now all right just give a few seconds all right now disable this particular panel right in here all right so now in the t audio change uh the audio to triceratops audio all right and in the spinosaurus rex audio change uh into spinosaurus x sorry spinosaurus not tricks not tricks already i'm really sorry dinosaurs and dinosaur enthusiasts are going to kill me i guess so yeah let's try this out and let's see if everything's working or not all right so give it a few seconds to run all right so let's see so there's our first one all right this is our special dinosaur that is t-rex all right my favorite so let's see if audio or the sword is supported all right so audio and everything is tyrannosaurus is a genus of perfectly stop it all right and if you let's say uh let's say let's do one thing let's say if uh if if you want to stop the audio all right if you want to stop or pause the audio after the marker is you know removed you can simply do that so go to trx marker uh in the on target lost click on add icon um get this audio all right audio source and uh i let's say i want to you know stop the audio all right let's stop the audio all right and again in the spinosaurus marker do the same thing all right do the same thing and uh you can do whatever you want already when you can pause the audio and even if you want you can start playing the audio when the marker is tracked you know it's totally up to you but this is what i'm doing now yeah we are good to go right all righty let's see all right okay so let's check if everything's playing tyrannosaurus is it uh tyrannosaurus so it's working now let's let's select this one all right okay triceratops is an extinct genus of herbivorous genes all right so clay is also working stop is also triceratops is an extinct genus of triceratops isn't it all right good now let's triceratops is an extinct genus of herbivorous chat all right so this one's also working perfectly fine and let's test this one our tries at the top so sorry not the triceratops yeah spinosaurus all right let's all right so our dinosaurs dinosaur encyclopedia is working perfectly fine now the thing that is left is to code the back button right means the scene changing script all right so what i'm going to do is go to script all right uh first of all oh yeah before going to the script go to fi uh build settings all right and add this ar scene in here so currently i'm on this ar scene so i'm just going to click on add open scenes and always remember to keep the main menu on top of every other scene you are putting in the build settings all right so make sure you do that now in the in the scripts create another script called c script called scene controller all right now all right so now let's code our scene controller all right that uh that that is it will be controlling our scene all right that means we'll be we have to navigate through the scenes right so we need that so what we are going to do is using unity engine we have to include that particular library scene management all right so here you go right now what we have to do is we have to create three functions first of all the function would be public void we are going to call it main menu this function would be loading the main menu all right that is scene manager dot load scene and gif give you know give this scene a name that is main menu all right so after you give this scene a name you have to create another function all right public void alright in the public void function you have to create another sorry so now all right we have to create another function alright that would be for loading our ar scene right so public void let's name it ar scene right and again same write the same line in here that is scene manager dot load scene all right and now in here you have to provide the ar scene name see these are the names all right these are the names of the scenes we have all right these are the names of the scenes we have that is the main menu and the ar scene all right so make sure to put uh this c name right in here all right so make sure to do that and another is to quit all right public void quit app quit app all right now scene [Music] manager dot load scene and so not loads in what i'm doing i'm very sorry okay just tweet oh yeah application dot quit all right so that would help our application to quit all right and let's compile the script so now our script is compiled what you have to do is create an empty game object reset its position all right and name this empty game object as scene controller all right because this empty we'll be attaching our scene controller script to this empty game object now what you have to do is go to canvas click on the back button in the back button click on on click click on the plus icon in the scene put the scene controller down there and click on scene controller and after clicking the back scene you should load the main menu all right now we have to do the same thing with our main menu all right and in the meantime we also have to check if everything is responsive or not right so let's check it all right really really great yeah everything's totally fine right now again in here create an empty home object called scene controller reset its transform uh add the you know scene controller script in here in here you will be finding uh okay this i forgot to rename this button let's rename it squared button all right now in the start button alright we have an on click function simply add it in there scene controller and click on this arc because it would be loading about ar scene and again i also forgot to add a button component to this quit button click on the plus sign scene controller scene controller then again quit app all right so now everything's done now let's play this scene and let's see if everything's working fine or not all right and if everything works fine we are done with our application right and you can actually launch this application on play store if you want all right so and actually before launching i would suggest you to add some more information all right now let me tell you one thing this uh this quit button is working all right the squid button is perfectly working fine but uh you can see nothing is happening because currently we are not on our phones so when you you will be in your phone and pressing the squid button it will be working perfectly fine all right and i'm not sure why there's uh here is one button i have to check all right so everything's uh first of all let me check if the function is right right yeah quit uh the function is right so quit button will work perfectly fine now click on the start button all right and let's let's see it load all right cool now let's try out our markers just let me open the markers all right all right okay cool so now everything's you know working perfectly fine asaurus is a genus okay cool so just like this every other marker will work and let's click on the back button yeah cool so we are able to navigate through our scenes right so this is working perfectly fine and uh which button is this one all right also it's uh not inside the canvas so it's not necessary so delete it i guess i have added it by mistake so we are done with this project and hopefully you have learned how to create your own ar books all right how to create your own ar encyclopedias and if you want you can launch this application after developing on play store all right and also add ads to earn money so yeah for this lecture this is it and best of luck for and also create more projects like this all right and in the next module of this course we are going to explore spark here all right so yeah stay tuned in this lecture we are going to learn about sparky studio will be getting an overview of the interface we'll be learning about the spark air ecosystem all right and we'll be doing a lot more things all right but before using sparky studio you need to download it so this is the link all right sparky dot facebook.com studio slash download all right so you just need to click on the download the installer would be uh downloaded on your system and the process is pretty simple you just need to install it all right it's like any other installation process all right so from this this website you have to download it all right now here is the interface all right this is a dashboard all right now with this dashboard we actually manage our projects within uh sparky all right so first of all this is the basic interface here are the templates all right this is the first uh area that you you are going to see after installing and opening the sparky studio here here are three uh weld mints three blank templates all right that is oh one is totally blank that is blank project and there is sharing experience and video calling experience all right and other other than tho these three here are uh some more all right so these are the basically uh templates made by the sparky our team and other creators all right so here you can see there are multiple uh multiple multiple templates that you can get this there is a face decoration there is face mask then there is body tracking then there is neck decoration then there is head tracking all right so these are the templates that you can explore all right there here here is a real scale world object tool that is that it means real world like real world scanning market scanning so you you can like try to explore all these templates alright it would give you a humorous like huge amount of knowledge all right so these are the templates that you can work with now let's say uh after this course you want to explore uh more of spark here all right so spark here has their own platform where they are there are two to three courses on sparky that is fundamentals of spakia then there is uh like a totally free means those are totally free all right then there is advanced sparkier all right so you can find it on on the internet uh it's by facebook only it's totally free you can watch there all right and if you want to learn more advanced ar development all right then i'm also going to launch one course all right uh it's an ex it's called exa01 augmented reality for everyone all right so it's an augmented reality mastery course you can get that course it would be a very low cost course and it would be launching very soon uh at my at my startup uh and turned all right so make sure to subscribe my channel to get the updates about it all right so here are the tutorials that you can get here you can see there are multiple tutorials available about the coding all right about means about creating a glow effect about face tracking alright so you can learn it from that and here are the recent projects alright here are the recent projects that you can uh like if you if you create some projects all right inside of sparky you will get those listed down in here all right and here is uh open option all right so if you if you have a project file then you can open that project file from there all right and here is the creator community option then fordham option and what's new option all right so this is it all right now to create a new project you have to click on blank project all right so we would be choosing the blank project and it would start creating the blank project for us all right so here you can see that our blank project has opened up all right so let's uh get a bit comfortable with the interface all right so the very first thing all right the very first thing you are going to see is there is a person all right here you can see this there is a person who is like rotating its head all right and here is a very small mobile like window all right here is a very small mobile like window that you can uh see seen here so here here is a simulation happening all right this is the person so basically now these are test persons so whenever we create any sort of marker all right whenever we are going to create any sort of marker these uh these are the test persons that would be working with all right so um we'll be testing our markers on these test process all right so this is kind of a small phone you could say alright this kind of a small phone or you can also say this is a testing window just like uh in unity uh you can even dock and undock it all right like click on this unlock option then it would be undocked or simply when it is docking you can drag it drag it down all right and you can keep it anywhere you want all right but i i prefer this one to be on the top all right so that that's where i'm going to keep it now let me let me shorten this window all right let me make the size small now here you can see that we are able to uh see here's a total new scene where uh a camera actually is there means there's this triangle thing is there and here's a film going on all right has a video uh going on so let me tell you what are these so first of all uh in unity all right i introduced you to the scene window right in that scene window we used to add objects we can we could manipulate those objects in there right similarly in spark here there is viewport window all right so basically this viewport window what it does is we can add objects from uh in the in the scene panel and uh manipulate those objects from here all right so that is it and here you can see there's a some kind of like phone like structure this one this one uh this this thing have a phone like structure this is basically a phone all right there's a simulated phone there this it is showing that the phone camera is actually like projecting the filter on top of it all right so this is basically the camera all right so i hope you understand right now this is basically as i told you this is the scene window all right and this one is kind of like the game window in uh unity all right uh so this game window in sparky are two all right so this this is you we use this one for simulating all right now as we uh learned about hierarchy in unity right similarly in sparky also there's another panel this is called scene panel all right so what exactly it does is it contains all the objects that are present in the scene right you can add add new objects in it you can manipulate those objects right from here all right like uh here you can see here is the camera object right in here all right here is the camera object right so this is the hierarchy window from unity all right so try to understand it like this now let's see uh the inspector window off you know sparkier actually in sparky it is called properties window alright but if you want you can even call it call it inspector window all right but it is actually known as properties window so this uh this is also like the unity inspector window all right it also contains all the editable uh properties of a particular object right like here you can see that we can see oh if we click the camera we can see its properties right in here here uh there are multiple options in there these are not editable of course but uh let's say uh let's let's try out this directional light so here you can see that uh this directional light is editable we can decrease and increase the uh means intensity we can change the positions uh we can change the rotations right so we can edit those all right this is kind this is property window just like the inspector window from unity all right now in unity there was also something called uh project window right similarly here goes and uh here is also one project window called assets window all right so this is uh like it is two uh it is under it is basically under the scene panel so you can see it right in here and you can actually drag and drop or import the assets right in here all right now this is for the basic interface all right now let me show you some more things all right like let's say i want to for for for testing my uh filter better like for adjusting the filter what i can do i want to pause this character right so right or in your left alright like in the in the left of the interface you would see a pause button if you click on that pause button the the video the video playback would be paused right now if you again play then it would start playing right now let's say oh i don't want that character all right i want to uh test with many other characters there is all right because uh his face like the shape of his face is different than others right so i want i also want to adjust the 3d model uh to others like to other phase shape right so what i can do is i can simply get another one in here right uh then there's another one then there's another one then there are many presets available all right and if you if you want to try it on yourself then there are like the currently i'm on my laptop so this is the camera i have already called easy camera so i can i can click on that and get the camera view on here right but currently i don't want the camera view so i'm going to keep this person right now all right so this is basically the things that you would be needing as of now i like to create the projects and i'd also be telling you many other things as far as we move right and uh let me let me show you all right how you can get uh free 3d models free 3d means free patches and all those things from in spark are only all right so just uh what you have to do is in in the assets panel you have to click on this ar library all right and a window will appear something like this all right so let me pause this character for a minute all right let me plot pause it alright and let's get this this window all right so here you can see that there are multiple uh multiple options in here there already there are multiple templates available first of all let's say i want a 3d object right i can click on 3d objects or search for any 3d objects i want all right so and pick it from there all right these these 3d models are free to use all right and uh let's say i want uh in any sort of music or sound i can i can get that right i can get that from sparky only then there are patch assets patch are basically there's there's two ways to uh code in sparky one is a visual scripting that is the patch editor where you have to move blocks here and there and connect a one block to another to code and there is that we can code it through scripting all right so there are presets available you can use those presets all right let's say if we want textures we can get those textures from here also if you want uh blocks all right we can also go get those blocks from here if you want the script packages all right we can also get these script packages from here if you want if we want color luts we can even get these from here all right so spark here has a pretty good ecosystem for its creators all right and if you talk about how to launch our own filters all right so to launch our own filters what you or what you would be needing is a facebook account all right and an instagram account to launch your uh ar filters on instagram all right so make sure you have a facebook account at least all right and uh of course uh to upload it on instagram you also need a instagram account right so yeah cool great so this is it for uh this lecture all right see you in the next lecture thank you in this lecture we are going to learn about face tracking face mesh all right and ah and we will also be creating our first filter based on face mesh all right so make sure to watch this video till the end so we are talking about face tracking right what is face tracking all right what exactly it is it all right see face tracking is a concept all right face tracking is an algorithm that actually helps us to track our face right like for example you can see this person right in here all right he is moving his head left and right up and down right if we attach an face tracking algorithm or module what will happen it would it would track this person's face like for example see this person is moving his head upward then also the face tracker will also point upward all right so that's how a face tracker would work it would track the person's face right it would it will it will take all right it would actually take the person's head rotation and movement from the real world and put those values inside of the editor all right so that it can perform other tasks that's that is what a face tracker is all right now adding a face tracker is very simple all right what you have to do is you have to go to the your scene panel in the scene panel there you would be finding a plus button you have to click on the plus button all right and in here in the first option will be there face tracker right now if you are not able to find the face tracker you can simply search it in here that is face tracker and after you do that uh click on the face tracker and click on insert all right so here you can see here you can see the anchors right you are able to see the anchors right the you can see that with the face all right with the rotation and movement of the face the anchors are also moving right so that's how face tracking works all right that is what face tracker does right now as you have learned about phase trackers and spark are now there's left face mesh right to make your see face mesh now is a sort of a layer on your face all right it's it's kind of another another object on your face all right you can understand the face meshes that's like this all right now to add a face mesh click on this face tracker all right then click on add and uh right face mesh and you would find the face mesh all right and click on insert so here you can see that we added our face mesh right it looks like checkers board right so not checkers board but a chess board right so one more thing you have to remember all right that whenever if you want to make like if you are attaching the objects which can totally work with your face tracker all right that is uh use face tracker for tracking the face then make sure all the objects that you are putting in your scene all right to make it a child of the face tracker object all right why because uh here you can see that uh as the person is moving its head this particular face mesh is also moving all right moving and rotating that's how it is working right so that's why i told you to make the objects of like a child of the face tracker only if you want uh to like you know uh make it rotate and move on the player's head movement and rotation right so that's how it all works right now as we have added a face mesh we can also add a material to it all right so what you can do is click on face mesh in here in the properties panel you'll be finding a material section and here you find finding an plus button so click on this plus icon and here you'll be a material would be created in your assets panel and see a material is also added right now if you want you can uh like you know change the color color of the material all right so simply select the material go to its properties and uh change the color all right change the color to whatever you want all right you can keep it red you can keep it you know green you can keep it yellow uh you can keep it blue anything you want all right but for for now i want to keep it uh you know white right so now as we have learned to create our own face tracker and our own face mesh right now what we have we what we can do is we can add textures to it all right now this is a bit tricky part all right if you're familiar with photoshop uh then this would be a bit helpful to you like you helpful means easy to you all right so let me show you go to your browser first all right download these face reference assets all right because these these face reference assets are going to be really really useful to us all right so just uh go to this particular website you can you can simply write on the internet uh sparky or face reference assets all right you would get get them in there now what you can do is you can click on this face reference assets and it would start downloading downloading a zip file after you extract it all right go to the textures folder and you'll be finding two textures all right one is phase feminine and one is face masculine these are basically face reference assets all right to create the textures for our face okay so uh i'm for this for this example i have used means for this tutorial i have used face masculine you can even use face feminine if you want all right now what you have to do is uh open photo p or if you have photoshop in your system you can open that all right i have used photo pages it's like photoshop button online so now what you can do is uh first of all import this face masculine in here all right import this face masculine in here and import your line face texture uh for me it's a line face picture you can use any texture if you want all right now what i did is i pressed ctrl in my you know i pressed control in my keyboard and uh mapped it like this just wait okay here you can see that i uh mapped it to the proportions of the face all right to the proportions of the face of the this particular reference picture all right and here you can see you can like you just have to press ctrl right you just have to press control and edit the transforms alright and you would be good to go and always make sure that these eye holes all right are in place of this reference assets eyes all right so make sure you do that okay and this is it and then what you can do is you can simply like you know uh turn off this background layer and add another transparent layer and you can simply go to file or export as png and your you know your texture would be exported right i have already done that now what you can do is simply drag and drop it uh inside your asset all right that is inside your editor so i'm just going to drag and drop it in here all right so yeah now is it is uh you know uploaded on within the it is uploaded within our spark studio all right now what you can do is sometimes what happens now your uh it would uh start actually not sometimes every time it happens that it would start uh compressing it all right and mine is already compressed it's it was so fast so what you can do is all right it makes uh makes the editor slow alright it makes spark ar slow if for the moment alright for the moment you can uh select it to uh means uh in the ios section make it to none then in the android and older or android also make it to none so it would stop the compression for a moment and when when you whenever you will be publishing a filter that is exporting it and then publishing it it would start the compression it will compress your filter and then you can upload it now always remember to compress your filter before uploading it to sparky sorry uh to instagram or facebook all right so make sure you do that now as we have learned to create our face tracker our face mesh let's add a texture to the face mesh all right this is also very simple we already have our line face which is mapped to the reference image select the material in here you'll be finding a texture section uh click on this image thing and select the texture all right and here you go you got the texture in your spark right so that's how we work with face meshes all right um you can also like uh add uh you know occlusion effect in this phase mesh in the next lecture only we would be learning about occlusion uh because we are we will be implementing our own 3d model in sparky all right but for this lecture this is it and we learned about face tracker we learned about phase meshes and also created our first uh phase filter right so yeah so as you are already aware of spar kr all right and you already know how to create 2d filters with spark air right now it is a very high time to learn how to create 3d filters already that is used 3d models with and with the number of filters all right so the first thing all right what you uh what i want you to do is or click on go to settings that is project properties uh click on change project properties all right here you will see a tab experiences so click on add experience and select this sharing experience and click on insert all right so after you have done that we are good to go with the project now what you have to do is uh add a 3d model the first of all add a 3d model of it all right click on ar library and find for a 3d model you want all right so let's say uh let's get a cap all right let's get a cap it's uh let's get actually a 3d cap right now let's get this pokemon's masters cap right click on import it will start downloading the model all right so it has completed downloading the model now close this window and cool so we are good to go now click on this focal distance or camera alright then click on add that is this plus sign and add a face tracker all right select the face tracker and insert it all right now here you can see that our face tracker is in place the gizmos are working perfectly fine now what i want you to do is click on this default texture environment so not not this one just wait yeah this one material all these textures all right what i want you to is remove the compression all right because that would slow the that would basically slow spark ar for me and i currently don't want that yeah of course when whenever you are publishing all that you will uh when you will publish your filter make sure that uh you compress them all right because uh compressing the filters are really necessary in case of publishing it uh on instagram or facebook all right now what you have to do is uh get this pokemon masters cap that is this 3d model and drag it inside the pokemon face tracker right now you can see it so it's a really really really big now let's scale it down that is give it a 0.2 scale just wait okay cool uh still it big uh let's give it 0.00 let's say 8 point zero eight point zero zero eight all right that's that's too small okay point zero actually zero it i i think by mistake i give 0.8 okay 0.00 sorry 0 8.08 okay all right it's it's uh now the size look good but here you can see all right one more thing let's uh remove its uh rotation actually okay not not this one let's give it a rotation like this okay it does have some rotational problems just wait okay minus 90. actually let's uh first of all let's pause the play all right and yeah this this is better now here you can see we can't adjust this cap on the person right like it's it's not being adjusted like it it is not fitting it's just on top of his head and of course we don't want that right we don't want to just just see it can't even go on its own face so now here comes the concept of occlusion all right see occlusion is basically now like in real world when you put uh let's say uh see you have two hands right you have two hands like uh put one hand on top of the other hand right would you be able to see your other hand that is let's say if i take one of my hand all right let's say i take the right hand and put the left hand on top of it so after putting it would i be able to see uh the portion that i covered up with uh my left hand we won't all right that's uh that is what i can say is a occlusion occlusion basically gives a more immersive experience on it to make it easier for you all right let's search for ar occlusion let me uh get some image to make you understand all right okay so all right yeah here we go we got one really good image just give a few seconds so here you can see in this image that first of all uh the first that that is the left side of the image is non occlu doesn't have any occlusion all right and you can see that the pikachu is like on top of uh his legs right and that is not giving us a sense of emotion or also it is not feeling realistic all right but if we look at the second image you would see all right that the pikachu is behind his leg all right it's it's not like overlapping the leg it's behind the leg and that is what occlusion is the person or the car in this in the first case all right this portion doesn't have any occlusion but in the second case the person the person has an occluder all right on on his legs so that's why he's able to hide this particular pikachu all right so i guess uh occlusion the concept of occlusion is clear all right and if you're still confused about that that's totally fine uh you can ask it in the comment section and if even if you want i can make a separate video on explaining occlusion all right now how do we achieve occlusion in sparky right so first of all there's uh there's an object actually called a head occluder all right so what you have to do is uh go to the ar library and search for occluder it's but it's given by spark r only you would see that in the block section that is this second one head occluder click on it all right it's by it's given by spark ar team so click on import free and it will start downloading it and import it after its download cool so we have imported the head occluder now what i want you to do is put this head occluder uh inside this head right means inside this face tracker now you can see that uh the the means some portion of the cap is hidden right and of course this is good we are able to see the occlusion all right now uh we have to adjust the cap right so how would we do that um let's see okay cool so can you see that uh occlusion is perfectly working we are getting the 3d effect we wanted right isn't it so uh occlusion is working perfectly fine now uh you have to adjust the 3d model accordingly all right so that it fits the head so that it fits actually it fits the head and you don't face any uh issues right so that's what i'm currently doing it's a bit tedious process actually but the result you the end result you would be getting is like pretty good just me just let me get this cap straighten up okay cool let's see this seems fine but uh as you can see there's a bit gap already a bit of gap on on the head now just adjust it all right now uh this looks good this looks pretty good then it was previously so you have to play with all the 3d models all right all the occlusion effects to get uh to the point you want right to get to the final result you want so it's a bit tedious process but after you adjust it a bit the outcomes looks really really great all right so uh yeah hey guys so this is our last lecture all right in this lecture we are going to create a very simple project after we have learnt uh spark ar all right with the basic skills we learned about spark air all right see i i'm going to admit that i haven't taught uh sparky in much depth all right because i'm going to bring out another series all right totally on sparky are alright which will be covering sparky are in depth the main idea already the main motivation behind putting sparky are the basics of sparky in the syllabus the reason behind it was that i wanted i wanted you guys to get excited about augmented reality all right uh and i know many of you are active active on instagram all right i know many of you and you guys uh enjoy instagram so why not make uh one filter for instagram right so i i i was thinking that uh it's going to excite you and uh i guess it did so let's jump into the video and develop our last project right and uh i promise you all right one thing i'm going to promise you that more series like this all right more better than this are going to come in near future all i'm improving myself every day all right i'm going to bring out videos on virtual reality i'm going to bring videos on augmented and mixed reality all right so make sure to subscribe this channel all right so make sure to subscribe this channel so you don't miss any videos all right and uh very soon i'm going to launch all right uh most privately in the month of april i'm going to launch a course called exhaust 001 all right it would be a paid course all right so the course would be very affordable all right for so that everyone can learn from that course and uh the course will be launching at my startup that is anton all right so if you want you can and you guys can enroll in that course and uh i'm going to announce that i have announced that uh course in this video so make sure all right if you want to learn more in depth all right i have covered very very in-depth concepts of augmented virtual and mixed reality in that course all right there are concepts that no one going to teach you in any of the course around all right no one is going to teach you those concepts i have included those concepts because they are very important all right i have included maths required for uh ar and vr all right that is 3d maths so make sure all right to visit that course at least once all right and if you feel like joining the course if you want to pursue uh augmented reality makes reality as a career then you can surely join that course we are going to develop multiple projects we are going to get in depth of the sdks all right we are going to get in-depth knowledge of those sdks like viewphorias or ar code that is a foundation then of course sparky r we are going to going to go into the depth of sparky we'll be exploring how to code in spark and all those very important things all right so if you want you can enroll in that course so also one more thing all right join our discord server right join anton's discord server there are many experts in there all right who can help you i am in there all right so if you have any doubt a near future you can ask me in there all right and also you can connect with me on linkedin alright you can follow me on instagram so here all the links will be down below in the description and all the materials all right that i have used during the course all the project assets so all those things will be available uh on the website all right that is ar course dot or netify dot app all right it would be available in the website so you can get all the assets from there all right and the spark air assets you can get from the air library only all right so yeah without any further ado let's get going right so the very first thing is uh click on this project properties click on change project properties all right make sure you do that and in that click on add experience all right and uh insert the sharing experience all right that would actually help us share these assets on our mobile and all those like on our instagram uh and all those portions right so now the very first thing is i want you to add a head tracker or sorry face tracker all right so click on this plus icon all right and click on this face track and click on insert all right so here you can see our anchor has appeared and that anchor is moving with the face now i want you to add some assets all right i want you to add some asset the very first asset is go to the blocks all right i guess it was in the blocks on the right i don't exactly remember actually let's let's search for it head occluder all right oh uh okay yeah here we got it all right so make sure to get the hair document that is provided by the sparky assets only all right and uh click on import it will down it will start downloading it all right and after it's downloaded click on done and you know what to do you just place this head occluder inside of the face tracker all right so here we got our head occluder now we have to add some more acid that is plus click on this plus icon then click on search ar library all right and here we'll be adding our glasses that is search for steam punk glasses all right so here you will be getting this particular glass so i'm just going to import it all right so it's going to take some amount of time to download and import the model uh model till then all right make sure uh you subscribe the channel alright make sure you subscribe the channel for more up uh videos all right on augmented virtual and mixed reality if you want to make a career in in this domain and i'm going to i'm sure you're going to like how this domain is like i love this domain for truly like this is one of my favorite domain in computer science so just wait for a few seconds and it would be downloaded so now our asset is loaded right now the very first thing i want you to do is because this thing will make our you know sparky are slow all right so what i want you to do is go in there all right select all the assets right in here and uh make sure that the compression is set to none as of now all right why see here you can see the size is really big all right and of course uh spark uh when you'll be launching this filter spark kr won't be accepting it so that's why you have to compress this filter after you are done with all the you know uh done with all the spark means development of your filter all right uh i always do this so it like i compress these all the materials after the development is done because that saves a lot of time for me uh like it doesn't interrupts my development all right the development of the filters right now what you have to do is fairly simple drag and drop this object all right make it a child of the face tracker so here you can see it's you know really big right so it's time for us to make it small oh okay first of all you know he's moving really fast so i of course don't want that so now what i'm going to do is i'm going to you know all right okay big mistake now all right okay cool very cool now uh you have to adjust this you know adjust this to his face right now let's see uh-huh yeah this this looks pretty good yeah this this definitely looks so good let's uh all right okay see we can see his eyes also so now this glasses are looking very good and we actually have you know set up means perfectly set up written there now what i want you to do is add another asset that is going to be you know a hat right or a cap maybe so add any asset you want all right so let's go for this one this seems a nice fit for this head right means for this uh what can i say this particular glass not head so just wait for it to download all right and cool we got it now simply drag and drop it in here all right make it a child of our favorite face tracker and and now you know what to do scale it down all right scale it down cool now move it a bit so that you know it gets adjusted on okay let's see now yeah this looks good doesn't it yeah it definitely looks good now um just give me a few seconds i guess all right so i need to make it a bit more bigger so that you know it this cap fits this particular occluder face all right so let's see now okay this looks this looks very good right doesn't it all right now let's see all right let's see if everything's working fine or not all right just okay it's compressing so i'm just going to you know as of now remove the whole compression thingy of course it's this thing is of 6 mb and that is of you know four or four i guess it was a 4mb right so okay it's of 7 mb guaranteed so means this one is of 7 mb so it's around 10 to 12 mb right so of course sparky isn't going to accept this particular you know this particular model so the to fix that problem is to compress all right to let spark here compress these particular you know textures and models and after that you can simply publish it right and let's try this out and uh on myself all right let's see if it's if it's working or not all right just let me you know all right all right all right it's i guess because of the background light it's not able to track my head perfectly but that's okay it's uh it's working all right okay cool cool cool all right cool so now if you want to publish it what you have to do is you have to click on this publish button all right then you know click on this publish new effect all right and currently the text you can see the textures are being compressed and after the compression completes all right here an option you are finding that is called export all right you have to export this particular file into one file the the extension view dot ar export after it is exported all right you have to go to a dashboard all right let me show you the dashboard just give me a few seconds let me pause the simulation so this is the dashboard you can simply go in there facebook.com hub slash dashboard so these are the two filters i made already uh this one was like a long time ago all right i had some other filters also but i deleted them uh so they are not here as of now so these two are there but uh this javascript for dev doesn't really work because i haven't uh updated as of now because i i guess it's been almost one year this was my very first filter all right and this and this this was the one i recently made this was a very old one like i haven't updated since i guess it's been more than one year yeah so i had other filters too so i removed them so i'm going to like i'm currently working on creating a whole new set of portfolio of sparky and ar applications so yeah that's why i removed the previous ones right so now what you have to do is click on you know after you are on the hub you have to click on publish effect all right and a new window will appear alright so just give it a few moments all right just give it a few seconds and it will open the window for you all right see make sure you export the you know the filter asset all right because without that you won't be able to publish your filter all right okay cool see first of all uh you have to give a name to your filter all right so you can give any name to a filter if you are uh going to upload the filter that i showed you in the project what you can do is you can i would like to name it weird uh uncle maybe i'm not sure i'm not really good at naming all right i'm i might name it uh weird uncle all right i might name it you weird uncle you can you can name it anything you want right after that when you uh after exporting all that you will be getting a file.ar export file all right simply drag and drop that file in here and make sure the file is less than 40 mb all right the size of the file is less than 40 mb and i would suggest you to choose all platforms or if you just want to like you know upload the filter only on instagram you can disable the facebook or messenger and all the things from here all right but currently i wanted to publish it on all platforms the owner is priyanja mata charity right this is the publisher that is the publisher is on my instagram account here the categories you can select the categories all right like it what kind of uh is it it can uh it is of sci-fi and fantasy of course it looks like something from fantasy right it can be of selfies all right so and also you can like select the weird and scary because weird is in its name only right and after that you uh for you know for enhancing the search you you have to add some you should actually add some keywords in there all right and uh also one thing what you have to do is you have to record all right you have to record the filter all right you have to record the filter on your phone uh and upload the uh means the video in here all right and up after that you can use the video thumbnail all right and if you if if you have collaborated with some other people also during the development of the filter you can add them as a collaborator in here and there are two options that is as soon as possible and as uh as set time and date so you can do any of this all right as soon as possible means uh i generally do as soon as possible the reason behind it is it gets uh like it takes around three to four hours or i think it may be even less than that they publish that filter instantly so that is one way and otherwise you can simply set a particular date and time when you want your filter to be published alright and they don't take a lot of time to verify the filter all right and then click on submit and your filter will be out for review and after it is reviewed if everything success if everything is successful you will be able to you know user means distributor filters on all the platforms right and one more thing while recording the video make sure the video of uh you are recording the video of yourself only because uh spark spark has a policy of not using their you know their presets means you can't use these presets all right the presets like this uncle uh is you you can't record this uncle using your filter right you can you can't record any of them any of the filters in here to record it right so you have to record all the assets by yourself right so you have to record the video by yourself all right so make sure you do that and great and also one more thing don't use face all right your face as uh you know as the icon of our logo of this particular filter all right uh make sure to create a logo or specific for this filter uh any you know in your in your photoshop in canva or any platform you prefer all right so yeah that's it for this video and also make sure all right you subscribe this channel alright join our discord server that is our antenna community all right and yeah thank you see you in the next videos