3D Amsterdam is a platform ( available at 3d.amsterdam.nl ) where the city of Amsterdam can be experienced interactively in 3D.
The main goals are:
- providing information about the city;
- making communication and participation more accessible through visuals;
- viewing and sharing 3D models.
More and more information and data is embedded, allowing future features like running simulations, visualization of solar and wind studies and showing impact of spatial urban changes. It will improve public insight in decision making processes.
The project is using the latest LTS (long-term support) release of Unity: 2020.3.
We will stick to this version untill new engine feature updates are required for the sake of maximum stability.
Currently the main target platform is a WebGL(2.0) application.
The project is set up to use the Universal Render Pipeline, focussing on high performance for lower end machines. Please note that shaders/materials have specific requirements in order to work in this render pipeline.
All the project code and comments should be written in English. Content text is written in Dutch.
For C#/.NET coding conventions please refer to the Microsoft conventions:
https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/inside-a-program/coding-conventions
For variable naming please refer to:
https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/general-naming-conventions
The files structure of the project looks like this.
3DAmsterdam
├── README.md
├── .gitattributes
├── .gitignore
├── docs
| ├── gettingstarted.md #Getting started with a new manucipality
| ├── assetgeneration.md #How to generate assets for the 3D layers
| └── faq.md #Frequently asked questions
├── 3DAmsterdam #Main Unity project folder
| └──Assets
| ├──3DAmsterdam #Amsterdam specific config, scenes and assets
| ├──Netherlands3D #Shared assets for all manucipalities where we encourage contribution
| └──WebGLTemplates #Special Unity folder containing our Netherlands3D fullscreen WebGL template
To set-up a project for a new municipality or city, please refer to the getting started documentation
After setting up your project you can start generating your own tile-based layer datasets using the asset generation documentation
The project uses the new Unity input system called Input Action Assets. The input mappings are defined in
\Assets\Netherlands3D\Input\3DNetherlands.inputactions
This will then generate a c# class that will be used in
\Assets\Netherlands3D\Input\ActionHandler.cs
The platform uses a tile based system consisting of 1km by 1km tiles. The handling of the tiles is initiated by the TileHandler which resides under the /Layers in the scene and needs to be configured with the active Layers that implement the Layer baseclass.
We currently have 4 implemented Layers which are
- Buildings
- Trees
- Sewerage
- Terrain
Each Layer script needs implement the HandleLayer method. This function receives a TileChange variable that provides the RD X and Y coordinate and an action.
The available actions are
- Create (create the tile)
- Upgrade (the Level of detail increases)
- Downgrade (the Level of detail decreases)
- Remove (remove the tile)
To improve performance and reduce memory usage the platform uses prebuild assets that are downloaded from the webserver in runtime.
To create assets the workflow is as follows
- Generate the assets from code using AssetDatabase.CreateAsset. This will create the asset as text based YAML file
- Then build the asset for WebGL using BuildPipeline.BuildAssetBundles. This will create binary files and needs to be copied to the webserver that will serve them.
DXF export library - Lesser General Public Licence
Sun Script - Credits to Paul Hayes
3D BAG - CC-BY licentie (TU Delft)
BruTile (only used for its Extent struct) - Apache License 2.0
Simple SJON - MIT License
Mesh Simplifier - MIT License
Clipping Triangles - MIT License
scripts/extentions/ListExtensions.cs - MIT License
Scripts/RuntimeHandle derivative work - MIT License
quantized mesh tiles (no longer used) - MIT License
JSZip - MIT License