|
POST
|
Hello L R The CityEnginge FBX exporter does not support writing attributes. For exporting high quality models and attributes, the CityEngine Alembic ABC Export can be used. If you need to use FBX, there are two options: Export the models as FBX and the shapes with attributes to a SHP file. Export the models as FBX and use the python export to write a text file (e.g. CSV) with the relevant attributes: Tutorial 12: Scripted report export—CityEngine Tutorials | ArcGIS Desktop Later the two exports need to be combined via a unique identifier.
... View more
04-27-2018
02:56 AM
|
0
|
7
|
3324
|
|
POST
|
Thank you for reporting the issue. The CityEngine team has fixed it in the upcoming 2018.0 release. As a workaround for 2017.1, add this line to the CityEngine.ini file: -DsnapshotFsaaLevel=0 On Windows, the file is located in the installation root folder. typically: "C:\Program Files\Esri\CityEngine2017.1\CityEngine.ini" On MacOS it located is inside the application package. First you need to open the application bundle: Applications > CityEnigine > Show package contents Second you browse to the file: Contents > MacOS > CityEngine.ini
... View more
04-25-2018
09:57 AM
|
2
|
0
|
1479
|
|
POST
|
Hi Dulini Ratnayake CE 2017.1 support was just shipped in LumenRT Update 5 (April 15). There is another update scheduled for June (LumenRT Update 6). Support for CE 2018.0 will be added to that release. Thomas F
... View more
04-24-2018
12:49 AM
|
0
|
1
|
1072
|
|
POST
|
Hi Karl The restarting of CityEngine is actually the expected behavior, since workspaces cannot be changed on the fly. After restart the newly defined workspace is used.
... View more
04-23-2018
07:17 AM
|
0
|
0
|
1907
|
|
POST
|
Hi Flo Please follow this steps: Select the terrain in the Scene Editor File > Export Models... > FBX Apply the settings as shown below:
... View more
04-23-2018
07:09 AM
|
0
|
0
|
578
|
|
POST
|
Hi Nate, Thank you for this question. The CGA street rules work on CityEngine dynamic shapes and their attributes. By changing the underlying graph properties, the shapes are automatically regenerated. Here is a Python script to accomplish this task: '''
Created on Apr 23, 2018
@author: ESRI R&D Center Zurich
'''
from scripting import *
# get a CityEngine instance
ce = CE()
def findDeadEnds(nodes):
deadEnds = []
for node in nodes:
if ce.getAttribute(node,'valency') == 1.0:
deadEnds.append(node)
return deadEnds
if __name__ == '__main__':
# get selected nodes
nodes = ce.getObjectsFrom(ce.selection(), ce.isGraphNode)
# get all dead end nodes
deadEnds = findDeadEnds(nodes)
# set all dead ends to 'Roundabout'
ce.setAttribute(deadEnds, '/ce/crossing/type', 'Roundabout')
ce.setAttributeSource(deadEnds, '/ce/crossing/type', 'USER')
pass
... View more
04-23-2018
06:59 AM
|
0
|
0
|
580
|
|
POST
|
Esri provides various raster base map services (including high res imagery) and a world elevation service. They can be used within CityEngine to create a terrain layer from scratch without preparing any data.
... View more
04-23-2018
06:11 AM
|
0
|
0
|
1230
|
|
POST
|
CityEngine 2017.0 does not support export of separate .MAT files. The material information is embedded into the *.FBX file. However it is possible to generate it within Autodesk 3D Studio Max. Please have a look into this Autodesk forum thread: How to save a material as a .MAT file. - Autodesk Community
... View more
04-10-2018
05:34 AM
|
0
|
1
|
1742
|
|
POST
|
Hi Kenneth, thank you for your question. Below is a small example how to use two object attributes to set a layer attribute: attr StreetType = getObjectAttr("type",false)
attr bikeLanes =
case getObjectAttr("bikeLanes",false) > 0 : rint(getObjectAttr("bikeLanes",false))
else : 0
attr streetWidth =
case StreetType == "MAJOR" : 24 + 1.5*bikeLanes
case StreetType == "MINOR" : 13 + 1.5*bikeLanes
case StreetType == "LOCAL" : 5.7 + 1.5*bikeLanes
else : 10 Further information and examples can be found in the CityEngine Help Mapping Object Attributes via Layer Attribute
... View more
04-10-2018
03:16 AM
|
1
|
1
|
693
|
|
POST
|
There is an issue with reporting NaN values to FileGDB. As a workaround, please add a value validation to you CGA code. validate(value) =
case isnan(value): -1
else: value
report("FAR",validate(FAR))
... View more
04-09-2018
04:20 AM
|
0
|
0
|
1576
|
|
POST
|
Code snippets published on Esri GeoNet protected by any license, need to respect the associated usage rights. They must be marked accordingly by the publisher. Any license violations need to be reported to the forum administrator. Generally, CityEngine CGA and Python snippets published by Esri employees, are meant to support our customers in achieving their goals in accordance with the product's software license. For further information please visit Esri Legal Information | Overview In your case distribution of GeoNet snippets under the Apache 2.0 license in a folder called "Esri Scripts" is appropriate.
... View more
04-06-2018
02:23 AM
|
1
|
1
|
2164
|
|
POST
|
Hi Luiz Thank you for your input. I changed the script in my post above to add export support for 360 panoramas from CityEngine View Domes. For View Domes it now creates six 90° x 90° square snapshots (back, down, front, left, right, up). These can be stitched and re-projected from cubemap to equirectangular format with common VR/panorama tools. Here is a link to a free online tool: 360Toolkit - Convert and View Panorama Pictures Instantly
... View more
04-04-2018
07:20 AM
|
4
|
2
|
2164
|
|
POST
|
Hi Abhishek, I reworked the slope rule in my initial reply. This should now work in your case.
... View more
01-29-2018
10:36 AM
|
0
|
0
|
3132
|
|
POST
|
Hello Diego If you cannot see the rectangle after setting the extend, please try to zoom out.
... View more
01-29-2018
10:04 AM
|
0
|
0
|
1139
|
|
POST
|
Thank you for this question. With a custom Python script, there is a way to accomplish this task. Copy the attached script into your workspace, and add it to the scrips menu: '''
Created on Oct 31, 2017
Modified on Apr 4, 2018
@author: Esri R&D Zurich
'''
from scripting import *
import math
# get a CityEngine instance
ce = CE()
hRes = 1080
def getCamera(view):
camPos = view.getCameraPosition()
camRot = view.getCameraRotation()
camAoV = view.getCameraAngleOfView()
camPoI = view.getCameraPoI()
camPoIDist = math.sqrt(math.pow(camPoI[0]-camPos[0],2)+ \
math.pow(camPoI[1]-camPos[1],2)+ \
math.pow(camPoI[2]-camPos[2],2))
camPersp = view.getCameraPerspective()
return camPos,camRot,camAoV,camPoIDist,camPersp
def setCamera(view,camPos,camRot,camAoV,camPoIDist,camPersp = True):
view.setCameraPosition(camPos[0],camPos[1],camPos[2])
view.setCameraRotation(camRot[0],camRot[1],camRot[2])
view.setPoIDistance(camPoIDist)
view.setCameraAngleOfView(min(160.0,camAoV))
view.setCameraPerspective(camPersp)
def getViewshed(viewshed):
vsPos = ce.getObserverPoint(viewshed)
vsRot = [0.0, 0.0, 0.0]
if ce.isViewshed(viewshed):
vsRot[0] = ce.getTiltAndHeadingAngles(viewshed)[0]
vsRot[1] = -ce.getTiltAndHeadingAngles(viewshed)[1]
vsAoV = ce.getAnglesOfView(viewshed)[0]
vsPoIDist = ce.getViewDistance(viewshed)
vsRatio = vsAoV/ce.getAnglesOfView(viewshed)[1]
elif ce.isViewDome(viewshed):
vsAoV = 360.0
vsPoIDist = ce.getViewDistance(viewshed)
vsRatio = 1
elif ce.isViewCorridor(viewshed):
vsPoI = ce.getPOI(viewshed)
vsRot[0] = math.atan2(vsPoI[1]-vsPos[1], \
math.sqrt(math.pow(vsPoI[0]-vsPos[0],2)+ \
math.pow(vsPoI[2]-vsPos[2],2)))*180/math.pi
vsRot[1] = -math.atan2(vsPoI[0]-vsPos[0], \
-(vsPoI[2]-vsPos[2]))*180/math.pi
vsAoV = ce.getAnglesOfView(viewshed)[0]
vsPoIDist = math.sqrt(math.pow(vsPoI[0]-vsPos[0],2)+ \
math.pow(vsPoI[1]-vsPos[1],2)+ \
math.pow(vsPoI[2]-vsPos[2],2))
vsRatio = vsAoV/ce.getAnglesOfView(viewshed)[1]
else:
return
vsName = ce.getName(viewshed)
return vsPos,vsRot,vsAoV,vsPoIDist,vsRatio,vsName
def snapshot360(view,vsName):
# make six square snapshots
view.setCameraAngleOfView(90.0)
vdAoV = [(0,0),(0,90),(0,180),(0,-90),(90,0),(-90,0)]
suffixes = ["_f","_l","_b","_r","_u","_d"]
for i, suffix in enumerate(suffixes):
view.setCameraRotation(vdAoV[i][0],vdAoV[i][1],0)
view.snapshot(ce.toFSPath('images/'+vsName+suffix+'.png'),hRes,hRes)
def snapshotViewshed(view,viewshed):
# get initial camera parameters
camPos,camRot,camAoV,camPoIDist,camPersp = getCamera(view)
# get viewshed parameters
vsPos,vsRot,vsAoV,vsPoIDist,vsRatio,vsName = getViewshed(viewshed)
if ce.isViewDome(viewshed):
snapshot360(view,vsName)
else:
# set camera to viewshed parameters
setCamera(view,vsPos,vsRot,vsAoV,vsPoIDist)
# make a snapshot
view.snapshot(ce.toFSPath('images/'+vsName+'.png'),hRes*vsRatio,hRes)
# reset camera to initial camera parameters
setCamera(view,camPos,camRot,camAoV,camPoIDist,camPersp)
if __name__ == '__main__':
# get selected viewsheds, view domes and view corridors
view = ce.getObjectsFrom(ce.get3DViews())[0]
viewsheds = ce.getObjectsFrom(ce.selection(),ce.isViewshed)
viewdomes = ce.getObjectsFrom(ce.selection(),ce.isViewDome)
viewCorridors = ce.getObjectsFrom(ce.selection(),ce.isViewCorridor)
# preparations
initialSelection = ce.selection()
ce.setSelection([])
for al in ce.getObjectsFrom(ce.scene,ce.isAnalysisLayer):
ce.setLayerPreferences(al,"Visible",False)
tmpLayer = ce.addAnalysisLayer('TEMP Analysis Layer')
# make snapshots
for viewshed in (viewsheds+viewdomes+viewCorridors):
if ce.isViewCorridor(viewshed):
ce.setLayerPreferences(tmpLayer,"Visible",True)
else:
ce.setLayerPreferences(tmpLayer,"Visible",False)
tmpViewshed = ce.copy(viewshed,False,tmpLayer)
snapshotViewshed(view,tmpViewshed[0])
ce.delete(tmpViewshed)
# clean up
ce.delete(tmpLayer)
for al in ce.getObjectsFrom(ce.scene,ce.isAnalysisLayer):
ce.setLayerPreferences(al,"Visible",True)
ce.setSelection(initialSelection)
... View more
01-17-2018
08:12 AM
|
8
|
9
|
2164
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 10-15-2025 08:03 AM | |
| 1 | 10-16-2025 03:16 AM | |
| 3 | 10-20-2025 06:11 AM | |
| 1 | 04-19-2023 12:30 AM | |
| 1 | 02-27-2025 05:19 AM |
| Online Status |
Offline
|
| Date Last Visited |
18 hours ago
|