Turning Real Life into a Video Game in 10 minutes – 3D Scanning

so traditionally 3d art for games has been created manually artists have been using specialized 3d modeling software to create everything from scratch these programs allow you to model sculpt and paint props and environments that you can then import into a game engines such as unity for creating realistic looking models and textures is actually a really complicated process and it requires the combination of artistic skills and technical know-how that is pretty hard to get Plus making something that looks real is just incredibly time-consuming because turns out real life is pretty detailed and adding all this detail by hand that's a challenge so over the last few years a new trend has been taking over the gamedev industry I'm of course talking about 3d scanning this is a process where you go out into the real world with some specialized camera equipment and record geometry and material data that you can then take back into your virtual world and at the forefront of this technology has been a company called quick soul they've built a huge library of assets and materials by going out and painstakingly making thousands of scans around the world but so far this process has been pretty complicated and it requires a lot of special equipment so not much luck if you want to do it yourself but recently ubiquity six reached out to us about a service they'd been working on called display land and how they're trying to make the power of 3d scanning available to everyone now display land is a free app that you download and it allows you to create 3d scans just using the built in camera of your phone so just to be completely transparent this video is sponsored by display land but I will say that we were completely blown away with how well this technology actually works and even crazier just how easy it is to use so for the first scan we try creating a scan of our office and dress walked around the room while filming everything he saw then once he felt like he'd captured everything in a good amount of detail we hit upload and the scan went to the cloud for processing and after a little while it was ready to view on the phone in fact display land is a social app as well and from here it allows you to share scans as well as follow other creators but for this test we just send it to the computer and opened it up in a browser and getting it into unity was just as easy we simply exported it as an obj and dragged it in I created a material assigned a texture and it was of course the scan itself does have the lighting of our office built into the texture but I found that even with that it reacted pretty well to the lighting conditions of our scene so I added a few point lights to where there were lights in the office as was dragged in a few example assets and it's pretty amazing how well they fit the scene out of the box they instantly looked like they were part of the room and this is when I realized if the scan has actual geometry and it actually looks pretty clean we can probably have physics objects interact with it and sure enough after adding a mesh Collider and a sphere with a rigidbody we had physics in fact I got so excited I created a quick script that would spawn spheres over time which ended up looking pretty cool it definitely answered the question of how our office would look if it got flooded by red balls in a weird way it's kind of beautiful so for this first test under the belt we were ready to do some more scanning but how does this process actually work well this plane and essentially creates 3d captures using a process called photogrammetry it uses many images of the same geometry but taken from different perspectives to create a 3d reconstruction of the scene it's the same reason why animals have two eyes you need two different perspectives in order to determine depth which is also why if you close one eye it gets pretty hard to tell how far away things are so after taking a video with some different perspectives on the thing you want to scan the video as well as some sensor data gets sent to the cloud where it gets turned into a 3d model some scans take just a few minutes to process while larger scans can take up to a few hours and we actually slowly started to figure out what makes a good scan in fact it's something you really get better at with practice generally you want to shoot in fairly even lighting conditions and move the camera at a slow and steady pace it's also a good idea to scan from as many different angles as possible and to avoid any reflective surfaces and scanning objects with lots of texture definitely helps the tracker a lot for example take a look at these props we scanned these outside on a fairly cloudy day and all of them have a good textured but non reflective surface of course sometimes the Sun peeks through the clouds but the tracker actually managed to handle that quite well in fact we thought they looked so realistic that we might be able to use them together with regular 3d models in other words could we take these scans and put them into an otherwise virtual environment without them standing out so transit that question I went to the unity asset store and found this free industrial environment I imported everything into unity played around with the lighting and materials a bit and added a first-person controller and voila we had a tiny game where we could move around and interact with the environment so far so good now for the scans and this was actually just a cc I downloaded each scan and open it up in blender to cut off any unnecessary geometry I then reacts ported to direct the model and texture into unity and assigned a simple little and right away it looked amazing I'd expected the scans to stand out like a sore thumb but as soon as unity did its rendering magic the concrete table blended in perfectly of course the scans aren't optimized to use a simple geometry as possible there's inevitably going to be a lot of extra vertices on these models so if you're looking to use them in a commercial game I would recommend doing some work in order to try and reduce the amount of polygons but the cool thing is that you can utilize the fact that you have a very detailed version of the model by simply baking all this detail into a normal map so next up I tried importing these statues and they were even more impressive in fact you could actually read some of the writing on them so I created a tiny gallery for the player to explore finally I thought the tree stump was just too good a scan not to include but I didn't really have any way to put it in the level since it didn't have any greenery so I turned the play into a tree which ended up looking more disturbing than expected but of course the real test was still to come could we make a game with a level that was entirely 3d scanned so we went out into our courtyard to see if we could scan a larger environment and while we had good success on the buildings it wasn't really a fair fight for the scanner considering the amount of clutter and bicycles reflecting light everywhere plus it was raining that day which of course makes everything shiny and while just scanning some buildings is cool we thought wouldn't it be even cooler if we took some commonplace items lying around the office and put them together to make a level in real life that we could then load up into unity and play on so that's exactly what we did we immediately got started setting up a nice playing surface and placing objects that our player could work on and after a quick scan of the table we hopped back on the computer I cut off some geometry loaded it into unity created a ground cube for it to stand on and the level was ready of course we still had to build the actual game our idea was to create a top-down shooter where the player has to fight through a series of enemies so I set up a quick prototype scene and immediately got to work on creating the basic mechanics I started with movement and making the player aim to what's the mouse I then made him shoot added some enemies to shoot at as well as some particles for bullets and explosions and at this point I was ready to put everything inside of our level so I imported the player added a rotating camera and placed around a few enemies and pecking the navmesh for this was extremely easy I just played around with the slope and step height a bit and the enemies were moving appropriately around the level of course they're currently did nothing to damage the player so I made them shoot and stop when they got close enough I also implemented spawning in case the player died and made the enemies spawn randomly throughout the level at a slowly increasing rate finally I made some boundaries around the levels so that the player wouldn't fall off and with that we had a game it's nothing fancy but it actually plays pretty well considering how quickly we put it together and everyone at the office had a blast playing it some conclusion while we can never get the highly optimized triple-a quality scans that you can with specialized equipment display then actually makes it possible to start bringing the real world into your game personally I just had a blast playing around with this technology if you want to check out display man for yourself and make some cool-looking scans it's completely free and available on the App Store as well as Google Play we'll have links to both in the description and that's pretty much it for this video if you enjoyed it make sure to subscribe and ring that notification post so you don't miss the next one and I just want to say a huge thanks to everyone who participated in the preppies Game Jam it was a blast to see so many people joining the event and will of course have a video showcasing some of the games out soon on that thanks watching and I will see you in the next video thanks of the awesome patreon supporters who donated in February and a special thanks to face of Merrifield lost violence the Ferber Leela set Nabi ninja Daniel to Sonic dad to Sam Jacob Sanford marc-antoine Gerard no kiyosaki Gregor Pierce Michael Karpov the mighty Zeus Owen Cooper as in the fierce Gidget car and Rasmus you guys Rock

As found on YouTube

You May Also Like