|
POST
|
In the Inspector, click on the drop down arrow next to the rule attribute (see Thomas's screenshot) -> Connect Attribute -> Layer attribute -> select LOD.
... View more
10-13-2017
06:38 AM
|
1
|
0
|
1885
|
|
POST
|
I don't really have a better idea than to use a git repository. Yes, unfortunately, this means that merging the cej is difficult. There is functionality that allows exporting and importing selected layers to/from cej files. Maybe you can try to experiment with creating some layers in different cej files and then importing those layers into the main cej file as needed. I know this is not ideal though.
... View more
10-10-2017
10:03 AM
|
0
|
0
|
914
|
|
POST
|
You might be able to do this using an extra Python export script similar to what was suggested as Option 2 in this post (but adding an extra step to retrieve the reported value): https://community.esri.com/thread/172315#comment-587903 1) Create an export python script. Right click on the scripts folder -> New -> Python Module -> Select Module:Export (Reporting) and choose a name (e.g. export_script.py). 2) In the finishModel() function, add code to retrieve the reported value, set the attribute value, and set the attribute source to USER. r = model.getReports()['myReport'][0] # read value of report (need to report value in cga code)
ce.setAttribute(shape, '/ce/rule/height', r) # can set attr val like this
ce.setAttributeSource(shape, '/ce/rule/height', 'USER') # set source of attr val to user since we changed it and also so we can access it in the other python script that calls this one
3) In your first python script, add code (lines 4-7 below) to call the export script. # get list of selected shapes
shapeList = ce.getObjectsFrom(ce.selection, ce.isShape)
# run export script to set attributes to reported values
expSettings = ScriptExportModelSettings()
expSettings.setScript("export_script.py")
ce.export(shapeList, expSettings)
for shape in shapeList:
# print rule attribute
print(ce.getAttributeSource(shape, '/ce/rule/height'))
print(ce.getAttribute(shape, '/ce/rule/height'))
... View more
10-10-2017
09:39 AM
|
0
|
0
|
1740
|
|
POST
|
Here are the CityEngine tutorials: Introduction to the CityEngine tutorials—CityEngine Tutorials | ArcGIS Desktop Tutorial 1 starts with setting up a project and ends with creating 3D buildings by applying rules to shapes. Tutorial 5 is about importing shapes. The help doc also has information about the interface, how to create a project, and importing data among other topics. User Interface Using CityEngine Projects Importing Data
... View more
10-10-2017
09:04 AM
|
0
|
0
|
4520
|
|
POST
|
You might be able to search for two attribute values by using separating the values with a space, but I don't think this is a reliable way of getting the desired search results. Python is probably the way to go. Check out this post: https://community.esri.com/message/689542-re-layer-search
... View more
10-10-2017
08:39 AM
|
0
|
0
|
1649
|
|
POST
|
Would you be able to post a scene with one or two lots that print the incorrect rotation and the rule file?
... View more
10-10-2017
08:17 AM
|
0
|
0
|
1069
|
|
POST
|
There is a bug when trying to set the index when using roofShed. It's good to hear that alignScopeToGeometry() can be a workaround for this bug though. https://community.esri.com/thread/179731?commentID=645327&et=watches.email.thread#comment-624648 Weird roofGable behavior on square shapes
... View more
10-02-2017
05:01 AM
|
0
|
0
|
1923
|
|
POST
|
An easy way to get OpenStreetMap data into CityEngine is to use File -> Get Map Data. For some cities, sometimes the building footprints have height data. If this data is present, the ESRI.lib Building_From_OpenStreetMap.cga rule (which is automatically assigned to building footprints downloaded from Get Map Data) will create a building with the specified height. This rule also takes into account these attributes: height, building__levels, roof__height, roof__shape, building__colour, roof__colour. Of course, you can make your own rule that takes into account the attributes that you want to consider.
... View more
10-02-2017
03:32 AM
|
0
|
0
|
1554
|
|
POST
|
Then, to specify the edge thickness: const edge_width = 0.1
edges -->
primitiveCube
s('1, edge_width, edge_width)
center(yz)
You can use a cylinder instead of a cube if you want rounder edges.
... View more
10-02-2017
03:21 AM
|
0
|
0
|
783
|
|
POST
|
This is a difficult task in CityEngine. However, you could try something like the following: 1) Import the shape file to create a graph network where the roads create your residential or commercial blocks. 2) Create another graph network(s) using Grow Streets in a separate layer, according to the style you want. 3) For each block, copy the graph segments that have at least one node inside the block into the original layer. 4) Do some graph cleanup (Graph -> Cleanup Graph) to merge the new segments with the original segments from the shape file. Some experimentation with the settings will probably be needed. This could probably be automated with Python. You could also try to create your own graph growing algorithm and specify street vertices in Python using createGraphSegments() if you want something really custom. Use getObjectsFrom() and to get the imported blocks and getVertices() to get their vertices and getAttribute() to get the object attribute that says whether the block is residential or commercial.
... View more
10-02-2017
03:09 AM
|
0
|
0
|
2514
|
|
POST
|
One way would be to export all your shapes to a .gdb file. File -> Export Models -> FileGDB -> Export Features = Shapes only. Then, you can import this into your other scene which has a different coordinate system. File -> Import. If you set Export Features to include the models as well, then you'll get the models too. With shapes, you can always regenerate the rules. I suggested to export shapes in case you want to assign different rules to the shapes.
... View more
09-29-2017
10:07 AM
|
0
|
2
|
1219
|
|
POST
|
If you move the cylinder, then the cylinder regenerates, but the other objects in your scene are not regenerating. This might be why the occlusion is not detected in 3. If there was a something triggering occlusion in region 1 before and then this shape got moved, then this might also explain why region 1 remains red. If you move the yellow-red vertical object that is performing the occlusion queries, then it gets regenerated and should show the correct colors. In the Root rule, there is a line that says: X. This creates a terminal shape (meaning, it creates geometry that is displayed) with the blue color defined 2 lines before. Then, in the OcclusionDetection rule, the case creates either a red shape or a yellow shape. The red and yellow shapes are placed in the same spot as the blue shapes, so they fight each other to be rendered. This is why it is hard to see the red and yellow colors. If you take out the X in the Root rule, then you will have only red or yellow faces. Since we have fixed some occlusion bugs since 2015.2 and added new features to occlusion queries (labels), I would recommend upgrading to the latest version (currently 2017.0).
... View more
09-29-2017
09:56 AM
|
0
|
0
|
876
|
|
POST
|
Could you explain a little more about what the problem is? Setback using street.front as the selector should work on corner lots. All edges that are labeled as front should be part of the setback. See the first example (Setback on Street Front) in the setback help doc for an image and code. setback Operation
... View more
09-29-2017
09:22 AM
|
0
|
0
|
1321
|
|
POST
|
If the rule is generated with default values, there are no textures. The default value for Representation is "solid color". In the Inspector, you can set Representation = "realistic with facade textures".
... View more
09-29-2017
09:01 AM
|
0
|
0
|
700
|
|
POST
|
Yes, you can generate a building based on number of floors. For example, if you have an attribute for the number of floors and you know the floor height, then you can calculate the building height. attr nFloors = 5
const floor_height = 3
const height = nFloors*floor_height
Lot -->
extrude(height)
... View more
09-29-2017
08:51 AM
|
0
|
0
|
727
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-14-2022 07:18 AM | |
| 1 | 06-22-2020 04:54 AM | |
| 1 | 02-17-2020 03:10 AM | |
| 1 | 07-03-2023 03:37 AM | |
| 1 | 06-07-2023 05:26 AM |
| Online Status |
Offline
|
| Date Last Visited |
10-19-2023
12:40 PM
|