University Final Year Project for Computer Science
This project offers a driving simulator game that instructs people on the fundamentals of driving on actual roads. The game was produced using photogrammetry, a process that involves recording, measuring, and interpreting photographic images in order to obtain precise data about real-world objects and their surroundings. The roads were precisely captured and recreated using this method in a virtual environment. For the best in control and immersion, a steering wheel and pedals were considered when developing the game. The objective of the game is to give players a lifelike and immersive experience where they can learn and practise driving techniques. The game offers a distinct and efficient way for players to learn about the environment by accurately simulating real-world roads and using realistic controls. Learning to drive can be a difficult task for many people, whether that is due to anxiousness and nervousness or just a lack of knowledge on the road. Reasons such as these have proven to be a barrier to entry for thousands of people dissuading them from ever getting behind the wheel. Another issue when learning to drive is age; many older people feel uncomfortable learning and often compare themselves to younger counterparts. Statistically this is proven since the average pass rate of an 18-year-old between April 2021 to March 2022 was 54.8% compared to the 47.4% of a 25-year-old or even 40.5% of a 35- year-old subject (Driving Test Statistics 2022).
Therefore, I would like to create a solution to this issue – a driving simulator that can be played from the comfort of your home that can allow the user to explore the roads of their own town/city. An application like this will allow people to have a completely risk-free driving experience since they cannot be putting themselves or anybody else in danger. How this differs from other simulators is due to the use of photogrammetry since this allows the real world to be brought into a 3D simulation. Having the familiarity of real-world roads allows for as close to a 1 to 1 representation as possible. This also eliminates the confusion of foreign roads and therefore road rules which often cause confusion especially when they drive on the opposite side of the road.
Photogrammetry has been defined as the process of deriving (usually) metric information about an object through measurements made on photographs of the object (Mikhail, Bethel and McGlone, 2001). Photogrammetry is commonly used to take images and turn them into a 3D digital model which is usually realistic and close to the real example. The 3D model which results from this process is a dense, highly-realistic model which can be incorporated into the content development pipeline for games and simulations, allowing accurate models to be created quicker and at a lower cost than traditional methods (Ryan, 2019). This research shows that these models can be used effectively in game production to accurately create realistic models. When larger environments need to be covered such as roads or land it becomes difficult to take hundreds if not thousands of images. “Rotary or fixed wing UAVs, capable of performing the photogrammetric data acquisition with amateur or SLR digital cameras, can fly in manual, semi-automated and autonomous modes. With a typical photogrammetric pipeline, 3D results like DSM/DTM, contour lines, textured 3D models, vector data, etc. can be produced, in a reasonable automated way” (Remondino et al., 2012). This method of collecting the necessary data allows for a much easier and effective time while still providing good results. Photogrammetry has been chosen to create the world for this simulator; the photorealistic results and ease of large-scale mapping of real locations are perfect for this project.
The development methodology selected is Agile. Agile Methodologies are a group of software development methods that are based on iterative and incremental development (Kumar and Bhatia, 2012). This methodology focuses on breaking down projects into flexible increments that can be evaluated individually. Scrum methodology is a method that tries to keep things simple in a constantly shifting business environment. Scrum is composed of short, strenuous daily meetings of the project team, in order to deliver quality software in 24-h short-time periods called “sprints” (Alexandros et al., 2017). In the case of this project there is no team since all research and development is being conducted by myself, however the concept of sprints can still be utilised effectively. Breaking down tasks into sprints and working on them based of set time frames is an effective way of development. This project involves multiple smaller components that can all be created and tested individually, for example, the production of the environment, vehicle, physics and improving visual fidelity which makes the agile methodology a perfect fit.
In order to increase the precision and effectiveness of the photogrammetry process, it is a good idea to downscale an image from 4K to 1440p. In photogrammetry, images are used to collect data about a scene or an object. The results of photogrammetry will be more accurate and thorough the more detail that is captured in an image. However, excessively detailed images can also cause problems with processing. The amount of data that needs to be processed when an image has a high resolution, like 4K, can cause the photogrammetry software to run slowly and increase the chance of errors. The amount of data that needs to be processed is decreased by downscaling the image to a lower resolution, like 1440p, which speeds up and improves the efficiency of the photogrammetry process. Additionally, it can increase the accuracy of the outcomes and lower the likelihood of errors.
3D modelling, animation, compositing, and motion graphics are all common uses for Blender, a free and open-source 3D creation programme. It offers a complete toolkit for 3D designers and artists and supports a large number of file formats for simple import and export of assets. The Decimate tool in Blender is a modification that enables you to decrease a mesh's vertex/face count while making only minor shape changes. On meshes that have been carefully and easily constructed through modelling (where all vertices and faces are required to accurately characterise the shape), it is typically not used. However, if the mesh is the result of detailed modelling, sculpting, and/or the application of Subdivision Surface / Multiresolution modifiers, the Decimate function can be used to either lower the polygon count for an improvement in speed or just eliminate unnecessary vertices and edges. Collapse, Un-Subdivide, and Planar are the three main Decimate methods available in Blender. Vertices are gradually merged together in the collapse mode while taking the mesh's shape into consideration. You might think of Un-Subdivide mode as the opposite of subdivide. It makes an effort to get rid of edges that came from a subdivision operation. On structures with primarily flat surfaces, planar mode removes features.
To design their own cars in Unreal Engine 4 for their projects, developers can refer to the Unreal Engine 4.27 Documentation, which is a thorough manual. The complete creation process in UE4 is walked through in this manual, from building up the car in an external modelling programme to altering the centre of mass and debugging the vehicle. The use of the Wheeled Vehicle Blueprint class is one of the crucial steps in the creation of a vehicle in Unreal Engine 4. This class offers the essential in-editor components, such as a Skeletal Mesh and a Physics Asset, to build a working vehicle. The guide also covers other crucial aspects of vehicle creation, such as setting up a TireConfig Data Asset and Wheel Blueprint for the front and back wheels, creating an animation blueprint specifically for a vehicle, and configuring axis mappings and bindings to control the vehicle, in addition to the Wheeled Vehicle Blueprint class. The Unreal Engine 4.27 Documentation offers a comprehensive and in-depth manual to assist developers in building their own cars in Unreal Engine 4. Developers can make completely working vehicles that can be used in their own video game projects by following the instructions provided in the tutorial. This is how the vehicle was designed for this project.
In this project, I used photogrammetry to build a driving simulator. The science of making measurements and three-dimensional models from photos is called photogrammetry. In order to create a 3D model, overlapping photos are taken and entered into photogrammetry software, which uses the 2D data it extracts about the landscape and objects to align, texture, and mesh the images. To finish this project, I used Photoshop, RealityCapture, Blender, and Unreal Engine. Photoshop is a programme used to edit and improve pictures. A programme called RealityCapture can build 3D models from photographs and laser scans. A programme called Blender is used to model, sculpt, animate, and render 3D objects. A programme called Unreal Engine is used to make interactive games and simulations.
The main steps in my project were: