263

Next Steps |Simulation Improvements

262

Next Steps |Simulation Improvements

Simulation Improvements

The first of these improvements is the simulation itself. The last section (Part 4: Simulation Applications) investigated various applications that this simulation framework could be used for; starting with generic basic conditions to small scale installations and working its way up to larger ‘real world’ spaces such as galleries. From these investigations, it can be seen that the agents are still somewhat unsophisticated with jerky movements when compared to people in the physical world. While this is largely unnoticeable when more agents are generated within the simulation, it still shows that there is room for improvement. At the same time, there also seems to be a limit to the number of occupants that can be generated before the entire system slows down significantly, which can limit the variety of spaces that this tool can be used for. As such, it is evident that this model can be improved both in terms of optimization and accuracy. To do so, we must first finalize and organize the simulation model. From here, we can optimize performance by utilizing C++ and increase accuracy with additional considerations to the simulated agents. We can then use this new model to establish new features that can be used for architectural visualization.

Organization: Finalizing the Simulation Model

Before even considering these improvements, however, it is important to first organize and simplify the simulation model. At its current state from Chapter 3.3: Human Agents, these assets are messy with leftover ‘experimental logic’ due to the prototyping process, which leaves a lot of unnecessary variables and functions to wade through when modifying the logic.

While this was deliberate in learning this software, it becomes inefficient in the process of adding additional functionalities. Therefore, the first step that should be taken beyond this thesis is to go through the entire logic of the simulation model and determine the necessary portions of code. From there, it would then become possible to organize the logic into macros and functions in order to create a library of reusable nodes for future modifications. Doing this will solidify the foundational aspect of this framework, which will facilitate an easier process to add additional considerations and features to the crowd simulation tool.

Optimization: Blueprints vs C++

Within UE4, when a blueprint is executed, it is calling back to the C++ code that was written for it. As such “there is an overhead cost associated with executing blueprints that isn’t present with purely native code.”[1] This lack of an overhead can allow the native C++ code to outperform blueprints by up to 10 times, which becomes significant as we begin adding more people to the simulation. (Fig. 5.1.1)

Blueprint scripting vs C++ scripting

From Jayanam, frame-captured and edited by Author, “Unreal Engine 4 : C++ and Blueprints Tutorial,” YouTube, 7:36, accessed January 1, 2020, https://www.youtube.com/watch?v=SW09W182Ws0.