Navigation Menu

Skip to content

Commit

Permalink
updated all examples to release 1.1.1471
Browse files Browse the repository at this point in the history
  • Loading branch information
mistafunk committed May 30, 2014
1 parent fae68c7 commit 48f872d
Show file tree
Hide file tree
Showing 71 changed files with 9,202 additions and 2 deletions.
26 changes: 24 additions & 2 deletions .gitignore
Expand Up @@ -4,10 +4,32 @@
*.o

# Compiled Dynamic libraries
#*.so
#*.dylib
*.so
*.dylib
*.dll
*.lib

# Compiled Static libraries
*.lai
*.la
*.a

# eclipse
*.project
*.cprojects

# extracted prt releases
/data*
/prt*
/esri_*/
/include
/bin
/lib
/doc
/cmake
*.zip
*.tgz
*.tar.gz
*.tar.bz2
*.tbz
*.tbz2
98 changes: 98 additions & 0 deletions README.md
@@ -0,0 +1,98 @@
# Esri CityEngine SDK Examples

The Esri CityEngine is based on the procedural runtime, which is the underlying engine that supports two GP tools in ArcGIS 10.x and drives procedural symbology in the release of ArcGIS Professional. The CityEngine SDK enables you as a 3rd party developer to extend CityEngine with additional import and export formats. Moreover, you can integrate the procedural runtime in your own client applications taking full advantage of the procedural core without running CityEngine or ArcGIS.

## Preamble

This document explains how to install the CityEngine SDK and how to work with the source-code examples contained in this repository. The Esri CityEngine SDK is packaged into three parts:
- This git repository with the example sources.
- An archive with the SDK binaries and documentation (whitepaper and API reference).
- An archive with example data (e.g. rule packages and initial shapes).

The archives are available for download at the corresponding github release page. See installation instructions below for details.

## CityEngine SDK Releases
- [v1.1.1407 (TBA)](https://github.com/Esri/esri-cityengine-sdk/releases/tag/1.1.1407)
- [v1.0.1209 (2014-01-15)](https://github.com/Esri/esri-cityengine-sdk/releases/tag/1.0.1209)

## Installation Instructions
1. Clone or download this repository
2. Download the SDK binary archive from the release page
3. Donwload the SDK example data archive from the release page
4. Unzip the archives into the cloned repository (the examples will work out of the box in this way).

## Examples
This repository contains a number of source code examples. Each example contains a README with detailed instructions how to build and use it.

A quick overview:
- prt4cmd: a simple command line utility to apply rule packages onto initial shapes and generate models.
- prt4maya: wraps the SDK into a plugin for Autodesk Maya
- prt4unity: wraps the SDK into a plugin for the Unity game engine
- stlenc: demonstrates how to write a custom encoder, in this case for the STL geometry format.

## General Software Requirements
Please note that the individual example READMEs may include further requirements.

#### Windows
* Windows XP SP1 or later (32bit and 64bit)
* License for CityEngine 2013 or later
* NMake 10.0 or later (part of Visual Studio)
* CMake 2.8.10 or later (http://www.cmake.org)
* Recommended C++ Compilers for simple clients (prt4cmd example):
* Microsoft VC 10.0 or later
* To compile SDK extensions (prt4maya example, stlenc example, custom encoders) it is required to use this **exact** C++ compiler version / boost libraries:
* Microsoft VC10 C++ Compiler (cl.exe) 16.00.40219.01, included in Visual Studio 2010 SP1
* boost 1.53 headers and binaries
* get the boost 1.53 headers from http://www.boost.org
* get the boost 1.53 pre-compiled binaries from http://boost.teeks99.com (e.g. boost_1_53_0-vc64-bin.exe or boost_1_53_0-vc32-bin.exe)
* note: if you compile boost yourself, the boost libraries need to be compiled with correct compiler (VC 10)

#### MacOSX
* MacOSX 10.7 or later (64bit only)
* License for CityEngine 2013 or later
* GNU Make 3.82 or later
* CMake 2.8.10 or later (http://www.cmake.org)
* Recommended C++ Compilers for simple clients (prt4cmd example):
* GCC 4.2.1 or later
* Clang 3.0 or later
* To compile SDK extensions (prt4maya example, stlenc example, custom encoders) it is required to use this **exact** C++ compiler version / boost libraries:
* Apple GCC 4.2.1 included in:
* XCode 4.2 and MacOSX SDK 10.7 (Based on Apple Inc. build 5658, LLVM build 2336.1.00)
* boost 1.53 headers and binaries (e.g. via homebrew or directly from http://www.boost.org)

#### Linux
* RedHat Enterprise Linux 6.x or compatible (64bit only)
* License for CityEngine 2013 or later
* GNU Make 3.82 or later
* CMake 2.8.10 or later (http://www.cmake.org)
* Recommended C++ Compilers for simple clients (prt4cmd example):
* GCC 4.4 or later
* To compile SDK extensions (prt4maya example, stlenc example, custom encoders) it is required to use this **exact** C++ compiler version / boost libraries:
* GCC 4.4.7 64bit included in RedHat Enterprise Linux 6.4 Package Repository
* boost 1.53 headers and binaries (http://www.boost.org)

## Further Resources
* Forum:
* General CityEngine: http://forums.arcgis.com/forums/204-CityEngine-General-Discussion
* CityEngine SDK: http://forums.arcgis.com/forums/270-CityEngine-SDK
* Facebook: https://www.facebook.com/CityEngine
* Twitter: https://twitter.com/CityEngine

## Issues

Find a bug or want to request a new feature? Please let us know by submitting an issue.

## Contributing

Anyone and everyone is welcome to contribute and to extend and improve the examples by sending us pull requests.

## Licensing

Copyright 2014 Esri

You may not use the content of this repository except in compliance with the following Licenses:
1. All content of all directories **except "examples"** is licensed under the CityEngine EULA, see [license/EULA.pdf](license/EULA.pdf).
2. All content in the "examples" directory tree is licensed under the APACHE 2.0 license. You may obtain a copy of this license at http://www.apache.org/licenses/LICENSE-2.0. A copy of the license is also available in the repository at [license/APACHE-LICENSE-2.0.txt](license/APACHE-LICENSE-2.0.txt).

[](Esri Tags: CityEngine)
[](Esri Language: C++)
2 changes: 2 additions & 0 deletions examples/prt4cmd/.gitignore
@@ -0,0 +1,2 @@
/build
/install
107 changes: 107 additions & 0 deletions examples/prt4cmd/README.linux_osx
@@ -0,0 +1,107 @@
PRT4CMD - CityEngine SDK Command Line Utility
---------------------------------------------


DISCLAIMER
----------

This is an example for using the CityEngine SDK. There is no support for this application.
If you find a bug or want to enhance functionality you have to do this yourself.


PREREQUISITES
-------------

Before you start working with this example, please make sure you follow
the main installation instructions for the CityEngine SDK in the
README.md file at the root of this example repository. This will
explain how to get the sdk binaries and example data.


SOFTWARE REQUIREMENTS
---------------------

- see "General Software Requirements - Linux or MacOSX, for simple clients"
- Boost libraries 1.41 or later (binary build for your compiler / platform, http://www.boost.org)


BUILD INSTRUCTIONS
------------------

1. Open a terminal
2. cd <path to esri-cityengine-sdk git repository>/examples/prt4cmd
3. mkdir build && cd build
4. cmake -G "Unix Makefiles" \
-DCMAKE_INSTALL_PREFIX=../install \
-DCMAKE_BUILD_TYPE=Release \
-DBoost_NO_BOOST_CMAKE=ON \
../src
5. make install

=> The build result will appear in ./install


USING PRT4CMD
-------------

1. Open a bash shell and cd in to the above install directory.
2. Type 'bin/prt4cmd' to see the list of options.
3. Type the following to generate the "candler" building model
in the wavefront obj format:

bin/prt4cmd \
-f CityEngAdvFx \
-l 3 \
-g ../../../data/candler_lot.obj \
-p ../../../data/candler.rpk \
-a ruleFile:string=bin/candler.01.cgb \
-a startRule:string=Default\$Lot \
-e com.esri.prt.codecs.OBJEncoder \
-z baseName:string=theCandler

4. The result is placed in the output directory:
- theCandler.obj
- theCandler.mtl
- <bunch of texture files>

5. To regenerate the same model with a different height, use the
following command:

bin/prt4cmd \
-f CityEngAdvFx \
-l 3 \
-g ../../../data/candler_lot.obj \
-p ../../../data/candler.rpk \
-a ruleFile:string=bin/candler.01.cgb \
-a startRule:string=Default\$Lot \
-a height:float=30 \
-e com.esri.prt.codecs.OBJEncoder \
-z baseName:string=theCandler

6. The obj file will now contain a model which is 30m high
instead of the default 62m.


SPECIFYING THE LICENSE TYPE
---------------------------

The SDK will make use of your installed CityEngine license (node-locked or by license server).
The "-f" argument specifies the type of license:
- CityEngBas (basic network license)
- CityEngBasFx (basic node-locked license)
- CityEngAdv (advanced network license)
- CityEngAdvFx (advanced node-locked license)

The "-s" argument is only needed for the network license types, for example:
bin/prt4cmd -f CityEngAdv -s 27000@example.com


LICENSING
---------

Copyright 2014 Esri

You may not use the content of this repository except in compliance with the following Licenses:
1. All content of all directories **except "examples"** is licensed under the CityEngine EULA, see [license/EULA.pdf](license/EULA.pdf).
2. All content in the "examples" directory tree is licensed under the APACHE 2.0 license. You may obtain a copy of this license at http://www.apache.org/licenses/LICENSE-2.0. A copy of the license is also available in the repository at [license/APACHE-LICENSE-2.0.txt](license/APACHE-LICENSE-2.0.txt).

90 changes: 90 additions & 0 deletions examples/prt4cmd/README.windows
@@ -0,0 +1,90 @@
PRT4CMD - CityEngine SDK Command Line Utility
---------------------------------------------


DISCLAIMER
----------

This is an example for using the CityEngine SDK. There is no support for this application.
If you find a bug or want to enhance functionality you have to fix/do this yourself.


PREREQUISITES
-------------

Before you start working with this example, please make sure you follow
the main installation instructions for the CityEngine SDK in the
README.md file at the root of this example repository. This will
explain how to get the sdk binaries and example data.


SOFTWARE REQUIREMENTS
---------------------

- see "General Software Requirements - Windows, for simple clients"
- Boost libraries 1.41 or later (binary build for your compiler / platform, http://www.boost.org or
http://boost.teeks99.com)


BUILD INSTRUCTIONS
------------------

1. Open a Visual Studio cmd shell (64bit)
2. cd <path to esri-cityengine-sdk git repository>\examples\prt4cmd
3. mkdir build
4. cd build
5. cmake -G "NMake Makefiles" -DCMAKE_INSTALL_PREFIX=..\install -DCMAKE_BUILD_TYPE=Release -Dprt_DIR=<path to cityengine sdk binaries>\cmake -DBOOST_INCLUDEDIR=C:\local\boost_1_53_0 -DBOOST_LIBRARYDIR=C:\local\boost_1_53_0\lib64-msvc-10.0 -DBoost_USE_STATIC_LIBS=ON ..\src
6. nmake install

=> The build result will appear in .\install

For a 32bit build use the 32bit Visual Studio cmd shell, the 32bit build of the CityEngine SDK and the 32bit boost libraries must be used.


USING PRT4CMD
-------------

1. Open a cmd shell and cd in to the above install directory.
2. Type 'bin\prt4cmd' to see the list of options.
3. Type the following to generate the "candler" building model
in the wavefront obj format:

bin\prt4cmd -f CityEngAdvFx -l 3 -g ..\..\..\data\candler_lot.obj -p ..\..\..\data\candler.rpk -a ruleFile:string=bin/candler.01.cgb -a startRule:string=Default$Lot -e com.esri.prt.codecs.OBJEncoder -z baseName:string=theCandler

4. The result is placed in the output directory:
- theCandler.obj
- theCandler.mtl
- <bunch of texture files>

5. To regenerate the same model with a different height, use the
following command:

bin\prt4cmd -f CityEngAdvFx -l 3 -g ..\..\..\data\candler_lot.obj -p ..\..\..\data\candler.rpk -a ruleFile:string=bin/candler.01.cgb -a startRule:string=Default$Lot -a height:float=30 -e com.esri.prt.codecs.OBJEncoder -z baseName:string=theCandler

6. The obj file will now contain a model which is 30m high
instead of the default 62m.


SPECIFYING THE LICENSE TYPE
---------------------------

The SDK will make use of your installed CityEngine license (node-locked or by license server).
The "-f" argument specifies the type of license:
- CityEngBas (basic network license)
- CityEngBasFx (basic node-locked license)
- CityEngAdv (advanced network license)
- CityEngAdvFx (advanced node-locked license)

The "-s" argument is only needed for the network license types, for example:
bin\prt4cmd -f CityEngAdv -s 27000@example.com


LICENSING
---------

Copyright 2014 Esri

You may not use the content of this repository except in compliance with the following Licenses:
1. All content of all directories **except "examples"** is licensed under the CityEngine EULA, see [license/EULA.pdf](license/EULA.pdf).
2. All content in the "examples" directory tree is licensed under the APACHE 2.0 license. You may obtain a copy of this license at http://www.apache.org/licenses/LICENSE-2.0. A copy of the license is also available in the repository at [license/APACHE-LICENSE-2.0.txt](license/APACHE-LICENSE-2.0.txt).

0 comments on commit 48f872d

Please sign in to comment.