CALCULATING SOLAR ENERGY POTENTIAL OF BUILDINGS AND VISUALIZATION WITHIN UNITY 3 D GAME ENGINE

Solar energy modelling is increasingly popular, important, and economic significant in solving energy crisis for big cities. It is a clean and renewable resource of energy that can be utilized to accommodate individual or group of buildings electrical power as well as for indoor heating. Implementing photovoltaic system (PV) in urban areas is one of the best options to solve power crisis over expansion of urban and the growth of population. However, as the spaces for solar panel installation in cities are getting limited nowadays, the available strategic options are only at the rooftop and façade of the building. Thus, accurate information and selecting building with the highest potential solar energy amount collected is essential in energy planning, environmental conservation, and sustainable development of the city. Estimating the solar energy/radiation from rooftop and facade are indeed having a limitation the shadows from other neighbouring buildings. The implementation of this solar estimation project for Istanbul uses CityGML LoD2-LoD3. The model and analyses were carried out using Unity 3D Game engine with development of several customized tools and functionalities. The results show the estimation of potential solar energy received for the whole area per day, week, month and year thus decision for installing the solar panel could be made. We strongly believe the Unity game engine platform could be utilized for near future 3D mapping visualization purposes.


INTRODUCTION
The progress of 3D technologies for city modelling during the last years resulted in many applications.Utilization of 3D city models for business or authority management processes of urban planning directly highlights the benefits of 3D city models (Moser et al, 2010).Applications have been developed that employ more specific 3D analyses like noise distribution (Kurakula and Kuffer, 2008) and others for more accurate and specific information.Ludwig and Kinley (2010) described a computer-aided analysis technique using LiDAR and plan-view data for identifying high potential areas for solar power implementation.The project uses Berlin case study to determine how solar power can be optimised on urban roof areas using photovoltaic (PV) and thermal solar panels.Similarly, BIMTAS company, Istanbul carried out a project to model the potential of solar estimation for the city's energy planning.
The paper discusses an introduction on solar energy and Istanbul city as a use case.Section 2 describes the literature -3D City modelling, solar energy and Unity game engine.Section 3 describes the implementation of the project.Some results and analytical analyses are illustrated in section 4 and lastly section 5 the conclusion of the paper.

Solar energy
Sunlight comes to the earth as a form of electromagnetic radiation.Solar energy is radiant light and heat from the sun which is very beneficial and crucial as renewal energy.Solar energy emitted from the sun is composed of many constant wavelengths.Solar radiation incident on earth's atmosphere is also relatively constant but the radiation at earth's surface varies due to absorption, scattering, reflection, change in spectral content, diffuse component, water vapour, clouds pollution and others (Alam et. al.,2013).
There are two categories of solar energy, depending on how we capture and make use of it -passive and active solar energy.Passive solar acquisition techniques includes selecting material, thermal/light mass, space design of a building as a natural way in circulating the air.While, active solar is harnessed using techniques such the use of concentrated solar power, photovoltaic (PV, see Figure 1) system and solar water heating.PV system consists of an arrangement of several components, including solar panels, a solar inverter, mounting of cabling and other electrical accessories as a working system.It converts light directly into electricity, ranging from small, rooftopmounted or building-integrated systems with capacities from a few to several tens of kilowatts to hundreds of megawatts (e.g. in utility-scale power station).

Project Implementation -Istanbul
The implementation of solar estimation energy project is for the whole Istanbul city.It has an area of about 5,400 square kilometres (approximately 2,063 square miles) including around 1.5 million buildings.
Building models can be extracted from both aerial images and LiDAR data (Wang et. al, 2008).Digital Surface Model (DSM) and Digital Elevation Model (DEM) for the whole Istanbul were acquired by the previous project (data collection using Airborne LiDAR), about two years ago.The 3D CityGML building for the whole Istanbul has been generated using LoD2 and LoD3 (Figure 2).
Figure 2. The study area build up part of Istanbul province.

THE LITERATURE
This section is divided into three sub-sections -3D city modelling, solar energy estimation and Unity game engine.

3D City Modelling
3D models are the most suitable option for detecting shadow and other parameters in estimating the potential solar energy (Alam et. al., 2013).Buildings are the largest consumers of energy and collecting the solar energy using PV system is one of the promising methods in a cities area.Estimating the solar power using PV technique on buildings is a big challenge compared with the open spaces.Some limitations or noises such as shadows, clouds, direct or indirect of the sunlight, intensity and direction of panels, etc. play major parameters in projecting solar energy power.

CityGML and LoD
3D CityGML models are commonly used for the realistic simulation of the shadow detection.The model mostly consists of polygons as the surface either façade, roof or more details building assessor such as balcony, doors and furniture.
Precision in estimating solar energy (shadow computational) is also depending on the selection of level of details to be incorporated in the model.Figure 3 illustrates different results of shadow obtained using CityGML LoD1 and LoD2.It is due to the shape and surface area of the building (details) resulting different shadow size and surface to accommodate the solar panels on the roof or façade.Thus, it is much recommended to use LoD2 instead of LoD1, and LoD3 compare to LoD2 for better accuracy in solar energy prediction.

Estimating Solar Energy
Wieland et. al. (2015) proposed a combined method to compute solar radiation received per month by roof surfaces and building walls on CityGML 3D city model (see Figure 4).The combined method comprise of several specific approaches and subtasks from previous studies (e.g. in Redweik et. al, 2013;Strzalka et. al., 2012 andŠúri et. al., 2004) in a python application (Wieland et. al., 2015).
According to this combined method, the first phase of workflow deals with the geometry of LoD1 and LoD2, where slope and aspect of each building surface were extracted.Points of spacegrid were established based on potential surfaces exposed to solar radiation.The second phase on shadow identification, computational of solar irradiance and integration could be embedded in the form of equations within the code/application.

Shadow modelling
Shadow casting is one of the biggest issues in urban area.It will affect the accuracy of the solar radiation calculation results as for high stores buildings.The size and position of the shadow caster directly impact on energy collection (Alam et. al.,2013).
While incorporate shading effects of surrounding buildings, lines originating at each point on the surfaces were created.These lines are pointing towards the direction of the sun at the specific points in time for which solar irradiance is to be calculated as explained in Wieland et. al., (2015).
On the other hand, Alam et. al (2013) uses potential building surfaces of the city model (CityGML) and sub-divided them into triangles.The process continues to create smaller triangles for the shadow computation.The coverage of the shadow could be calculated using specific points distributed over the surface, which represent the whole surface of triangle (Figure 5).

Sun Light Movement and Heat for the Year
The intensity of sunlight to the earth is different based on the latitude and longitude of the area.Thus, there are some models or equations of estimating the sunlight and it intensity based on the coordinate of the place and the location of the earth rotating the sun (yearly time frame).As for geographic location, Turkey is located between N25.66° -N44.82°longitude and E35.82° -E42.10°latitude.
Istanbul area received different sunlight intensity throughout the year as the earth rotates around the sun on its annual cycle; it is tilted at an angle on its vertical axis.This impacts how the sun's rays strike various locations on Earth (earth rotation and movement circling the sun.The Earth at its most extreme tilted during winter and summer solstices. During winter, the sun is relatively low at the sky with its lowest arc, normally on December 21 st .While in summer, the sun travels with a high path through the sky and is at its highest angle (high intensity) on the summer solstice, normally on June 21 st (see Figure 6).Thus, the sunlight intensity, energy and the shadow movement and size will be different within one completed cycle (1 year).
Figure 6.Illustration of the sun during winter and summer and the aspect/direction of the solar panel on a building (GPSM, 2017).

Unity 3D Game Engine
Unity is a cross-platform game engine normally used to develop 2D or/and 3D video games and simulations for computers (e.g. Figure 7), virtual reality, consoles and mobile devices platform (Unity, 2017).It is commercial software developed by Unity Technologies.
3D Unity engine capable of making high quality games, design and develop 3D social network gaming platforms (Bae and Kim, 2014).Unity is an excellent platform to start game development and definitely recommended for developers who want to jump start game development.It also provides a choice either to use their libraries or our own codes for supporting application analysis.In addition, 3D visualization, functions and attributes, intelligence and metric measurements can be done with Unity 3D encoding.
Figure 7. Examples of 3D scenes from the Unity's sample projects (Unity, 2017)

PROJECT IMPLEMENTATION
The project was completed within two yearsfrom CityGML data conversion of LoD2 -LoD3 (with photos) into the Unity supported formats (e.g..fbx).Final results (estimated potential solar energy for each building façade and rooftop) were acquired via implementation flow as illustrated in Figure 8.

Project Flow
Figure 8.The implementation workflow.

Built-up Functions
Standard mapping functions such as zoom in, pan, information, and on-off layer were built based on the Unity game engine.Specific functions such as query, shadow calculation, solar radiation and sun locator and angle were embedded in the equations and internal codes (not in the viewer).

Analysis
Solar potential analysis can be used to localize the most suited areas on a building in its urban.Several methods of solar analysis were proposed in Good et.al ( 2014) including the effectiveness of roof-mounted and façade-mounted system, using PV and thermal.The project also implemented some related methods on solar analysis available in other solar estimation applications -shadow calculation, sunlight location and angle, direct or/and indirect reflection.

RESULTS AND DISCUSSIONS
Final results are presented in section 4.1, while advantages and limitations are discussed in the sections 4.2 and section 4.3 respectively.

Results
The customized Unity application was named as Istanbul Gunes Enerjisi Verimliligi as a default view in Figure 9. Figure 10 shows the selection of a particular building before calculating the potential solar energy.While, Figure 11 and Figure 12 show the selected building with rooftop as solar panel before and after the calculation.The GUI also offers an option -calculating rooftop or facade as shown in Figure 13 (before calculation).

Advantages
Main advantage of 3D Unity is capable to run on multiplatform with online and offline modes on Windows, Mac, Linux and mobile platform (Ruzinoor et. al., 2014).It also provides good visualization and light rendering of 3D objects, variety of functions and modules library for multi specifications of the gaming development (Bae and Kim, 2014).Bulk queries also available for analysis such as, finding the buildings which fall within a range of a certain potential solar energy.Buffer analysis also available such as in Figure 14.

Limitations
There are some excluded man-made features of the model, especially the bridges, mosques (around 3200), heritage buildings or monuments (around 354), small objects, roads and others.
Figure 14.Solar estimation for buffered area (group of building).

Discussions and Future Improvements (Toward GIS)
Since the objective of the project is only to calculate the potential of solar on the residential and commercial buildings, so the other mentioned features are excluded.Some of the complex-shape buildings also excluded because of the difficulties of setting up the solar panels.The size of solar panel determines the potential or best fit for the building surfaces (refer to Figure 13, the bottom right of rooftop).Other than the mentioned excluded man-made features, solar energy also can be utilized, modelled and calculated for other features within the Istanbul city, e.g.road lighting.
Inevitably, this project could trigger GIS based analysis (e.g.power revenue and demand regions) where sharing of electricity is possible between regions or districts.We also could transform building rooftops and façades into GIS-based layers where more spatial or/and spatio analysis could be carried out on the layers provided it has an integrated spatial database.
All these features (e.g.solar energy estimation application) would be useful for future GIS based smart city.Later, new layers or objects (e.g.road network, 3D underground utility and others) would be added or integrated to provide multifunctional applications within a single smart city model.

CONCLUSION
This paper discussed 3D modelling implementation in estimation of solar energy on buildings in Istanbul city.Several concepts, equations and formula used were based on the previous works -calculating potential energy in Unity 3D game engine platform.
The project uses the game engine to integrate 3D CityGMLbased buildings for solar receiving simulation; thus, making Unity as one of the promising desktop platforms for 3D modelling.Selection of the suitable location for setting up solar panels either on the building roof or façade will be an easy task for city planner as well as to cope with sustainable environment.
As for the improvement, higher LoD, accurate equations (shadow, sunlight movement, etc) and other man-made features involvement could be addressed in the future.Bridges and road lighting also considered as the most potential features in potential solar modelling.

Figure 1 .
Figure 1.Solar panel on building roof, example of an active solar -PV system (Berkeley Lab, 2010).

Figure 9 .
Figure 9. Default GUI view of Istanbul Solar Estimation.

Figure 10 .
Figure 10.The selection of a particular building.

Figure 11 .
Figure 11.Potential solar panel for a building rooftop.

Figure 13 .
Figure 13.Solar estimation for the selected building rooftop and façade (potential solar panel).

Figure 12 .
Figure 12.Solar estimation for the selected building rooftop.