|
POST
|
The example with the slope around a shape in the middle is a quite unusual use case. To make this inter occlusion queries work, the Procedural Runtime preferences need to be adjusted: neighborhood distance for inter-occlusion needs to be set to the maximum extend of the slope (attr dist in the cga rule above) Please refer to the help for further explanations: Context (and Occlusion) Queries
... View more
01-08-2018
07:02 AM
|
0
|
3
|
3132
|
|
POST
|
This is quite a difficult task. One way to achieve such a result without setback is with the CGA minimum distance function this allows for such checks without use of setback and offset. But there is no way in knowing, if it is the distance to the front or backside of the building.
... View more
01-05-2018
09:34 AM
|
0
|
0
|
576
|
|
POST
|
Thanks Devin for the feedback! For CityEngine 2017 the team did focus on support for hiDPI screens. The editor markers still need to be adjusted. I've filed a feature request.
... View more
12-20-2017
07:06 AM
|
1
|
0
|
1140
|
|
POST
|
Hello Devin Adding bookmarks is an undocumented annotation feature of the CityEngine Editor. It is provided "out of the box" by the underlying framework CityEngine is based on. You can add/remove a bookmark by clicking with the right mouse button at the vertical ruler (left side). There is no bookmark overview window. The only way to jump between the bookmarks available is to use the overview ruler on the right side of the editor. There Bookmark positions are highlighted in green and the name is shown as a overlay.
... View more
12-19-2017
07:30 AM
|
2
|
1
|
1140
|
|
POST
|
Thank you for this interesting question. If you want an exact number of floors, you need to influence the random floor number generation. Therefore you need to keep track of all floors generated. In a regular split operation this information is unavailable. The only way I achieved this, is by using a recursive tile generation. version "2017.1"
const floorHeight = 3
const minFloors = 5
const maxFloors = 10
const totalFloors = 30
attr floors = 0
attr floorsRemaining = totalFloors
const parcelsX = 4
const parcelsZ = 5
attr parcelsRemaining = parcelsX * parcelsZ
// const probabiltity = totalFloors / (parcelsX * parcelsZ * (minFloors+maxFloors)/2)
const probabiltity = 0.3
getFloorHeight =
case parcelsRemaining == 0: floorsRemaining
case floorsRemaining/parcelsRemaining > maxFloors: min(maxFloors, floorsRemaining-minFloors)
case floorsRemaining <= maxFloors: float(p(probabiltity)) * floorsRemaining
else: float(p(probabiltity)) * floor(rand(minFloors, min(maxFloors, floorsRemaining-minFloors)))
Lot -->
s(scope.sx/parcelsX,0,scope.sz/parcelsZ)
SplitXZ(0,0)
SplitXZ(i,j) -->
case i<parcelsX:
set(parcelsRemaining, parcelsRemaining-1)
set(floors, getFloorHeight)
set(floorsRemaining, floorsRemaining - floors)
Floors
t(scope.sx,0,0)
SplitXZ(i+1,j)
else:
case j<parcelsZ-1:
t(-scope.sx*parcelsX,0,scope.sz)
SplitXZ(0,j+1)
else: NIL
Floors -->
extrude(floors*floorHeight)
report("floors."+str(floors), 1)
split(y) {floorHeight: Color}*
Color -->
case floors > maxFloors: color(1,0,0)
case floors < minFloors: color(0,0,1)
else: color(0,1,0)
... View more
12-12-2017
10:14 AM
|
2
|
1
|
1193
|
|
POST
|
Hello Jafar Thank you for your question. Depending on the Block shape, it can be quite complicated to grow streets around them. There is certainly no easy to command to accomplish this task. But for your use case, there is a simple solution. You can use the Python command ce.subdivideShapes to subdivide lots in the same way as dynamic shapes. Please use the following script: '''
@author: Esri R&D Center Zurich
'''
from scripting import *
# get a CityEngine instance
ce = CE()
def subdivideShapes(shapes):
subdsettings = SubdivideShapesSettings()
subdsettings.setCornerAlignment("STREET_WIDTH")
# Sets CornerAlignment field.
# @param enumValue: the new value ["STREET_LENGTH", "STREET_WIDTH"]. [str]
subdsettings.setCornerAngleMax(120)
# Sets CornerAngleMax field. Corner angle threshold. If corner angle is below this value, "soft" corners are inserted.
subdsettings.setCornerWidth(0)
# Sets CornerWidth field. Corner width. Inserted "soft" corners have this width.
subdsettings.setForceStreetAccess(0)
# Sets ForceStreetAccess field. Factor to guarantee street access. A large value gives preference to splits that result in lots with street access.
subdsettings.setIrregularity(0.3)
# Sets Irregularity field. Split line irregularity. Larger values result in split positions more distant from middle point.
subdsettings.setLotAreaMax(1500)
# Sets LotAreaMax field. Maximum lot area. If the lot area is less than this value, subdivision stops.
subdsettings.setLotAreaMin(500)
# Sets LotAreaMin field. Minimum lot area. If the lot area is greater than this value, subdivision continues.
subdsettings.setLotElevation("UNEVEN")
# Sets LotElevation field. Flat or uneven lots.
# @param enumValue: the new value ["UNEVEN", "EVEN_MIN", "EVEN_MAX", "EVEN_AVG"]. [str]
subdsettings.setLotMinWidth(10)
# Sets LotMinWidth field. Minimal lot side length. If violated, the split position is sampled again.
subdsettings.setLotSubdivisionMethod("SKELETON")
# Sets LotSubdivisionMethod field. The subdivision algorithm used. The recursive method is creates regular blocks, while the straight skeleton guarantees street access.
# @param enumValue: the new value ["RECURSIVE", "OFFSET", "SKELETON", "NONE"]. [str]
subdsettings.setOffsetWidth(25)
# Sets OffsetWidth field. Offset width. When block inwards offset is used to compute subdivision, this is the default depth of the generated lots.
subdsettings.setSeed(-528362)
# Sets Seed field. Seed.
subdsettings.setShallowLotFrac(1.5)
# Sets ShallowLotFrac field.
subdsettings.setSimplify(0)
# Sets Simplify field. Amount of simplification that occurs. A high value creates irregular lots with fewer vertices.
subdsettings.setSubdivisionRecursive(True)
# Sets SubdivisionRecursive field. Use recursive algorithm for subdivision.
return ce.subdivideShapes(shapes, subdsettings)
if __name__ == '__main__':
print subdivideShapes(ce.selection())
... View more
11-28-2017
10:07 AM
|
2
|
0
|
943
|
|
POST
|
Good News! The issue has been resolved in CityEngine 2017.1 This version is scheduled to be released in November.
... View more
10-26-2017
05:13 AM
|
0
|
1
|
1097
|
|
POST
|
Hi Abhishek Sobbana Thank you for this great question. For your use case, the CityEngine team has made the Example Instance City 2016.0 The Instance City Example contains four scenes that apply rules to instance pre-modeled building assets. The first scene comes with a street-network generated in CityEngine, and The second scene shows a city in space on a subdivision surface. The provided instancing rules distribute pre-modeled building assets according to their size while maintaining their original scale. The third scene shows how buildings can be instanced along a curved street. The fourth scene showcases improvements made in 2016.0 to the innerRectangle function allowing better placement of building assets in parcels.
... View more
10-24-2017
09:48 AM
|
0
|
0
|
792
|
|
POST
|
hi Abele Giandoso The area of your city 20 Miles * 6.5 should be doable. But since area is quite big, there might be too many polygons inside. Then you need to partition your scene into multiple scenes. However, if you have modeled your City in the wrong scale, you can use the following python script to adjust the size of the street network: from scripting import *
# get a CityEngine instance
ce = CE()
def scaleAttr(segments, attrList, scaleFactor):
for s in segments:
for a in attrList:
value = ce.getAttribute(s, a)
ce.setAttribute(s, a, value * scaleFactor)
if __name__ == '__main__':
scaleFactor = 1/2
scaleAttributes = ['/ce/street/laneWidth', '/ce/street/sidewalkWidthLeft', \
'/ce/street/sidewalkWidthRight', '/ce/street/streetOffset', \
'/ce/street/streetWidth']
segments = ce.getObjectsFrom(ce.scene, ce.isGraphSegment)
ce.scale(segments, [scaleFactor, 0, scaleFactor])
scaleAttr(segments, scaleAttributes, scaleFactor)
... View more
10-23-2017
09:28 AM
|
1
|
2
|
991
|
|
POST
|
Hello Luiz Amadeu Coutinho Thank you for your questions. The main difference is, that the CityEngine Scene Viewer is a standalone solution. There is no integration with other esri software and services. The export of models to Scene Layer Packages gives the great advantage, that it can be combined with feature and map layers from other sources. Please start looking into the new workflow. In the upcoming CityEngine 2017.1 release SLPKs are now “Smart Mapping-ready”. Means, statistical information on attributes is now written to the scene layers which allows for smart mapping capabilities in ArcGIS apps. For example, in the ArcGIS Scene Viewer, the colors of all buildings in a city can be interactively changed driven by attributes. The ArcGIS Indoors - UC 2017 Tech Preview has a detailed description and videos. I'm not aware of a final workflow yet. I hope the link will then be working.
... View more
10-23-2017
03:35 AM
|
1
|
1
|
968
|
|
POST
|
Hello Tess Gardner For CityEngine BASIC there have been changes for the 2017.0 release: Collada/KML is now part of the BASIC license, and FileGDB is now part of the ADVANCED license. This allows users of the basic version to easily exchange their models in the open Collada/KML standard. FileGDB export is suggested to be used in advanced workflows. CityEngine 2017.0 release notes—Esri CityEngine | ArcGIS Desktop
... View more
10-23-2017
01:30 AM
|
1
|
1
|
590
|
|
POST
|
I tried your script. There were errors in the log when running it. Please use the log for debugging python scripts. File "E:\CE_Workspaces\CE_Support_Workspace\CESupport\scripts\snap.py", line 16, in exportImages
path = directory + "\_" + str(b) + str(v) + str(viewports.index(v)) + "_" + Tag + "_raw.png"
NameError: global name 'viewports' is not defined After fixing these it worked '''
Created on Oct 18, 2017
File: snap.py
'''
from scripting import *
# get a CityEngine instance
ce = CE()
def exportImages(directory, Tag=""):
views = ce.get3DViews()
for v in views:
for b in v.getBookmarks():
path = directory + "\_" + str(b) + str(v) + "_" + Tag + "_raw.png"
v.restoreBookmark(b, False)
v.snapshot(path)
if __name__ == '__main__':
exportImages(ce.toFSPath('images'))
... View more
10-18-2017
06:01 AM
|
1
|
1
|
1264
|
|
POST
|
Hello Jonas Bromand Fuchs On Windows you need to be careful with "\" in path strings. Always use "\\" to make sure it is interpreted correctly. You can check the path by using "print" To be platform independent, you can use the functionality 10.1. os.path — Common pathname manipulations — Python 2.7.14 documentation provides. Here is a simple example that writes a snapshot to the image folder of the project. views = ce.getObjectsFrom(ce.get3DViews())
if len(views) < 1 : print "no view found"
else :
views[0].frame()
ce.waitForUIIdle()
views[0].snapshot(ce.toFSPath('images')+"\\snapshot.png")
... View more
10-18-2017
02:49 AM
|
0
|
3
|
1264
|
|
POST
|
Yes, this applies to CityEngine scenes. Splitting larger areas into multiple scenes is a common approach. ArcGIS Pro has no such limitation.
... View more
10-16-2017
04:05 AM
|
0
|
0
|
3529
|
|
POST
|
Hello Nicolai Steinø Yes, this is possible with a function layer (reference point is the center). Here is a simple CGA rule that colors buildings by LOD: attr LOD = 0
@StartRule
Lot --> extrude(rand(10,30)) ColorByLOD
ColorByLOD -->
case LOD > 3: color(1,0,0)
case LOD > 2: color(1,1,0)
case LOD > 1: color(0,1,0)
else: color(0,0,1) Make sure the rule attribute LOD is connected to the layer attribute: When you move the camera, call the following python script: from scripting import *
# get a CityEngine instance
ce = CE()
if __name__ == '__main__':
l = ce.getObjectsFrom(ce.scene, ce.isLayer, ce.withName("'LOD"))[0]
CameraPoI = ce.get3DViews()[0].getCameraPoI()
ce.setAttributeLayerExtents(l, [CameraPoI[0],CameraPoI[2],3000,3000])
ce.setLayerAttributes(l, "attr LOD = sin(u * 180) * sin(v * 180) * 4")
sceneShapes = ce.getObjectsFrom(ce.scene, ce.isShape)
ce.generateModels(sceneShapes, False) Then your city should look like this:
... View more
10-10-2017
11:05 AM
|
3
|
3
|
1523
|
| 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 |
19 hours ago
|