Coder Social home page Coder Social logo

esri / cityengine-sdk Goto Github PK

View Code? Open in Web Editor NEW
204.0 43.0 64.0 43.63 MB

CityEngine is a 3D city modeling software for urban design, visual effects, and VR/AR production. With its C++ SDK you can create plugins and standalone apps capable to execute CityEngine CGA procedural modeling rules.

Home Page: https://esri.github.io/cityengine/cityenginesdk

License: Apache License 2.0

cityengine 3d c-plus-plus sdk api geometry processing procedural modelling encoder

cityengine-sdk's Introduction

CityEngine SDK

This is the official site for the SDK of CityEngine, a 3D city modeling software for urban design, visual effects, and VR/AR production. Using the CityEngine SDK, a number of open source plugins and APIs have been built, allowing to integrate CityEngine technology into other tools.

The CityEngine SDK can be used for the development of:

  1. Custom importers and exporters for CityEngine.

    This means the SDK enables you to develop CityEngine plugins to read or write additional 3D and image formats or your own proprietary 3D data format. A simple use case example is 3D printing where the STL geometry format is often needed. STL support is not provided out-of-the-box in CityEngine, but you can develop your own STL exporter as described below.

  2. 3D apps which need a procedural geometry engine.

    The core of CityEngine is its unique geometry generation engine, called Procedural Runtime (PRT). PRT takes as input an initial geometry and then applies a given rule package (= CGA rules authored in CityEngine) to generate more detailed 3D geometry as output. For example, PRT can generate - based on given rules - a 3D model of a building out of a parcel polygon. With the SDK you can integrate PRT in your own 3D applications taking full advantage of the procedural geometry generation without running CityEngine. An interesting use case example is Palladio, a plugin for SideFX’s Houdini software. Palladio includes PRT and therefore extends Houdini with the procedural geometry engine of CityEngine. Another use case example could be a specific cultural heritage 3D application which automatically generates detailed 3D models of temples based on input attributes.

This document explains how to install the CityEngine SDK and how to work with the source-code examples contained in this repository. The CityEngine SDK is packaged into three parts:

  1. This git repository with the example sources.
  2. An archive per platform with the SDK binaries and offline documentation. The archives are attached to the releases.
  3. An archive with example data (e.g. rule packages and initial shapes), attached to the releases as well.

Quick Start

  1. Clone or download this repository.

  2. Download the example data and unpack it into a data directory next to examples inside the repo:

    /cityengine-sdk/
       data/...
       examples/...
    
  3. Continue with building and running the prt4cmd example for either Windows or Linux. This will automatically download the SDK archive for your platform.

Table of Contents

Downloads

You can manually download the SDK archive, the open-source examples in this repository and the example data from the Assets section on the Releases page.

Examples

This repository contains a number of source code examples in the examples directory. Each example contains a platform-specific README with detailed instructions how to build and use it:

  • prt4cmd: a simple command line utility to apply rule packages onto initial shapes and generate models.
  • stlenc: demonstrates how to write a custom encoder (exporter), in this case for the STL geometry format.
  • stldec: demonstrates how to write a custom decoder (importer) for the STL geometry format.

Documentation

Read the whitepaper and the architecture overview pdfs or browse the online reference. There is also an offline version in the downloaded sdk archive (/doc subdirectory).

Related Software Products

  • Overview
  • PyPRT: Python language bindings for the Procedural Runtime (PRT)
  • Palladio: CityEngine plugin for SideFX Houdini
  • Puma: CityEngine plugin for McNeel Rhino3d
  • Serlio: CityEngine plugin for Autodesk Maya
  • Vitruvio: CityEngine plugin for Epic Unreal Engine

General Software Requirements

Please note that the individual example READMEs may include further requirements.

All Platforms

  • To load custom encoders built with the latest SDK, CityEngine 2024.0 is required. For older versions of CityEngine an older version of the SDK might have to be used, see Release History. Some SDK versions don't have a matching CityEngine.
  • A license for the corresponding CityEngine version. For example, a license for CityEngine 2024.0 to author Rule Packages for the current SDK release.
  • CMake 3.19 or later (https://www.cmake.org)

Windows

  • Windows 10 or 11 (64bit)
  • Required C++ compiler: Visual Studio 2022 with Toolset MSVC 14.37 or later
  • Required flags for extension libraries release mode: /std:c++17 /bigobj /GR /EHsc /MD

Linux

  • RedHat Enterprise Linux 8.x or 9.x and compatible (e.g. Alma Linux or Rocky Linux)
  • Required C++ compiler: GCC 11.2 or later (RedHat Enterprise Linux DevToolSet 11)
  • Required flags for extension libraries: -std=c++17 -march=nocona -fvisibility=hidden -fvisibility-inlines-hidden -Wl,--exclude-libs,ALL

Release History and Changelog

A detailed list of changes to the API, CGA language and built-in codecs can be found in the Changelog.

CityEngine Resources

Issues and Contributions

Did you find a bug or do you want to request a new feature? Please let us know by submitting an issue. Anyone and everyone is welcome to contribute and to extend and improve the examples by sending us pull requests.

Licensing

The CityEngine SDK is free for personal, educational, and non-commercial use. Commercial use requires at least one commercial license of the latest CityEngine version installed in the organization. Redistribution or web service offerings are not allowed unless expressly permitted.

The CityEngine SDK is licensed under the Esri Terms of Use:

cityengine-sdk's People

Contributors

afrischknecht avatar andreasulmer avatar arisona avatar chr11115 avatar joalvarez avatar mama10 avatar matthias-specht avatar mistafunk avatar mlippesricom avatar sgoetschi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cityengine-sdk's Issues

Problem determining the "type" of a shape

Hello,

I am writing an encoder, and I want to find the type of shape I am exporting to organize them in collections when exporting a multiple selection.

Basically I want to put all lot-related shapes in a collection, and all the rest in another.
I have observed that the CityEngine editor, when growing a street network, automatically assigns a "shapeType" attribute to shapes, with values "Lot", "LotInner", "Street", "Sidewalk", "Junction", "Crossing".

So I tried to get the value for this attribute as follows:

void ProtoEncoder::encode( prtx::GenerateContext& context, size_t initialShapeIndex)
{
    prtx::InitialShape const* is = context.getInitialShape(initialShapeIndex);
    // grab the attribute map from which we will attempt to guess whether this shape belongs to the street network or to lots
    prt::AttributeMap const* isam = is->getAttributeMap();

    prt::Status st;
    prt::Attributable::PrimitiveType pt = isam->getType( L"shapeType");
    wchar_t const* shapeType = isam->getString( L"shapeType", &st);
    eShapeCategory shapeCategory;
    if( st == prt::STATUS_KEY_NOT_FOUND)
    {
        std::cerr << "'shapeType' attribute not found, shape category is unknown" << std::endl;
        shapeCategory = eSC_Unknown;
    }
    else if( wcsncmp( shapeType, L"Lot", 3) == 0)
    {
        shapeCategory = eSC_Lot;
    }
    else
    {
        shapeCategory = eSC_Street;
    }

but prt::Attributable::getType() returns PT_UNDEFINED, and prt::Attributable::getString() gives me a STATUS_KEY_NOT_FOUND status. However, the inspector window does list "shapeType" in the Object Attributes.

I tried to access the attribute directly from a shape obtained by one of the iterators as follows:

    prtx::InitialShapeIteratorPtr isi = prtx::InitialShapeIterator::create( context, initialShapeIndex);
    for (prtx::ShapePtr shape = isi->getNext(); shape.get() != 0; shape = isi->getNext()) // will only iterate over one shape
    {
        std::wstring const& shapeType = shape->getString( L"shapeType");
        eShapeCategory shapeCategory;
        if( shapeType.length() == 0)
        {
            std::cerr << "'shapeType' attribute not found, shape category is unknown" << std::endl;
            shapeCategory = eSC_Unknown;
        }
        else if( wcsncmp( shapeType.c_str(), L"Lot", 3) == 0)
        {
            shapeCategory = eSC_Lot;
        }
        else
        {
            shapeCategory = eSC_Street;
        }

But the call to shape->getString() throws an exception. (both when trying with "shapeType" and "Default$shapeType").

How can I separate the shapes if this doesn't work?

prt_stlenc.dll can't load in cityengine

hi,
I compiled the example of stlenc in SDK files, and get prt_stlenc.dll. I put it in the path of file "CityEngine2013\plugins\com.esri.prt.clients.ce.win32.win32.x86_64_1.0.0\lib". Then when I open cityengine2013, I get an error window" SWT_Window_null: cityengine.exe -- can not find the extrance" . " inpuet procedures wasn't located" " ?create@EncoderInfoBuilder@prtx@@...........in com.esri.prt.core.dll"

please help me !

Error generating mResolveMap with example Unity Plugin

Hi,

I've managed to compile the example unity plugin using VS2010 and Boost 1.53.0. I'm using CityEngine 2014.1, the esri_ce_sdk_1_2_1591_win32_vc10_rel_opt SDK, and Unity 4.5.2f1 Pro. The plugin loads fine, and the Custom Editor is also working just fine. In CityEngine I've shared the scifi_city.cga as scifi_city.rpk and placed it in my Assets folder.

When the rulepackage filename was specified Unity would crash. Debugging revealed that inside Context::setRulePackage (in Context.cpp) unpackPath was getting set to garbage by the mRulesFiles.clear() and SafeDestroy(mResolveMap) calls.

When mResolveMap = prt::createResolveMap(url.c_str(), unpackPath, &status) was called it would result in an unhandled exception.

cepluginbomb

In a followup attempt I commented out mRulesFiles.clear() and SafeDestroy(mResolveMap), rebuilt the plugin, and reattempted to run the plugin from Unity. When creating the resolve map the input arguments look correct but it fails with an unspecified error. I've also tried the candler.rpk with the same result.

cepluginsmallexplosion

I have a feeling it is close to working, but I'm at a loss of what to check for. Some guidance here would be be greatly appreciated.

Problem in debugging Encoder in Visual Studio 2019

Hi

I tried to generate STEP format file directly from the rpk files. I did two tests with examples in CityEngine SDK 2.6.8300. The first one was successful and the second was failed.

First test:
I compiled the prt4cmd and stlenc separately in release mode. After copy the new the STEP encoder to the prt4cmd's lib folder and modify the parameter to use the new encoder, prt4cmd can run successfully and generate correct STEP format file from the given rpk file.

Second test:
I compiled the prt4cmd and stlenc in Debug mode separately and repeat the First test step, prt4cmd cannot run. The exception was as following:
[2022-09-25 15:11:47] [error] prt::createEncoderInfo failed, exception caught: 'Encoder not found.'
[2022-09-25 15:11:47] [error] Status code = 20 = Encoder not found.

It seems that prt4cmd cannot find the STEP encoder correctly.

To compile the program in Debug mode, I modify the following CMakeList.txt as following:
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Choose one of: Debug Release RelWithDebInfo MinSizeRel")

In order to figure out the problem, I merged the two projects into one project. The stlenc was put into a sub directory inside prt4cmd. And use Visual Studio 2019 to debug. It failed at following line.
encoderInfoBuilder.setExtension(STL_EXT);

I am working on a pilot project to use CGA technology. I would like to know to how to debug the customized Encoder using Visual Studio 2019.

Thanks for the kind help.

Best regards
Aaron

Issue with PRT4CMD Parameter Limit

Hello CityEngine Team,
I hope this message finds you well. I am currently working on a frontend project that utilizes CityEngine and the PRT4CMD tool. While using PRT4CMD, I encountered an issue related to the parameter limit. The tool is indicating that I cannot pass more than 100 parameters at a time.
I have thoroughly reviewed my project requirements and have found that it's not feasible to further simplify or reduce the number of parameters. As a result, I'm facing challenges in effectively utilizing PRT4CMD for my project needs.
I'm reaching out to seek guidance and explore possible solutions to this limitation. I would greatly appreciate your assistance in addressing this matter. Are there any alternative approaches, workarounds, or advanced techniques that could help me overcome this parameter limitation?
I have looked into batch processing and scripting as suggested options, but I'm hoping for more specific guidance on how to implement these strategies effectively within the context of PRT4CMD.
Any insights, advice, or assistance you can provide would be invaluable in ensuring the success of my project. Thank you for your time and support.
Best regards,
[Mark]

built prt4cmd is not runnable on linux

Description

trying to run prt4cmd built on WSL ubuntu raises error ./install/bin/prt4cmd: error while loading shared libraries: libglutess.so: cannot open shared object file: No such file or directory

Reproduction

  1. clone repo on wsl ubuntu
  2. follow building instructions for prt4cmd
  3. run the file which was just built

Hotfix

patch the downloaded libcom.esri.prt.core.so file to let it read libglutess.so in same directory
can be done in cmake when downloading dependencies
edited cmake which patches libcom.esri.prt.core.so using patchelf

Suggested solution

Rebuild the hosted release of libcom.esri.prt.core.so to include runpath $ORIGIN

Using this ce_sdk in Win10_Unityx64

Hi mistafunk
I'm a user of city engine who want to generate building in Unity SDK. I can't export my model to fbx because my building model include too much area (I think this is the reason but not sure). I try to use your repo to import CityEngine SDK in my Unity but I have some problem.

  • My Visual studio is 2017 version (prt4unity required 2010), I re-target project and change platform tool-set to v141 (VS 2017 support)
  • My CityEngine and Unity is x64, I'm not sure but I think your repo created for x84 user isn't it? When I run deploy.cmd I found two directories in top-level of repo. that is "ProgramFiles(x86)\Unity\Editor" and "MyUnityProject\Asset\Plugins|Prt4Unity..." but all folder didn't have any file.

I'm not sure what is my mistake about this solution but I think I follow your Read me document, please recommended how can I fix this mistake.

Thank you in advance

have problem with function " prt::generate" for several models

there, I want to generate several models at the same time through function "prt::generate" in my prt4cmd example.

define generateOption with numberWorkerThreads = 4, cacheShapeTree = true;
prt::generate(InitialShapes , 8, 0 ,encoders, 3, encoderOpt, foc, cache, 0 , generationOption);

but the problem is , generating several models through calling prt::generate once does't save time.
It costs 12 seconds. Obviously too much time cost . What's the problem in prt::generate for several models generating.

How to complete shapefile to road Shape?

Hi,
I want to use the sdk to generate a road model. My raw data is a shapefile with the suffix ".shp". I know how to get the data in the shpfile, but I can't convert the lines in the shapefile into the required vertexCoords parameters. How is this process done, in which direction should I inquire, can you provide some cases in this regard, thank you very much!

How to call generate for each initial shape in parallel?

Dear experts, if the "numberWorkerThreads" can not generate initial shapes in parallel, then how to achieve it. Could you give me some tips on how to use the cityengine sdk to call generate for each initial shape in parallel ?
Looking forward to your reply.

License problem when running prt4cmd example

Hello.

I've followed the README instructions of the prt4cmd example. I'm able to run it, but i get an error message:

image

I have installed CityEngine 2014.1, and i'm able to work with. I've check the license:
image

I don't have any idea to solve my problem at this time. HELP ;)

PS: My CityEngine SDK is in 32bits. But my CityEngine installation is in 64bits. can it be a problem?

Shape OID?

Hi,

When debugging an encoder, it would be useful to have access to the shape's OID, as displayed in CE's Inspector's shape Information tab. I've pored over the various APIs, but the best I've found is InitialShape::getName (but the doc says it isn't a unique name), or Shape::getID (but it returns only a uint32_t). How can I retrieve (and possibly export as well) the OID?
And as a side note, given some OID, how can I locate in inside CityEngine?

Problem with license

Hello, just tried to install the sdk in my pc. I have managed to install everything , however it crashes in the license. I have an advaneced licence provided by ucl, but the system seems to crash once i use CityEngAdv. It works only with CityEngAdvFX, however it results in the following error:
[2014-Jan-13 15:55:08.893139] [warning] failed to load or register extensions from 'C:\Program Files\Esri\esri-cityengine-sdk-win64\examples\prt4cmd\install\lib\VueExport.dll' due to exception: error while loading function 'registerExtensionFactories': The specified procedure could not be found.

and later....

[2014-Jan-13 15:55:09.153200] [info] com.esri.prt.core.RawTextureDecoder (1.0) Reads raw (uncompressed) images into textures.
[2014-Jan-13 15:55:09.212240] [error] FileSystemAdaptor::createStream() : unable to handle URI = 'bin/rule.cgb'
[2014-Jan-13 15:55:09.215241] [error] FileSystemAdaptor::createStream() : unable to handle URI = 'bin/rule.cgb'
[2014-Jan-13 15:55:09.219244] [error] FileSystemAdaptor::createStream() : unable to handle URI = 'bin/rule.cgb'

Error when debug esri-cityengine-sdk

Hello,
I've installed the esri-cityengine-sdk-1.0.1209-win64, everything works fine until when i execute with the following line:

prt4cmd -l 1

and I get this:

My CityEngine 2013 is trial version and I have a trial license.
Help me, what i'm doing wrong.

Error while running the SDK with Unity

Hello.

I am trying to run the SDK for UNITY. IT seems to be working perfectly when in editing mode (scene) , but it crashes and shuts down completely once I run it, during the reinitialization process.

CityEngine license requirement in future

Will the requirement of a CityEngine license be relaxed in future so that plugins can run/read City Engine (not create) without being dependent on the CityEngine license ?

I am considering the possibility of developing new procedural code for renderer such as Arnold and Mantra but requiring end users to own a CityEngine license to read the files would limit the usage and hence the viability of the product.

I have already fork the code and ready to have a look but the CityEngine license requirement is an obstacle for me as a developer.

Cheers

Unity Plugin, unity3d 4.3.4

Hi Matthias,
sorry to ask about this one year later, I'm also trying this example. thanks to your answer I succeed on building solution (Configuration: Release) as shown in picture, but "prt4unity" can't be debug as picture2. I ran deploy.cmd, but the two new directories are empty.
uc 20161011160318
uc 20161011160203

i cannot complete and i think i might fail on build solution or installation step1. Could you mind giving me some advice?
Thanks for your work,
CHEN

Compiling on OSX for Maya 2014

Has any one gotten this to work successfully? I keep getting:

Could not find a package configuration file provided by "prt4maya_codec"
with any of the following names:

prt4maya_codecConfig.cmake
prt4maya_codec-config.cmake

It seems like it can't compile the encoder properly. Not sure if it's me or not...

Unity: Unable to locate com.esri.prt.examples.UnityEncoder

I compiled everything fine on Windows and installed the dlls in the Unity (4.6) application folder. Now when I start Unity and also when I press the Generate-button on the Prt4Unity-script I get the following error popup:

Unable to locate com.esri.prt.examples.UnityEncoder

In the Unity console the following errors appear:

[2015-Jun-16 12:06:03.690683] [error] prt::createEncoderInfo failed, exception caught: 'Encoder not found.'
UnityEngine.Debug:LogError(Object)
Prt4Unity:LogMessage(String, Int32) (at Assets/Prt4Unity/Scripts/Prt4Unity.cs:547)
Prt4Unity:CreateContext()
Context:.ctor() (at Assets/Prt4Unity/Scripts/Prt4Unity.cs:148)
Prt4Unity:.ctor() (at Assets/Prt4Unity/Scripts/Prt4Unity.cs:449)
UnityEditor.HostView:OnGUI()

[2015-Jun-16 12:06:03.712684] [error] Status code = 18 = Encoder not found.
UnityEngine.Debug:LogError(Object)
Prt4Unity:LogMessage(String, Int32) (at Assets/Prt4Unity/Scripts/Prt4Unity.cs:547)
Prt4Unity:CreateContext()
Context:.ctor() (at Assets/Prt4Unity/Scripts/Prt4Unity.cs:148)
Prt4Unity:.ctor() (at Assets/Prt4Unity/Scripts/Prt4Unity.cs:449)
UnityEditor.HostView:OnGUI()

Issue with building unity pluging

Hello,

I am trying to build the example unity plugin in visual studio 2010 sp1. However, it seems that the header files cannot be found or opened. I am using CityEngine 2014.0. I would appreciate if someone let me know how I can resolve this.

Thanks,
Kai

capture

prt4cmd crash - prt::createResolveMap failed

Hello there, I build the prt4cmd example using the build instructions there. However, when I run it, it complains that it cannont create the reslove map:

prt::createResolveMap failed, exception caught: 'error while reading 7zip archive: file not found'

I did even copy the data files just besides the compiled exe. The SDK package I've downloaded is esri_ce_sdk-1.8.3501-win7-vc14-x86-rel-opt, source code is also from the package there. Running on Windows 10 64bit.

The full log of the program is below:

C:\Users\OICW\Downloads\Examples\City Engine SDK\esri-cityengine-sdk-1.8.3501\examples\prt4cmd\install\bin>prt4cmd -f CityEngAdvFx -l 1 -g candler_footprint.obj -p candler.rpk -a ruleFile:string=bin/candler.cgb -a startRule:string=Default$Footprint -e com.esri.prt.codecs.OBJEncoder -z baseName:string=theCandler
[2017-07-04 16:39:19] [info] Esri Procedural Runtime
[2017-07-04 16:39:19] [info] Version: 1.8.3501 | Build Date: Fri 06/09/2017 05:46 PM | Build Config: PRT_BC_REL PRT_CC_OPT PRT_TC_VC14 | OS: win32 | ARCH: x86
[2017-07-04 16:39:19] [debug] looking for loader library at path C:\Users\OICW\Downloads\Examples\City Engine SDK\esri-cityengine-sdk-1.8.3501\examples\prt4cmd\install\bin
[2017-07-04 16:39:19] [debug] library 'C:\Users\OICW\Downloads\Examples\City Engine SDK\esri-cityengine-sdk-1.8.3501\examples\prt4cmd\install\lib\Alembic.dll' is not a compatible extension (reason: 'error while loading function 'getVersionMajor': The specified procedure could not be found.
')
[2017-07-04 16:39:19] [debug] library 'C:\Users\OICW\Downloads\Examples\City Engine SDK\esri-cityengine-sdk-1.8.3501\examples\prt4cmd\install\lib\VueExport.dll' is not a compatible extension (reason: 'error while loading function 'getVersionMajor': The specified procedure could not be found.
')
[2017-07-04 16:39:19] [info] Available Extensions:
[2017-07-04 16:39:19] [info]     com.esri.prt.adaptors.FileSystemAdaptor       (1.0) Resolves URIs on the file system.
[2017-07-04 16:39:19] [info]     com.esri.prt.adaptors.SevenZipAdaptor         (2.0) Resolves URIs inside 7ZIP archives.
[2017-07-04 16:39:19] [info]     com.esri.prt.adaptors.ZipFileAdaptor          (1.0) Resolves URIs inside ZIP archives.
[2017-07-04 16:39:19] [info]     com.esri.prt.codecs.ACE2Decoder               (1.0) Reads ACE2 images into textures
[2017-07-04 16:39:19] [info]     com.esri.prt.codecs.ASCDecoder                (1.0) Reads Arc/Info ASCII Grid images into textures
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.AlembicEncoder            (1.0) Encodes geometry into the alembic format.
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.BINDecoder                (1.0) Reads NOAA NGS Geoid Height Grids images into textures
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.BMPDecoder                (1.0) Reads MS Windows Device Independent Bitmap images into textures
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.BTDecoder                 (1.0) Reads VTP .bt (Binary Terrain) 1.3 Format images into textures
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.ColladaDecoder            (1.0) Decodes geometry in COLLADA DAE format.
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.ColladaEncoder            (1.0) Encodes geometry into the Khronos COLLADA format.
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.DATDecoder                (1.0) Reads ZMap Plus Grid images into textures
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.DDFDecoder                (1.0) Reads SDTS Raster images into textures
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.DEMDecoder                (1.0) Reads USGS Optional ASCII DEM (and CDED) images into textures
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.E00Decoder                (1.0) Reads Arc/Info Export E00 GRID images into textures
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.FBXDecoder                (1.0) Decodes geometry in the Autodesk Filmbox (FBX) format.
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.FBXEncoder                (1.0) Encodes geometry into the Autodesk Filmbox (FBX) format.
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.GENDecoder                (1.0) Reads ARC Digitized Raster Graphics images into textures
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.GFFDecoder                (1.0) Reads Ground-based SAR Applications Testbed File Format (.gff) images into textures
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.GIFDecoder                (1.0) Reads Graphics Interchange Format (.gif) images into textures
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.GRBDecoder                (1.0) Reads GRIdded Binary (.grb) images into textures
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.GRCDecoder                (1.0) Reads Northwood Classified Grid Format .grc/.tab images into textures
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.GRDDecoder                (1.0) Reads Golden Software ASCII Grid (.grd) images into textures
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.GSBDecoder                (1.0) Reads NTv2 Datum Grid Shift images into textures
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.GTXDecoder                (1.0) Reads NOAA Vertical Datum .GTX images into textures
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.HDRDecoder                (1.0) Reads Snow Data Assimilation System images into textures
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.HF2Decoder                (1.0) Reads HF2/HFZ heightfield raster images into textures
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.HGTDecoder                (1.0) Reads SRTMHGT File Format images into textures
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.I3SEncoder                (1.0) Creates Scene Layer Packages that can be shared on ArcGIS Online/Portal.
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.IMGDecoder                (1.0) Reads Erdas Imagine Images (.img) images into textures
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.JPGDecoder                (1.0) Reads JPEG JFIF images into textures
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.JPGEncoder                (1.0) Encodes images and textures into the JPEG format.
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.LCPDecoder                (1.0) Reads FARSITE v.4 Landscape File (.lcp) images into textures
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.MEMDecoder                (1.0) Reads Japanese DEM (.mem) images into textures
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.MPRDecoder                (1.0) Reads ILWIS Raster Map images into textures
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.MTLDecoder                (1.0) Reads materials in Wavefront MTL format.
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.MTLEncoder                (1.0) Converts materials into Wavefront MTL format.
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.N1Decoder                 (1.0) Reads Envisat Image Format images into textures
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.NTFDecoder                (1.0) Reads National Imagery Transmission Format images into textures
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.OBJDecoder                (1.0) Decodes geometry from the Wavefront OBJ format.
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.OBJEncoder                (1.0) Encodes geometry into the Wavefront OBJ format.
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.PIXDecoder                (1.0) Reads PCIDSK Database File images into textures
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.PNGDecoder                (1.0) Reads Portable Network Graphics images into textures
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.PNGEncoder                (1.0) Encodes images and textures into the PNG format.
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.PNMDecoder                (1.0) Reads Portable Pixmap Format (netpbm) images into textures
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.RAWEncoder                (1.0) Stores the uncompressed image as data blob.
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.RDADecoder                (1.0) Reads R Object Data Store images into textures
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.RSTDecoder                (1.0) Reads Idrisi Raster A.1 images into textures
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.RSWDecoder                (1.0) Reads Raster Matrix Format images into textures
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.RenderManEncoder          (1.0) Encodes geometry to Pixar RenderMan.
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.SDATDecoder               (1.0) Reads SAGA GIS Binary Grid (.sdat) images into textures
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.ShapeBufferDecoder        (1.0) Reads Esri shape buffer geometry (only extended MultiPatch buffer).
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.ShapeBufferEncoder        (1.0) Encodes geometry into the esri shape buffer format (revision 2012-02-17).
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.TIFDecoder                (1.0) Reads GeoTIFF images into textures
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.TIFFEncoder               (1.0) Encodes images and textures into the TIFF format.
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.VOBEncoder                (1.0) Encodes geometry into the E-On Software Vue VOB format.
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.VRTDecoder                (1.0) Reads Virtual Raster images into textures
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.WebSceneEncoder           (1.0) Exports a scene into the Esri WebScene format.
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.WebSceneObjectEncoder     (1.0) Encodes geometry into Esri WebScene Objects.
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.XPMDecoder                (1.0) Reads X11 PixMap Format images into textures
[2017-07-04 16:39:20] [info]     com.esri.prt.codecs.XYZDecoder                (1.0) Reads ASCII Gridded XYZ images into textures
[2017-07-04 16:39:20] [info]     com.esri.prt.core.AttributeEvalEncoder        (1.0) Sets the values of (evaluated) shape attributes.
[2017-07-04 16:39:20] [info]     com.esri.prt.core.CGAErrorEncoder             (1.0) Handles errors encountered during CGA execution.
[2017-07-04 16:39:20] [info]     com.esri.prt.core.CGAPrintEncoder             (1.0) Handles the output of the CGA print statement.
[2017-07-04 16:39:20] [info]     com.esri.prt.core.CGAReportEncoder            (1.0) Handles report output generated by CGA.
[2017-07-04 16:39:20] [info]     com.esri.prt.core.CGBDecoder                  (1.0) CGB Byte Stream Reader
[2017-07-04 16:39:20] [info]     com.esri.prt.core.MemoryAdaptor               (1.0) Reads data in memory into a stream for decoding.
[2017-07-04 16:39:20] [info]     com.esri.prt.core.OcclusionEncoder            (1.0) Encodes a shape tree into the OcclusionSet for inter-occlusion.
[2017-07-04 16:39:20] [info]     com.esri.prt.core.RawTextureDecoder           (1.0) Reads raw (uncompressed) images into textures.
[2017-07-04 16:39:20] [info] Using rule package candler.rpk

[2017-07-04 16:39:20] [error] prt::createResolveMap failed, exception caught: 'error while reading 7zip archive: file not found'
[2017-07-04 16:39:20] [error] getting resolve map from 'candler.rpk' failed, aborting.

Dose the SDK support creating 3d street models from street lines?

Dear experts, dose the cityengine SDK support creating 3d street models by importing city vector street lines? (i.e."road.shp").
I know that when we import city road lines into the cityengine software scene,it will create road polygons automatily.Does the cityengine SDK have the same ability?
Looking forward to your reply.

Trying to build prt4cmd with a hand-made Visual Studio project

Hello,

I have put together my own Visual Studio solution and project to build prt4cmd.
I have copied every useful DLL in the same path as the executable I have built: com.esri.prt.adaptors.dll, com.esri.prt.codecs.dll, com.esri.prt.core.dll, com.esri.prt.loader.dll, flexnet_prt.dll and VueExport.dll.

Then I have tweaked the sample code so that the search paths match this file layout (inputArgs.mWorkDir and fsFlexLib).

But when I run the sample with arguments -f CityEngAdvFx it aborts when executing the following line, although cExtPath is correct.

    // -- initialize PRT with the path to its extension libraries, the desired log level and the licensing data
    prt::init(&cExtPath, 1, (prt::LogLevel)inputArgs.mLogLevel, &flp);

I get a popup saying

``

Microsoft Visual C++ Runtime Library

Runtime Error!

Program: C:\Boulot...\ESRI_SDK_Test\output\prt4cmd.exe

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.


OK

``

The log only contains

[2014-Apr-28 10:13:24.005776] [info] ESRI Procedural Runtime
[2014-Apr-28 10:13:24.011777] [info] Version: 1.0.1209 | Build Date: Tue 01/14/2014 06:55 PM | Build Config: PRT_BC_REL PRT_CC_OPT PRT_TC_VC10 | OS: win32

Is this because of some hardcoded search path in the prt runtime?
.

Difficulties debugging an encoder

Hello,

To debug our encoder we compile it, deploy it in the CityEngine installation directory at the appropriate location, then run CityEngine. Then we attach to the process with the debugger, and we can debug the encoder.

The issue is that once the debugger is attached, it detects recurring exceptions generated by CityEngine even when we haven't exported anything yet (writes to invalid memory locations and the like). These seem otherwise more or less harmless since they don't cause the process to crash when we resume execution and Cityengine doesn't terminate when running detached. However, a true bug in our encoder will cause the CityEngine process to terminate if the debugger is not attached.

The problem is that those recurring exceptions make debugging the encoder difficult because when the debugger raises them we always have to tell it to continue execution manually, which can be quite lengthy if we export lots of elements.

Is there a means to tell the debugger qui keep quiet about those exceptions raised inside CityEngine and to only concentrate on what happens in our encoder DLL? Or even better, to tell CityEngine to stop raising them?

failed to load or register extensions

hello,
The installation worked, I do have problems when running the 'prt4cmd' example.
Error occares When Running at "prt::init(&cExtPath,1 ,(prt::LogLevel)inputArgs.mLogLevel,&flp);"

Here are the part of logs:
[
2014-Feb-13 16:47:54.911196] [info] Version: 1.0.1209 | Build Date: Tue 01/14/2014 06:55 PM | Build Config: PRT_BC_REL PRT_CC_OPT PRT_TC_VC10 | OS: win32
[2014-Feb-13 16:47:55.238797] [warning] failed to load or register an extension from E:\Software\Graphic\esri-cityengine-sdk-win64\examples\prt4cmd\src\lib\com.esri.prt.adaptors.lib, ignoring.
[2014-Feb-13 16:47:55.269997] [warning] failed to load or register an extension from E:\Software\Graphic\esri-cityengine-sdk-win64\examples\prt4cmd\src\lib\com.esri.prt.codecs.lib, ignoring.
[2014-Feb-13 16:47:55.285597] [warning] failed to load or register extensions from 'E:\Software\Graphic\esri-cityengine-sdk-win64\examples\prt4cmd\src\lib\VueExport.dll' due to exception: error while loading function 'registerExtensionFactories': 找不到指定的程序。

[2014-Feb-13 16:47:55.815998] [error] FileSystemAdaptor::createStream() : unable to handle URI = 'bin/rule.cgb'
[2014-Feb-13 16:47:55.815998] [error] FileSystemAdaptor::createStream() : unable to handle URI = 'bin/rule.cgb'
[2014-Feb-13 16:47:55.831598] [error] FileSystemAdaptor::createStream() : unable to handle URI = 'bin/rule.cgb'

`prt4cmd.exe` fails to load `com.esri.prt.unreal.dll`

Hello,

While following the README_windows, for the command:

C:\cityengine-sdk\examples\prt4cmd\install>bin\prt4cmd.exe -l 3 -g ..\..\..\data\candler_footprint.obj -p ..\..\..\data\candler.rpk -a ruleFile:string=bin/candler.cgb -a startRule:string=Default$Footprint -e com.esri.prt.codecs.OBJEncoder -z baseName:string=theCandler

the following error occured :

[2022-11-10 13:51:11] [error] failed to load library: error while loading library 'C:\cityengine-sdk\examples\prt4cmd\install\lib\com.esri.prt.unreal.dll': The specified module could not be found.
[2022-11-10 13:51:11] [warning] Failed to load library 'C:\cityengine-sdk\examples\prt4cmd\install\lib\com.esri.prt.unreal.dll' as extension for PRT core at 'C:\cityengine-sdk\examples\prt4cmd\install\bin\com.esri.prt.core.dll'
[2022-11-10 13:51:11] [warning] CGB file contains warning 'Potentially problematic CGAC version 1.6 : recompiling with current CGA Compiler (1.19) is recommended.'

Removing com.esri.prt.unreal.dll in examples\prt4cmd\install\lib fixed the error. Note that I don't have Unreal Engine installed on my machine.

Thanks,
Olivier

Detailed debugging instructions

Hello there,
I'm interested in creating a custom exporter for CE2018 and was wondering if there#s more information on how to achieve step-by-step debugging using Visual Studio or an equivalent.

I'm able to compile it using the proposed cmake & nmake steps. I also am able to compile and run the encoder with DCMAKE-BUILD_TYPE=RelWithDebInfo. Running with DCMAKE_BUILD_TYPE=Debug compiles but CityEngine does not recognize the exporter.

Thanks in advance!

Libraries for other platform ?

CityEngine is cross platform on Linux and OSX in addition to Windows.

Currently, I could only find Windows *.lib and *.dll

What is the ETA for the other platforms ?

Cheers

can't Load the Encoder dll

Hi ,
I have compiled a prt_stlenc dll without changing the example codes. When I run cityengine2014,I can't find STL format in "Export models" window. To solve this problem, So I add prt::log in codes, and compile. This time ,I Get an error in log window which said "file extension must begin with a '.' " in the sentence "encodeInfoBuilder.setExtension(STL_EXT);" . But STL_EXT is defined as wstring ".stl" indeed . I'm comfused with this error cue. What's the problem in my code?

not work

According to the tutorial I do, but did not generate a plug-in with VS2010,i just not understand the tutorial depth.

prt::log() doesn't appear in CE's Log window

Hi,

I've added some logging in my encoder using the prt::log() API, but nothing appears in CE's log window during export besides
Info Wed Jun 25 15:26:04 CEST 2014 The batch export was successfully finalized. - [main]

What is the correct way of logging so that my log appears there as expected?

Problems trying prt4cmd under Windows 7

Hi,

I have installed boost and cmake as required. After fiddling with environment variables so that cmake can find boost (which find_package doesn't seem to be able to do successfully). I can generate the makefiles as per the README.md instructions.
But then when I attempt to build the sample from within a Visual Studio 11 command prompt I get:

Linking CXX executable prt4cmd.exe
com.esri.prt.core.lib(com.esri.prt.core.dll) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'
LINK failed. with 1112

Another attempt to generate Visual Studio solutions from cmake-gui and specifying a x64 target type is then successful. However, the generated prt4cmd bails out when executing

prt::init(&cExtPath, 1, (prt::LogLevel)inputArgs.mLogLevel, &flp);

Is it due to the fact I have only the 30 days evaluation license coming with CityEngine?

FileSystemAdaptor unable to handle URI

Hi
I've installed the esri-cityengine-sdk-1.0.1209-win64, everything works fine until when i run the prt4cmd.exe. I execute with the following line:

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

and i get this:

[24-Mar-24 12:09:31.959561] [error] FileSystemAdaptor::createStream() : unable to handle URI = 'bin/candler.01.cgb'
[24-Mar-24 12:09:31.966562] [error] FileSystemAdaptor::createStream() : unable to handle URI = 'bin/candler.01.cgb'
[24-Mar-24 12:09:31.973562] [error] FileSystemAdaptor::createStream() : unable to handle URI = 'bin/candler.01.cgb'

But before, when I do the cmake , I obtain a warning like this:

Did I have to ignore that warning? because I did :(
Help me, what i'm doing wrong.

regards

Running into a problem when building prt4cmd, and getting Segmentation Fault when running

I am on OSX, and I am trying to build/run the example project (prt4cmd).
I am able to generate the make files without a problem. However, when I try to build the sample, the first time, I run into an error. However if I try "make install" again, it builds the project without a problem.
Then I tried to run the project by calling bin/prt4cmd, but I am running into a Segmentation fault: 11.
I have tried to provide it various arguments (according to the README), but all of them came back with the same error.
I have attached a screen shot.
screen shot 2014-03-28 at 3 04 02 pm

createValidatedOptionsAndStates crashes when setting "layerName" in AttributableMap for encoder options

Hey

So I'm trying to export a CityEngineWebscene using the com.esri.prt.codecs.WebSceneEncoder.
I'm using Procedural Runtime Version 1.3.1969.

I'm trying to add the layerName encoder option using an prt::AttributeMapBuilder.
Program compiles perfectly fine but it crashes without an error message when it calls createValidatedOptionsAndStates from prt::EncoderInfo.

When I remove the layerName encoder option the program works fine and generates the .3ws, but of course the layer names are blank and thus the webscene does not load in the CityEngine Webscene Viewer.

Is this a bug in the prt::EncoderInfo or I am missing something here?
My code works perfectly fine using the layerName encoder option with the Procedural Runtime Version 1.1.1471 and Version 1.3.1888. Only the latest Version 1.3.1969 causes problems.
Has anything changed since then regarding the .3ws WebsceneEncoder?

Thank you very much for your help.

Best,
Sandro

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.