Batch Export Application Notes

  1. Format Recommendations
  2. Working with Expensive Assets
  3. Working with Large Models
  4. Memory Issues during Batch Export
  5. Known Interoperability Limitations and Issues

Note #1: Format Recommendations

Please note that some of the listed tools require additional plugins to be able to load all formats.

Tool Format Mandatory Options
ArcGIS Earth KML
Autodesk Max OBJ, FBX (for obj, enable import of smoothing groups in max)
Autodesk Maya FBX, ABC, OBJ (Maya cannot import Alembic materials out-of-the-box.)
Autodesk MotionBuilder OBJ, FBX
Blender OBJ, FBX, ABC - Multi-Texturing
Cinema 4D OBJ, DAE - Multi-Texturing
Deep Exploration OBJ, FBX, DAE
SideEffects Houdini Alembic
The Foundry Katana Alembic
Lightwave OBJ
Polytrans OBJ, FBX, DAE
e-on Vue VOB, OBJ

Note #2: Working with Expensive Assets

If you work with expensive (i.e., large) assets, it is of advantage to create simplified proxy assets and switch between them with a global LOD (Level of Detail) attribute. To avoid scattering the LOD attribute all over the rules, it is useful to put the conditions into separate "asset loader" rules:

attr LOD = 0
...
Shaft -->
    s(diameter,'1,diameter) center(xz) color(shaftC) ShaftAsset 
    
ShaftAsset -->
	    case LOD == 0: primitiveCube()
	    else: i("path/to/expensive/asset.obj")
...

Note #3: Working with Large Models

If you plan to create large models, it is of great advantage to implement global CGA attributes into your rule sets that allow to selectively block the generation of polygon-intensive model features. For example, one could replace some high-polygon greek columns with simple cuboids by using an attribute LOD, together with a corresponding condition in the CGA rules.

Application Example

Let's assume you want to render a large scene with Renderman and you have a CityEngine scene ready with a LOD switch. By exporting the scene with LOD = 0 to a single obj file (without any textures) and importing it, for example, into Maya, you are able to quickly setup the lights and camera without overburdening Maya with heavy geometry. Once the environment is ready you can go back to CityEngine and export the whole scene with LOD = 1 to RIB files and link them to the render setup.

Implementation Example

Below you find a modified version of the Parthenon temple shape grammar example. Note the usage of the LOD attribute:

attr LOD = 0

...

### Columns ###

# Edge columns have different intercolumn-distance (the famous exception...)
Columns --> 
    set(trim.vertical,false)
    split(x){ spacing+triglyphW*0.5-architraveD*0.5-0.05 : Column 
            | { ~spacing : Column }* 
            | spacing+triglyphW*0.5-architraveD*0.5-0.05 : Column }

# Greek Doric columns don't have a base
Column -->
    case LOD == 0:
        s(0,'1,0) Box
    else: 
        s(0,'1,0) split(y){ ~1 : Shaft | capitalH : Capital }

Box --> 
    s(diameter,'1,diameter) center(xz) color(shaftC) primitiveCube()

Shaft --> 
    s(diameter,'1,diameter) center(xz) color(shaftC) i(shaftAsset)

Capital --> 
    s(capitalW,'1,capitalW) center(xz) color(capitalC)
    split(y){ ~echinusPartsH : Echinus | ~abacusPartsH : Abacus }

Echinus --> i(echinusAsset)

Abacus --> i(abacusAsset)

... 

The temple with LOD = 0, ~80k polygons
temple LOD = 0

The temple with LOD = 1, ~290k polygons
temple LOD = 1

Note #4: Memory Issues during Batch Export

On 32bit systems, if you see low memory error messages during batch export, try to set the "File Size Limit" option to a lower value (eg. 200-300mb). A lower value will consume less memory when the geometry data is optimized for each exported file. With CityEngine 2013 and later, 32 bit systems are no more supported.

On 64bit systems, there is still enough address space to complete the export (although the system might start swapping memory, which will slow down the exporter).

Note #5: Known Interoperability Limitations and Issues

CityEngine Export Limitations

Esri FileGDB

Autodesk FBX

COLLADA

3rd Party Tool Import Limitations & Issues

Autodesk Maya

DeepExploration

3DSMax

Further Reading

Copyright ©2008-2016 Esri R&D Center Zurich. All rights reserved.