Skip to content

Commit

Permalink
Merge branch 'master' into #58
Browse files Browse the repository at this point in the history
  • Loading branch information
mistafunk committed Mar 3, 2018
2 parents f07a6f3 + a6a460c commit cabfb33
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 29 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# Palladio
# ![](doc/img/Palladio_icon_v1_32.png) Palladio

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)

Palladio is a plugin for [SideFX Houdini](https://www.sidefx.com). It provides operator nodes which enable the execution of [Esri CityEngine](http://www.esri.com/software/cityengine) 'rules' within Houdini networks. This provides a convenient combination of the generic procedural modelling capabilities of Houdini with the architecture-specific procedural modeling language 'CGA' of CityEngine.

Palladio is not an Esri nor vrbn product and there is currently no official/commercial support from Esri nor vrbn. However, if you are interested in commercial services related to Palladio, please contact info@vrbn.io


## Documentation

* [Quick Start](doc/usage.md)
Expand All @@ -17,6 +20,7 @@ External documentation:
* [CityEngine SDK API Reference](https://esri.github.io/esri-cityengine-sdk/html/index.html)
* [Houdini 16.0 HDK Reference](http://www.sidefx.com/docs/hdk16.0/)


## Community

Palladio is maintained as an open-source project by Matthias Buehler (vrbn.io) and Simon Haegler (Esri R&D Zurich). Matthias is focusing on UX/UI topics and use-cases in Urban Planning, while Simon is focusing on the implementation and procedural modelling technology.
Expand All @@ -27,6 +31,7 @@ Our goal is to bring as many Houdini and CityEngine users and developers on boar

Our thanks also go to the fine folks at Esri R&D Zurich and VRBN which provided valuable comments and feedback.


## History

Palladio has been invented by Matthias Buehler and Simon Haegler in early 2015. It started out as a research project at Esri R&D Zurich to get to a tighter integration of CityEngine and Houdini than just via file-based import/export of assets. Early results were promising, so we slowly cooked the project to v1.0 in our spare time. In December 2017, we decided to open-source Palladio with an Apache 2.0 license.
Expand Down
2 changes: 1 addition & 1 deletion conan/cesdk/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class CESDKConan(ConanFile):
name = "cesdk"
version = "1.9.3786"
settings = "os", "compiler", "build_type", "arch"
settings = "os", "compiler", "arch"
description = "Develop 3D applications using the procedural geometry engine of Esri CityEngine."
url = "https://github.com/Esri/esri-cityengine-sdk"
license = "CityEngine EULA"
Expand Down
11 changes: 6 additions & 5 deletions conan/houdini/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
from conans import ConanFile
from conans import tools
import os

# this recipe creates a houdini conan package from a locally installed houdini
# usage: conan create houdini/16.0.XXX@sidefx/stable -s compiler=gcc -s compiler.version=4.8 -o houdini-flavor=apprentice
# usage: conan create houdini/X.Y.Z@sidefx/stable -s compiler=gcc -s compiler.version=4.8
# if houdini is not installed at the default location, try -e HOUDINI_INSTALL=<your installation path>

class HoudiniConan(ConanFile):
name = "houdini"
settings = "os", "compiler", "build_type", "arch"
options = { "houdini-flavor": ["apprentice", "indie", "core", "fx"] }
settings = "os", "compiler", "arch"
description = "Houdini is a 3D animation application software developed by Side Effects Software based in Toronto."
url = "https://www.sidefx.com/products/houdini-apprentice/"
url = "https://www.sidefx.com"
license = "SIDE EFFECTS SOFTWARE LICENSE AGREEMENT, https://www.sidefx.com/legal/license-agreement"

def build(self):
Expand All @@ -20,7 +21,7 @@ def package(self):
# TODO
pass
elif self.settings.os == "Linux":
local_install = "/opt/hfs{}".format(self.version)
local_install = os.getenv('HOUDINI_INSTALL') if 'HOUDINI_INSTALL' in os.environ else "/opt/hfs{}".format(self.version)
self.copy("*", ".", local_install, symlinks=True, excludes="python/*")
# the python exclude is a hacky workaround: houdini installs some files in the python subdir as only readable by root
elif self.settings.os == "Macos":
Expand Down
24 changes: 14 additions & 10 deletions doc/build.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
# Palladio

## Build Requirements
- [SideFX Houdini HDK 16](https://sidefx.com/download)
- [Esri CityEngine SDK 1.9](https://github.com/Esri/esri-cityengine-sdk)
- RHEL/CentOS 6/7 (or compatible) with GCC 4.8
- Installation of [Houdini 16.0](https://sidefx.com/download)
- [cmake 3.8 or later](https://cmake.org/download)
- [conan 1.0.1 or later](https://www.conan.io/downloads)

The bootstrap step below will take care of these additional dependencies:
- SideFX Houdini HDK 16
- [Esri CityEngine SDK 1.9](https://github.com/Esri/esri-cityengine-sdk)

## Build Instructions

### Bootstrap Dependencies
This section is only needed once (or if you want to upgrade one of the dependencies).
1. ```git clone git@github.com:esri/palladio.git && cd palladio```
1. Package CityEngine SDK: ```cd conan/cesdk && conan create cesdk/1.9.3786@esri-rd-zurich/stable -s compiler=gcc -s compiler.version=4.8```
1. Package Houdini (adjust XXX and YYY): ```cd conan/houdini && conan create houdini/16.0.XXX@sidefx/stable -s compiler=gcc -s compiler.version=4.8 -o houdini-flavor=YYY```
1. In ```src/conanfile.txt``` adjust ```houdini-flavor``` to your houdini (apprentice, indie, core, fx)
### Bootstrap
The below steps will populate your local Conan repository with dependencies for the Palladio build system. You only need to work through this section once (or if you want to upgrade one of the dependencies).
1. Checkout Palladio:```git clone git@github.com:esri/palladio.git && cd palladio```
1. Download (from github) and package CityEngine SDK: ```cd conan/cesdk && conan create . cesdk/1.9.3786@esri-rd-zurich/stable -s compiler=gcc -s compiler.version=4.8```
1. Extract and package the HDK from your local Houdini installation (adjust X.Y.Z): ```cd conan/houdini && conan create . houdini/X.Y.Z@sidefx/stable -s compiler=gcc -s compiler.version=4.8``` (Note: use the option ``-e HOUDINI_INSTALL=/path/to/your/hfsX.Y.Z``, if Houdini is not installed at the standard location, e.g. at ``/opt/hfsX.Y.Z`` for Linux).

### Building Palladio
1. ```mkdir -p build/release && cd build/release```
1. ```conan install ../../src```
1. ```cmake -DCMAKE_BUILD_TYPE=Release ../../src```
1. ```make install``` (the plugin is installed into your ~/houdiniXXX/dso directory)
1. ```make install``` (the plugin is installed into your ~/houdiniX.Y/dso directory)

Note: the `Debug` build type should also work out of the box. If you want to use the `RelWithDebInfo` build type you need to edit your `~/.conan/settings.yml` file and append `RelWithDebInfo` to the `build_type` array at the bottom.

### Running Palladio
See [Quick Start](usage.md) how to launch Houdini with Palladio.
Expand All @@ -29,3 +32,4 @@ See [Quick Start](usage.md) how to launch Houdini with Palladio.

- CITYENGINE_LOG_LEVEL: controls global (minimal) log level for all assign and generate nodes. valid values are "debug", "info", "warning", "error", "fatal"
- CITYENGINE_LICENSE_SERVER: specify how CityEngine license is acquired. an empty string specifies a node-locked license while "<port>@<host>" indicates a network license server, e.g. "27000@my.server.org".
- HOUDINI_DSO_ERROR: useful to debug loading issues, see http://www.sidefx.com/docs/houdini/ref/env
Binary file added doc/img/Palladio_icon_v1_32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions doc/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
```
export CITYENGINE_LICENSE_SERVER="27000@my.license.server"
```
1. Start Houdini in a bash console:
1. Start Houdini in a bash console (adapt to your Houdini installation location):
```
LD_LIBRARY_PATH=/opt/hfs16.0/dsolib /opt/hfs16.0/bin/houdini
LD_LIBRARY_PATH=pt/hfs16.0/dsolib /opt/hfs16.0/bin/houdini
```
(Use ``happrentice`` instead of ``houdini``, if you don't have a commercial license. You might want to create a ``start-houdini`` script or alias with this line.)
(Use ``happrentice`` or ``hindie`` instead of ``houdini``, depending on our license. You might want to create a ``start-houdini`` script or alias with this line.)
1. In a new scene, add a ``grid`` node.
1. Enter the ``grid`` node and add the two Palladio nodes ``pldAssign`` and ``pldGenerate``. Connect them like this: ![](img/extrude01.png)
1. In the ``pldAssign`` node, set the ``Rule Package`` parameter to the path of the previously exported RPK.
Expand Down
5 changes: 1 addition & 4 deletions src/conanfile.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
[requires]
cesdk/1.9.3786@esri-rd-zurich/stable
houdini/[>16.0.0,<16.5.0]@sidefx/stable
Catch/2.0.1@bincrafters/stable

[options]
houdini:houdini-flavor=apprentice
catch2/2.0.1@bincrafters/stable

[generators]
cmake
13 changes: 9 additions & 4 deletions src/dependencies.cmake
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
### trigger conan
### setup conan

include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup(TARGETS)
# TODO: use full conan integration, i.e. avoid the manual "conan install" step
if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake")
message(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan")
file(DOWNLOAD "https://raw.githubusercontent.com/conan-io/cmake-conan/v0.9/conan.cmake"
"${CMAKE_BINARY_DIR}/conan.cmake")
endif()

include(${CMAKE_BINARY_DIR}/conan.cmake)
conan_cmake_run(CONANFILE conanfile.txt BASIC_SETUP CMAKE_TARGETS BUILD missing)


### PRT dependency
Expand Down
2 changes: 1 addition & 1 deletion src/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ target_include_directories(${PROJECT_NAME} PRIVATE
target_link_libraries(${PROJECT_NAME} PRIVATE
palladio
palladio_codec
CONAN_PKG::Catch)
CONAN_PKG::catch2)

target_compile_definitions(${PROJECT_NAME} PRIVATE
-DHOUDINI_CODEC_PATH="$<TARGET_FILE:palladio_codec>"
Expand Down

0 comments on commit cabfb33

Please sign in to comment.