SlideShare a Scribd company logo
CityEngine to OpenDS
Project Report
Andra-Lidia Lezza
Supervisor: Dr. Nicolas Louveton
Interdisciplinary Centre for Security, Reliability and Trust (SnT)
January - July 2015
The aim of this report is to outline the process of creating and integrating
a 3D CityEngine model with OpenDS, an open source driving simulator. The
system requirements needed for building such a model, as well as the steps
and the software used are presented in the following sections. This report is
concluded with a description of the result - a Kirchberg (Luxembourg City)
model - and with a discussion of the limitations caused by some versions of
the software. This project was done with the purpose of assessing the usability
of the required software in the context of creating further 3D city models for
future human-computer interaction projects.
SnT 2015 3
Contents
1 Introduction 4
2 System Requirements 5
3 Data Workflow 5
3.1 CityEngine Features and Export . . . . . . . . . . . . . . . . . . . . . 5
3.2 Blender Features and Export . . . . . . . . . . . . . . . . . . . . . . . 7
3.3 OpenDS Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.4 Mini Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
4 Results 17
5 Conclusion 18
6 Main Internet Resources 19
4 CityEngine to OpenDS
1 Introduction
CityEngine is a software product for urban 3D modeling that uses procedural rules
and feature geometry and attributes. It allows the user to create 3D models based
on existing 2D data, like the openstreetmap (.osm) format, on which we based the
street network in this project.
OpenDS is an open source driving simulator written in Java and based on a
scene graph game engine. In the context of our project, it’s three main components -
the driving task editor, the simulator and the analyzer, are working with XML-based
driving tasks in order to render the advanced city scenario exported from CityEngine.
The link between the two main components of this project is represented by an
additional software product which is meant to connect the data formats of CityEngine
and OpenDS. Blender is an open source 3D animation suite that offers modeling and
simulation options as well as Python-based scripts for several import/export options.
With these features in mind, we have used Blender for processing the .obj (Wave-
front) data from CityEngine into OgreXML formats accepted by OpenDS.
To this end, here are the steps necessary for setting up the required version of
Blender, which is compatible with OpenDS:
1 We recommend Blender 2.49b with the following exporters:
– meshes exporter:
http://www.xullum.net/lefthand/downloads/temp/BlenderExport.zip
– scene exporter: http://sourceforge.net/p/ogreaddons/code/HEAD/tree/
trunk/blendersceneexporter/ogredotscene.py
2 Install Blender. Make sure to install version 2.49b as there are known problems
with newer versions http://download.blender.org/release/.
3 Install Python. This is not needed for Blender itself, but for the exporter script.
Choose the same Python version that is used as base for your Blender version
(you’ll see it when you start Blender). For this project we needed Python 2.6.2
(https://www.python.org/download/releases/2.6.2/).
SnT 2015 5
4 Copy the meshes exporter to the Blender scripts folder. Note: For Blender 2.49b
and Windows 7 this folder is located at: C:/Users/”name”/AppData/Roaming/Blender
Foundation/Blender/.blender/scripts
5 Copy the scene exporter to the same folder as the meshes exporter.
More details on how to use the meshes and scene exporter can be found here:
http://www.ogre3d.org/tikiwiki/Blender+Exporter
http://www.ogre3d.org/tikiwiki/Blender+dotScene+Exporter
2 System Requirements
The operating systems and software versions used in order to achieve the 3D model
of the Kirchberg area in Luxemourg are outlined in the following table:
System Requirements
OS/Software Version Memory/Processor
Windows10/CityEngine 2014.1 (min)16 GB, Intel Core i7
Windows7/Blender 2.49b 8GB, Intel Core i7
Windows10,7/OpenDS 2.5 8GB or 16Gb, Intel Core i7
The next sections will describe the steps of building the 3D model, exporting it
from CityEngine to Blender and then processing it from Blender to OpenDS.
3 Data Workflow
3.1 CityEngine Features and Export
Here is a general overview of the CityEngine modeling software:
6 CityEngine to OpenDS
Figure 1: CityEngine 3D model - Kirchberg map
The general workflow for the 3D model is:
1 Import .osm and texture files in CityEngine
2 Select and Cleanup Graph
3 Align Terrain to Shapes
4 Subdivide Shapes and Assign Rule Files
5 Assign Rule File to the street network
6 Save and Export Models as Wavefront OBJ
SnT 2015 7
Figure 2: Examples of street view and the general urban setting of Kirchberg
3.2 Blender Features and Export
The steps for creating the scene and the mesh files from Blender are:
1 Import .obj files to Blender
2 Export *.scene file
3 Export *.mesh.xml files (including *.material + textures)
4 Convert *.tif to *.png images (and do adjustments in *.material file) as *.tif is
not supported
5 Replace the space character in the name of some texture files with ” ” (space
character not allowed in OgreXML textures)
6 Add ”max anisotropy 16” to some floor textures (grass, road, hedge, etc.) in
file Kirchberg.material in order to reduce blurring
3.3 OpenDS Workflow
Once we have the scene and the mesh files from Blender we can follow through the
next steps to create the Driving Task which will be available for rendering in OpenDS:
1 Copy the contents of the folder containing the scene and the meshes to the
”Scenes” folder in the ”assets” of OpenDS
8 CityEngine to OpenDS
2 Create a new driving task in the Driving Tasks/Projects folder and apply the
following change to the scene.xml file of the driving task project:
<model id=”City” key=”Scenes /City/City . scene”>
to
<model id=”City” key=”Scenes / Kirchberg / Kirchberg . scene”>
3 Run the ”kirchberg.xml” with OpenDS.
3.4 Mini Tutorial
The following part of this report aims to outline all the steps above as a small tutorial:
• Saving .osm (openstreetmap) files for the map basis in CityEngine. This format
allows us to generate the model of this area on top of the already existing and
consistently updated street network.
Figure 3: Exporting the .osm file from openstreetmap
SnT 2015 9
• Saving the terrain/texture file which will be added on top of the map in CityEngine:
(from either Google Maps or Google Earth, as both of these formats will be geo-
referenced)
Figure 4: Saving a texture files - from Google Earth
As described before, CityEngine makes use of procedural rules in order to create
various 3D models of buildings, streets and other urban settings. These rules are
defined through a unique programming language specific for generating architectural
3D content: the CGA shape grammar which allows the user to iteratively refine the
designs by adding more detail to simple shapes.
These CGA rules are the basis of all models in our project. Also, the following
items represent the environment in which the Kirchberg model was created:
10 CityEngine to OpenDS
Figure 5: CityEngine: a CGA Shape File for one of the building models
SnT 2015 11
Figure 6: CityEngine: Navigator which gives access to attributes and the models’
geometry
Figure 7: CityEngine: All the models present in the Kirchberg scene
12 CityEngine to OpenDS
Figure 8: CityEngine: The Viewport allows to analyze and improve the 3D model
based on the features of each of the rule files assigned to the given lots on the map
Figure 9: CityEngine: First select the area containing the models to be exported
SnT 2015 13
Figure 10: CityEngine: The size of the exported models has to be set such that is
does not exceed the memory budget. This is critical for further importing the models
in Blender.
14 CityEngine to OpenDS
Figure 11: Blender: Importing the .obj file in Blender. It is important to notice
that the scene we exported from CityEngine is composed of multiple .obj files. All
these files have to be imported into Blender so that all the features present in the 3D
model will also be a part of the scene export.
Figure 12: Blender: Importing the .obj file in Blender with the right settings
SnT 2015 15
Figure 13: Blender: After import, select all models in the View for next steps
Figure 14: Blender: Export OgreXML scene with the help of the ogredotscene ex-
porter which was added to the Python scripts folder in Blender. No specific options
have to be set.
16 CityEngine to OpenDS
Figure 15: Blender: Export OgreXML Meshes with the help of the ogremeshexporter
added to the Python scripts folder in Blender. Some of the critical parameters are
the: Coloured Ambient, Copy Textures, Rendering and Require Materials, OgreXml-
Converter
Figure 16: OpenDS: Running the ”kirchberg.xml” scene
SnT 2015 17
4 Results
The result of this project is a scene file containing a small part of Kirchberg, modeled
to fit the requirements of OpenDS. The driving simulator can theoretically render
bigger and more complex scenes, but for the purpose of this project, we chose to create
a small area of Luxembourg which we could transform through the various processes
presented in this report. Examples of the driving task based on the CityEngine model
are outlined below:
18 CityEngine to OpenDS
5 Conclusion
The results presented here are based on a very specific set of software platforms. Some
of these have outdated versions that do not support large files, such as Blender 2.49b.
The main issues we encountered with the processing of the data from CityEngine
to OpenDS was this particular exporter for the 3D model we built. The maximum
size for the .obj files it accepts varies between 100 and 150 MB. We found that the
only option through which it can support larger files is if we have more .obj files
from CityEngine and we import them iteratively in Blender. This method proved
SnT 2015 19
to be less practical due to the limited amount of features we can have in our scene
after such an import. The maximum size of the scene in this case could reach 300
MB, but a lot of the necessary items were missing from the model. Hence, we im-
ported at most 4 .obj files for this project and these amount to approximately 100MB.
Additionally, a critical step was the creation of the 3D model itself with CityEngine.
This step required extensive memory resources and a more powerful processor as we
were dealing with a large scene file. A few more issues arose when we tried to create
the driving task in OpenDS and the parameters of the city scene had to be changed
accordingly in the XML file so that we would be able to place the car on the streets
of our city.
In conclusion, a lot of the challenges we encountered during the development of
this small part of Luxembourg for OpenDS could be solved if the platforms used
would be updated or even completely replaced so that they are fully compatible with
each other. The usability issues were mainly caused by the incompatibility between
the given methods and implementations.
6 Main Internet Resources
• CityEngine ArcGIS Resources
• Introduction to creating city models for OpenDS with CityEngine
• OpenDS Documentation

More Related Content

Viewers also liked

Apresentação sustentar ronaldo malard
Apresentação sustentar ronaldo malardApresentação sustentar ronaldo malard
Apresentação sustentar ronaldo malard
forumsustentar
 
Sectur
SecturSectur
Dryer Vent Cleaning San Antonio
Dryer Vent Cleaning San AntonioDryer Vent Cleaning San Antonio
Dryer Vent Cleaning San Antonio
AAA DUCT CLEANING
 
Sustentar 2011
Sustentar 2011Sustentar 2011
Sustentar 2011
forumsustentar
 
Evolucion de las computadoras
Evolucion de las computadorasEvolucion de las computadoras
Evolucion de las computadoras
locolucas8
 
SUNSET LAS VEGAS license plate
SUNSET LAS VEGAS license plateSUNSET LAS VEGAS license plate
SUNSET LAS VEGAS license plate
Nina Berbari
 
Palestra cassio spina para sustentar 2012
Palestra cassio spina para sustentar 2012Palestra cassio spina para sustentar 2012
Palestra cassio spina para sustentar 2012
forumsustentar
 
Sustentar bh 2012.05.23 - marco fujihara
Sustentar bh 2012.05.23 - marco fujiharaSustentar bh 2012.05.23 - marco fujihara
Sustentar bh 2012.05.23 - marco fujihara
forumsustentar
 
Brazil ghg protocol program
Brazil ghg protocol programBrazil ghg protocol program
Brazil ghg protocol program
forumsustentar
 
Diagrama de araña
Diagrama de arañaDiagrama de araña
Diagrama de araña
Maria Rivera
 
ideas
ideasideas
ideas
Yoona Love
 
Guia nomina en word
Guia nomina en wordGuia nomina en word
Guia nomina en word
Claudia150499
 
Apresentação 24 agosto 2011 jurema 14 00
Apresentação 24 agosto 2011 jurema 14 00Apresentação 24 agosto 2011 jurema 14 00
Apresentação 24 agosto 2011 jurema 14 00
forumsustentar
 
Texto+de+ciências+do+ambiente
Texto+de+ciências+do+ambienteTexto+de+ciências+do+ambiente
Texto+de+ciências+do+ambiente
Manoella Brito
 
Test presentation
Test presentationTest presentation
Test presentation
teizvika
 
Paredes maria jose
Paredes maria joseParedes maria jose
Paredes maria jose
majitoremache
 
9 Marzo ¿voto útil?
9 Marzo ¿voto útil?9 Marzo ¿voto útil?
9 Marzo ¿voto útil?
gueste7feb6
 

Viewers also liked (20)

Apresentação sustentar ronaldo malard
Apresentação sustentar ronaldo malardApresentação sustentar ronaldo malard
Apresentação sustentar ronaldo malard
 
Interesting sums
Interesting sumsInteresting sums
Interesting sums
 
Sectur
SecturSectur
Sectur
 
Dryer Vent Cleaning San Antonio
Dryer Vent Cleaning San AntonioDryer Vent Cleaning San Antonio
Dryer Vent Cleaning San Antonio
 
Sustentar 2011
Sustentar 2011Sustentar 2011
Sustentar 2011
 
Evolucion de las computadoras
Evolucion de las computadorasEvolucion de las computadoras
Evolucion de las computadoras
 
SUNSET LAS VEGAS license plate
SUNSET LAS VEGAS license plateSUNSET LAS VEGAS license plate
SUNSET LAS VEGAS license plate
 
Palestra cassio spina para sustentar 2012
Palestra cassio spina para sustentar 2012Palestra cassio spina para sustentar 2012
Palestra cassio spina para sustentar 2012
 
Sustentar bh 2012.05.23 - marco fujihara
Sustentar bh 2012.05.23 - marco fujiharaSustentar bh 2012.05.23 - marco fujihara
Sustentar bh 2012.05.23 - marco fujihara
 
Covo 053 2014
Covo 053 2014Covo 053 2014
Covo 053 2014
 
Brazil ghg protocol program
Brazil ghg protocol programBrazil ghg protocol program
Brazil ghg protocol program
 
Diagrama de araña
Diagrama de arañaDiagrama de araña
Diagrama de araña
 
ideas
ideasideas
ideas
 
Guia nomina en word
Guia nomina en wordGuia nomina en word
Guia nomina en word
 
Transm~2
Transm~2Transm~2
Transm~2
 
Apresentação 24 agosto 2011 jurema 14 00
Apresentação 24 agosto 2011 jurema 14 00Apresentação 24 agosto 2011 jurema 14 00
Apresentação 24 agosto 2011 jurema 14 00
 
Texto+de+ciências+do+ambiente
Texto+de+ciências+do+ambienteTexto+de+ciências+do+ambiente
Texto+de+ciências+do+ambiente
 
Test presentation
Test presentationTest presentation
Test presentation
 
Paredes maria jose
Paredes maria joseParedes maria jose
Paredes maria jose
 
9 Marzo ¿voto útil?
9 Marzo ¿voto útil?9 Marzo ¿voto útil?
9 Marzo ¿voto útil?
 

Similar to CityEngine-OpenDS

Introduction to mago3D, an Open Source Based Digital Twin Platform
Introduction to mago3D, an Open Source Based Digital Twin PlatformIntroduction to mago3D, an Open Source Based Digital Twin Platform
Introduction to mago3D, an Open Source Based Digital Twin Platform
SANGHEE SHIN
 
Current State of mago3D, an Open Source Based Digital Twin Platform
Current State of mago3D, an Open Source Based Digital Twin PlatformCurrent State of mago3D, an Open Source Based Digital Twin Platform
Current State of mago3D, an Open Source Based Digital Twin Platform
SANGHEE SHIN
 
State of mago3D, An Open Source Based Digital Twin Platform
State of mago3D, An Open Source Based Digital Twin PlatformState of mago3D, An Open Source Based Digital Twin Platform
State of mago3D, An Open Source Based Digital Twin Platform
SANGHEE SHIN
 
Let's integrate CAD/BIM/GIS on the same platform: A practical approach in rea...
Let's integrate CAD/BIM/GIS on the same platform: A practical approach in rea...Let's integrate CAD/BIM/GIS on the same platform: A practical approach in rea...
Let's integrate CAD/BIM/GIS on the same platform: A practical approach in rea...
SANGHEE SHIN
 
Polyline download and visualization over terrain models
Polyline download and visualization over terrain modelsPolyline download and visualization over terrain models
Polyline download and visualization over terrain models
graphitech
 
The Next Leap in JavaScript Performance
The Next Leap in JavaScript PerformanceThe Next Leap in JavaScript Performance
The Next Leap in JavaScript Performance
Intel® Software
 
Webinar: Começando seus trabalhos com Machine Learning utilizando ferramentas...
Webinar: Começando seus trabalhos com Machine Learning utilizando ferramentas...Webinar: Começando seus trabalhos com Machine Learning utilizando ferramentas...
Webinar: Começando seus trabalhos com Machine Learning utilizando ferramentas...
Embarcados
 
UDP Report
UDP ReportUDP Report
UDP Report
James Dianics
 
mago3D FOSS4G NA 2018
mago3D FOSS4G NA 2018mago3D FOSS4G NA 2018
mago3D FOSS4G NA 2018
정대 천
 
Ball Collecting game report
Ball Collecting game report Ball Collecting game report
Ball Collecting game report
Dileep Maurya
 
CAD STANDARDS - SMART MANUFACTURING MECH
CAD STANDARDS - SMART MANUFACTURING MECHCAD STANDARDS - SMART MANUFACTURING MECH
CAD STANDARDS - SMART MANUFACTURING MECH
RAJESHS631800
 
Ha4 displaying 3 d polygon animations
Ha4   displaying 3 d polygon animationsHa4   displaying 3 d polygon animations
Ha4 displaying 3 d polygon animations
JordanSmith96
 
Resume_eng
Resume_engResume_eng
Resume_eng
vilas jadhav
 
ppt 3 demo.pptx
ppt 3 demo.pptxppt 3 demo.pptx
ppt 3 demo.pptx
AmanGupta283724
 
resume
resumeresume
2D to 3D dynamic modeling of architectural plans in Augmented Reality
2D to 3D dynamic modeling of architectural plans in Augmented Reality2D to 3D dynamic modeling of architectural plans in Augmented Reality
2D to 3D dynamic modeling of architectural plans in Augmented Reality
IRJET Journal
 
Auto conversion of serial C code to CUDA code
Auto conversion of serial C code to CUDA codeAuto conversion of serial C code to CUDA code
Auto conversion of serial C code to CUDA code
IRJET Journal
 
Introduction to 2D/3D Graphics
Introduction to 2D/3D GraphicsIntroduction to 2D/3D Graphics
Introduction to 2D/3D Graphics
Prabindh Sundareson
 
Webrender 1.0
Webrender 1.0Webrender 1.0
Webrender 1.0
Daosheng Mu
 
IRJET- Generation of HTML Code using Machine Learning Techniques from Mock-Up...
IRJET- Generation of HTML Code using Machine Learning Techniques from Mock-Up...IRJET- Generation of HTML Code using Machine Learning Techniques from Mock-Up...
IRJET- Generation of HTML Code using Machine Learning Techniques from Mock-Up...
IRJET Journal
 

Similar to CityEngine-OpenDS (20)

Introduction to mago3D, an Open Source Based Digital Twin Platform
Introduction to mago3D, an Open Source Based Digital Twin PlatformIntroduction to mago3D, an Open Source Based Digital Twin Platform
Introduction to mago3D, an Open Source Based Digital Twin Platform
 
Current State of mago3D, an Open Source Based Digital Twin Platform
Current State of mago3D, an Open Source Based Digital Twin PlatformCurrent State of mago3D, an Open Source Based Digital Twin Platform
Current State of mago3D, an Open Source Based Digital Twin Platform
 
State of mago3D, An Open Source Based Digital Twin Platform
State of mago3D, An Open Source Based Digital Twin PlatformState of mago3D, An Open Source Based Digital Twin Platform
State of mago3D, An Open Source Based Digital Twin Platform
 
Let's integrate CAD/BIM/GIS on the same platform: A practical approach in rea...
Let's integrate CAD/BIM/GIS on the same platform: A practical approach in rea...Let's integrate CAD/BIM/GIS on the same platform: A practical approach in rea...
Let's integrate CAD/BIM/GIS on the same platform: A practical approach in rea...
 
Polyline download and visualization over terrain models
Polyline download and visualization over terrain modelsPolyline download and visualization over terrain models
Polyline download and visualization over terrain models
 
The Next Leap in JavaScript Performance
The Next Leap in JavaScript PerformanceThe Next Leap in JavaScript Performance
The Next Leap in JavaScript Performance
 
Webinar: Começando seus trabalhos com Machine Learning utilizando ferramentas...
Webinar: Começando seus trabalhos com Machine Learning utilizando ferramentas...Webinar: Começando seus trabalhos com Machine Learning utilizando ferramentas...
Webinar: Começando seus trabalhos com Machine Learning utilizando ferramentas...
 
UDP Report
UDP ReportUDP Report
UDP Report
 
mago3D FOSS4G NA 2018
mago3D FOSS4G NA 2018mago3D FOSS4G NA 2018
mago3D FOSS4G NA 2018
 
Ball Collecting game report
Ball Collecting game report Ball Collecting game report
Ball Collecting game report
 
CAD STANDARDS - SMART MANUFACTURING MECH
CAD STANDARDS - SMART MANUFACTURING MECHCAD STANDARDS - SMART MANUFACTURING MECH
CAD STANDARDS - SMART MANUFACTURING MECH
 
Ha4 displaying 3 d polygon animations
Ha4   displaying 3 d polygon animationsHa4   displaying 3 d polygon animations
Ha4 displaying 3 d polygon animations
 
Resume_eng
Resume_engResume_eng
Resume_eng
 
ppt 3 demo.pptx
ppt 3 demo.pptxppt 3 demo.pptx
ppt 3 demo.pptx
 
resume
resumeresume
resume
 
2D to 3D dynamic modeling of architectural plans in Augmented Reality
2D to 3D dynamic modeling of architectural plans in Augmented Reality2D to 3D dynamic modeling of architectural plans in Augmented Reality
2D to 3D dynamic modeling of architectural plans in Augmented Reality
 
Auto conversion of serial C code to CUDA code
Auto conversion of serial C code to CUDA codeAuto conversion of serial C code to CUDA code
Auto conversion of serial C code to CUDA code
 
Introduction to 2D/3D Graphics
Introduction to 2D/3D GraphicsIntroduction to 2D/3D Graphics
Introduction to 2D/3D Graphics
 
Webrender 1.0
Webrender 1.0Webrender 1.0
Webrender 1.0
 
IRJET- Generation of HTML Code using Machine Learning Techniques from Mock-Up...
IRJET- Generation of HTML Code using Machine Learning Techniques from Mock-Up...IRJET- Generation of HTML Code using Machine Learning Techniques from Mock-Up...
IRJET- Generation of HTML Code using Machine Learning Techniques from Mock-Up...
 

CityEngine-OpenDS

  • 1. CityEngine to OpenDS Project Report Andra-Lidia Lezza Supervisor: Dr. Nicolas Louveton Interdisciplinary Centre for Security, Reliability and Trust (SnT) January - July 2015
  • 2. The aim of this report is to outline the process of creating and integrating a 3D CityEngine model with OpenDS, an open source driving simulator. The system requirements needed for building such a model, as well as the steps and the software used are presented in the following sections. This report is concluded with a description of the result - a Kirchberg (Luxembourg City) model - and with a discussion of the limitations caused by some versions of the software. This project was done with the purpose of assessing the usability of the required software in the context of creating further 3D city models for future human-computer interaction projects.
  • 3. SnT 2015 3 Contents 1 Introduction 4 2 System Requirements 5 3 Data Workflow 5 3.1 CityEngine Features and Export . . . . . . . . . . . . . . . . . . . . . 5 3.2 Blender Features and Export . . . . . . . . . . . . . . . . . . . . . . . 7 3.3 OpenDS Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3.4 Mini Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 4 Results 17 5 Conclusion 18 6 Main Internet Resources 19
  • 4. 4 CityEngine to OpenDS 1 Introduction CityEngine is a software product for urban 3D modeling that uses procedural rules and feature geometry and attributes. It allows the user to create 3D models based on existing 2D data, like the openstreetmap (.osm) format, on which we based the street network in this project. OpenDS is an open source driving simulator written in Java and based on a scene graph game engine. In the context of our project, it’s three main components - the driving task editor, the simulator and the analyzer, are working with XML-based driving tasks in order to render the advanced city scenario exported from CityEngine. The link between the two main components of this project is represented by an additional software product which is meant to connect the data formats of CityEngine and OpenDS. Blender is an open source 3D animation suite that offers modeling and simulation options as well as Python-based scripts for several import/export options. With these features in mind, we have used Blender for processing the .obj (Wave- front) data from CityEngine into OgreXML formats accepted by OpenDS. To this end, here are the steps necessary for setting up the required version of Blender, which is compatible with OpenDS: 1 We recommend Blender 2.49b with the following exporters: – meshes exporter: http://www.xullum.net/lefthand/downloads/temp/BlenderExport.zip – scene exporter: http://sourceforge.net/p/ogreaddons/code/HEAD/tree/ trunk/blendersceneexporter/ogredotscene.py 2 Install Blender. Make sure to install version 2.49b as there are known problems with newer versions http://download.blender.org/release/. 3 Install Python. This is not needed for Blender itself, but for the exporter script. Choose the same Python version that is used as base for your Blender version (you’ll see it when you start Blender). For this project we needed Python 2.6.2 (https://www.python.org/download/releases/2.6.2/).
  • 5. SnT 2015 5 4 Copy the meshes exporter to the Blender scripts folder. Note: For Blender 2.49b and Windows 7 this folder is located at: C:/Users/”name”/AppData/Roaming/Blender Foundation/Blender/.blender/scripts 5 Copy the scene exporter to the same folder as the meshes exporter. More details on how to use the meshes and scene exporter can be found here: http://www.ogre3d.org/tikiwiki/Blender+Exporter http://www.ogre3d.org/tikiwiki/Blender+dotScene+Exporter 2 System Requirements The operating systems and software versions used in order to achieve the 3D model of the Kirchberg area in Luxemourg are outlined in the following table: System Requirements OS/Software Version Memory/Processor Windows10/CityEngine 2014.1 (min)16 GB, Intel Core i7 Windows7/Blender 2.49b 8GB, Intel Core i7 Windows10,7/OpenDS 2.5 8GB or 16Gb, Intel Core i7 The next sections will describe the steps of building the 3D model, exporting it from CityEngine to Blender and then processing it from Blender to OpenDS. 3 Data Workflow 3.1 CityEngine Features and Export Here is a general overview of the CityEngine modeling software:
  • 6. 6 CityEngine to OpenDS Figure 1: CityEngine 3D model - Kirchberg map The general workflow for the 3D model is: 1 Import .osm and texture files in CityEngine 2 Select and Cleanup Graph 3 Align Terrain to Shapes 4 Subdivide Shapes and Assign Rule Files 5 Assign Rule File to the street network 6 Save and Export Models as Wavefront OBJ
  • 7. SnT 2015 7 Figure 2: Examples of street view and the general urban setting of Kirchberg 3.2 Blender Features and Export The steps for creating the scene and the mesh files from Blender are: 1 Import .obj files to Blender 2 Export *.scene file 3 Export *.mesh.xml files (including *.material + textures) 4 Convert *.tif to *.png images (and do adjustments in *.material file) as *.tif is not supported 5 Replace the space character in the name of some texture files with ” ” (space character not allowed in OgreXML textures) 6 Add ”max anisotropy 16” to some floor textures (grass, road, hedge, etc.) in file Kirchberg.material in order to reduce blurring 3.3 OpenDS Workflow Once we have the scene and the mesh files from Blender we can follow through the next steps to create the Driving Task which will be available for rendering in OpenDS: 1 Copy the contents of the folder containing the scene and the meshes to the ”Scenes” folder in the ”assets” of OpenDS
  • 8. 8 CityEngine to OpenDS 2 Create a new driving task in the Driving Tasks/Projects folder and apply the following change to the scene.xml file of the driving task project: <model id=”City” key=”Scenes /City/City . scene”> to <model id=”City” key=”Scenes / Kirchberg / Kirchberg . scene”> 3 Run the ”kirchberg.xml” with OpenDS. 3.4 Mini Tutorial The following part of this report aims to outline all the steps above as a small tutorial: • Saving .osm (openstreetmap) files for the map basis in CityEngine. This format allows us to generate the model of this area on top of the already existing and consistently updated street network. Figure 3: Exporting the .osm file from openstreetmap
  • 9. SnT 2015 9 • Saving the terrain/texture file which will be added on top of the map in CityEngine: (from either Google Maps or Google Earth, as both of these formats will be geo- referenced) Figure 4: Saving a texture files - from Google Earth As described before, CityEngine makes use of procedural rules in order to create various 3D models of buildings, streets and other urban settings. These rules are defined through a unique programming language specific for generating architectural 3D content: the CGA shape grammar which allows the user to iteratively refine the designs by adding more detail to simple shapes. These CGA rules are the basis of all models in our project. Also, the following items represent the environment in which the Kirchberg model was created:
  • 10. 10 CityEngine to OpenDS Figure 5: CityEngine: a CGA Shape File for one of the building models
  • 11. SnT 2015 11 Figure 6: CityEngine: Navigator which gives access to attributes and the models’ geometry Figure 7: CityEngine: All the models present in the Kirchberg scene
  • 12. 12 CityEngine to OpenDS Figure 8: CityEngine: The Viewport allows to analyze and improve the 3D model based on the features of each of the rule files assigned to the given lots on the map Figure 9: CityEngine: First select the area containing the models to be exported
  • 13. SnT 2015 13 Figure 10: CityEngine: The size of the exported models has to be set such that is does not exceed the memory budget. This is critical for further importing the models in Blender.
  • 14. 14 CityEngine to OpenDS Figure 11: Blender: Importing the .obj file in Blender. It is important to notice that the scene we exported from CityEngine is composed of multiple .obj files. All these files have to be imported into Blender so that all the features present in the 3D model will also be a part of the scene export. Figure 12: Blender: Importing the .obj file in Blender with the right settings
  • 15. SnT 2015 15 Figure 13: Blender: After import, select all models in the View for next steps Figure 14: Blender: Export OgreXML scene with the help of the ogredotscene ex- porter which was added to the Python scripts folder in Blender. No specific options have to be set.
  • 16. 16 CityEngine to OpenDS Figure 15: Blender: Export OgreXML Meshes with the help of the ogremeshexporter added to the Python scripts folder in Blender. Some of the critical parameters are the: Coloured Ambient, Copy Textures, Rendering and Require Materials, OgreXml- Converter Figure 16: OpenDS: Running the ”kirchberg.xml” scene
  • 17. SnT 2015 17 4 Results The result of this project is a scene file containing a small part of Kirchberg, modeled to fit the requirements of OpenDS. The driving simulator can theoretically render bigger and more complex scenes, but for the purpose of this project, we chose to create a small area of Luxembourg which we could transform through the various processes presented in this report. Examples of the driving task based on the CityEngine model are outlined below:
  • 18. 18 CityEngine to OpenDS 5 Conclusion The results presented here are based on a very specific set of software platforms. Some of these have outdated versions that do not support large files, such as Blender 2.49b. The main issues we encountered with the processing of the data from CityEngine to OpenDS was this particular exporter for the 3D model we built. The maximum size for the .obj files it accepts varies between 100 and 150 MB. We found that the only option through which it can support larger files is if we have more .obj files from CityEngine and we import them iteratively in Blender. This method proved
  • 19. SnT 2015 19 to be less practical due to the limited amount of features we can have in our scene after such an import. The maximum size of the scene in this case could reach 300 MB, but a lot of the necessary items were missing from the model. Hence, we im- ported at most 4 .obj files for this project and these amount to approximately 100MB. Additionally, a critical step was the creation of the 3D model itself with CityEngine. This step required extensive memory resources and a more powerful processor as we were dealing with a large scene file. A few more issues arose when we tried to create the driving task in OpenDS and the parameters of the city scene had to be changed accordingly in the XML file so that we would be able to place the car on the streets of our city. In conclusion, a lot of the challenges we encountered during the development of this small part of Luxembourg for OpenDS could be solved if the platforms used would be updated or even completely replaced so that they are fully compatible with each other. The usability issues were mainly caused by the incompatibility between the given methods and implementations. 6 Main Internet Resources • CityEngine ArcGIS Resources • Introduction to creating city models for OpenDS with CityEngine • OpenDS Documentation