|
POST
|
I'm not sure what the capabilities of ArcMap are, but if you can export your data so that you can store an object attribute that marks a shape as being in a certain category, then you can write a rule that connects to this attribute and behaves accordingly. For example, if each shape has an object attribute called category, you can write a rule that has an attribute also called category and then link this rule attribute to the object attribute in the inspector (Inspector -> drop down arrow next to rule attribute -> Connect Attribute -> Object Attribute). Then, to visualize the streets based by their categories, in your rule you can color the streets based on category, for example.
... View more
05-11-2017
02:25 AM
|
0
|
0
|
1813
|
|
POST
|
If you don't already have unique IDs, another solution would be to generate them by exporting your shapes (File -> Export Models -> FileGDB -> Export Features = Shapes) to a GDB and importing them back into CityEngine again. Then, each shape will have a unique object attribute called OBJECTID. But, if you have dynamic shapes, then this will ruin the dynamic nature of your shapes (they won't be connected to the streets anymore).
... View more
05-11-2017
02:03 AM
|
0
|
1
|
4501
|
|
POST
|
It looks like you have dynamic shapes which are automatically created from a street network. Creation of Shapes from Graph Networks These are different from static shapes because the dynamic shapes are automatically created and can be controlled through parameters that can be found in the Inspector. With street networks, street shapes are created above the graph network edges. The shapes in between streets are blocks. If shapeCreation is turned on (default), then large blocks will be subdivided into smaller lots. The Lot rule is automatically assigned to each lot that borders a street, and the LotInner rule is assigned to those that do not border a street. (But, the rule assignment can be changed.) This subdivision can be controlled by block parameters. Block Parameters You could try to play around with the block parameters to see if you can get the subdivision you desire. Or, for more manual control of your lots, you can convert your dynamic shapes into static shapes. This means they won't be controlled by the graph network anymore. With dynamic shapes, you can move the street network, and the lots will move too and be automatically re-created to fit the new street network. With static shapes, the lots will be independent of the street network. To convert dynamic shapes to static shapes, write a simple rule (Lot --> X.) and apply it to the dynamic shapes you want to convert. Then, select the shapes and go to Shapes -> Convert Models to Shapes. With static shapes, you can then manually split them however you want using the polygonal shapes tool. Polygonal Shape Creation
... View more
05-11-2017
01:52 AM
|
1
|
1
|
932
|
|
POST
|
You could try to use occlusion queries. Create a shape (needs to be closed shape with volume) that has the boundaries of your initial shape. Then, before creating each building, test for occlusion. Occlusion Query Functions
... View more
05-10-2017
05:32 AM
|
0
|
0
|
756
|
|
POST
|
There are many ways to achieve this. Peter's method is one way, but with this method be careful about calculating floor area values because I think the Tower actually penetrates/overlaps the Podium in this rule and may lead to double counting floor area. If you don't care about floor area calculations, then this method will work for you. If you need floor area calculations to be exact, then you might want to translate the Tower upwards (in the y direction) to the height of the Podium so that it does not overlap the Podium. Alternatively, (just to illustrate that there are multiple ways to create similar geometry) another way to create a tower on top of a podium is to create the podium, comp out the roof the podium, use the podium roof as a base to create your tower(s). For example, if you want a tower centered on top of a podium, here's how you could do it. Lot -->
extrude(podium_height)
Podium
Podium -->
comp(f) { top: PodiumRoof. Tower | all: PodiumFace. }
Tower -->
extrude(tower_height)
s(tower_width, '1, tower_width)
center(xz)
If you want two towers centered on top of the podium separated by a distance, here's how you could do it. Podium -->
comp(f) { top: PodiumRoof. Towers | all: PodiumFace. }
Towers -->
extrude(tower_height)
s(2*tower_width + towerSeparation_distance, '1, tower_width)
center(xz)
split(x) { ~1: Tower.
| towerSeparation_distance: NIL
| ~1: Tower. }
Again, there are many ways you can create this geometry, and the above code just shows one way. You can also combine translate, scale, and split operations to achieve the same results, and you might want to do this in order to create attribute values for the characteristics that you want to be able to control and change. For example, if you decide that you would rather control the tower position by xz coordinates, you can create attributes for these xz coordinates and then use translate operations to put the tower in the right place.
... View more
05-04-2017
07:48 AM
|
2
|
2
|
2964
|
|
POST
|
Setting the index in roofGable() does not work for concave shapes. The index parameter only works for convex shapes with a single face. The roof ridge usually aligns with the longest side, so you could try to double the width of your shape, create the roof, and then undo the doubling using s() commands before and after roofGable(). This might work in some cases, but I'm not sure if it will work in all cases. For example, if the edge 0 is in the x direction: s('2, '1, 0)
roofGable(roof_angle)
s('0.5, '1, '1) Note that the second s() command is not the exact reverse of the first s() because roofGable changes the scope orientation. The parameter values might have to be switched around to account for your situation.
... View more
05-04-2017
06:53 AM
|
1
|
1
|
1031
|
|
POST
|
Maybe LR is referring to turning off Value filtering in the Inspector as in these other posts: Remove border issues on terrain Terrain issue Value filtering is briefly described on this help page (in the table near the bottom): Terrain Layer Here is the description from the page: The filtering applied to terrain height and sampling. Choice of either none (pixelated), or smooth (linear) filtering.
... View more
05-04-2017
06:22 AM
|
0
|
0
|
1297
|
|
POST
|
This is expected behavior. Hiding the layers doesn't lead to a large performance increase. All the objects in each layer are still in the scene editor (you can expand the layers to see them) even when they are hidden.
... View more
05-04-2017
05:58 AM
|
1
|
0
|
641
|
|
POST
|
There are some rules for streets and buildings in ESRI.lib, which is included with CityEngine. * ESRI.lib/rules/Streets/Street_Modern_Standard.cga * Street_Modern_Simple.cga * Building_From_Footprint.cga Also, there is David Wassermans Complete Streets rule. Or, you can write your own rules based on your own specific needs.
... View more
05-04-2017
04:25 AM
|
2
|
4
|
1813
|
|
POST
|
I can't seem to reproduce the problem. I noticed that you're using 2016.0 in the screenshots that you posted on the other post, and I'll take this chance to recommend upgrading to 2016.1 since there were a bunch of bugs fixed, but this is probably irrelevant for the issue you wrote about above. I downloaded a new copy of the example (Help -> Download Tutorials and Examples) separately in both 2016.0 and 2016.1, and I didn't get any errors in the Pointmarker_To_FootprintShape.cga file. From your screenshot, I can't really see the code that is causing the bug, but I don't think you changed the file, so I don't think the problem is there. In any case, maybe try downloading a fresh copy of the example again? Or if that doesn't work, another suggestion would be to reset your copy of ESRI.lib. If you remove ESRI.lib from your workspace in the navigator (right click on ESRI.lib in Navigator -> Delete -> doesn't matter if you delete the contents on disk or not), CityEngine will automatically write it again into your workspace when you restart CityEngine.
... View more
04-18-2017
09:35 AM
|
1
|
0
|
1048
|
|
POST
|
The reason why the vertical split pieces are not getting the color information from the map layer is because only the initial shape can read the map layer information. The attribute Red_texture is set to a value that it gets from the map layer before any rules are executed. The map layer is sampled at the center of the initial shape. When the rules are executed, each piece of the split has the attribute Red_texture = 0 because the map layer was sampled once for the initial shape at the center of the initial shape. Possible Solution: Create another shape the size of the map layer. Then, put a rule on this shape that splits the shape into grid cells with the size of your door. Then, create static shapes out of each grid cell (Shape -> Convert model to shapes). On each grid cell shape, assign a rule that has an attribute that connects to the map layer. Instead of red circles, use red squares in your map image (since the grid cells are square and sampling happens at the center). Then, each grid cell shape will have an attribute value that comes from the map layer, and this value will be 1 where there should be a door and 0 otherwise. Also in the rule, if the grid cell corresponds to a door location (attribute value is 1), then create an extruded shape (some shape with a volume), and otherwise, do not create any geometry (NIL). Then, in your building rule, test if the face intersects (operations touches, overlaps, or inside) one of the door location shapes. If it does intersect, then you know you can create a door there, and otherwise, create a wall.
... View more
04-03-2017
05:12 AM
|
1
|
1
|
674
|
|
POST
|
For conditional rules, you don't actually need to make sure that the else statement is reachable. The Colour rule with two case statements checking if Special is "N" or "Y" and an else statement is valid code and will run correctly. Since the range of the attribute Special is limited to either "Y" or "N", then the else statement will not be reached, but it is still grammatically correct code, and it will run as expected. There are compile errors because of errors in the format of the conditional and stochastic (percentage) statements. In a conditional construction, there can be any number of case statements followed by an else statement, but the else statement must be there (with operations specified). Similarly, a stochastic construction must also end with an else statement. Also, the percentages in a stochastic construction must be <=100, and the else statement will get the remainder percentage to make the whole thing sum to 100. Here are the help pages: Conditional Rule Stochastic Rule In your code on line 23, there is an else statement, which is probably intended to go with the case statements on lines 18 and 19, but the compiler thinks it belongs to the percentage statements on lines 20-22. Whatever follows this else statement is interpreted as the code that should be executed if this else statement were to be reached. Basically, to make the code work, an else statement for the stochastic construction on lines 20-22 is missing, and the else statement on line 23 is missing some operations after it (and similar for line 28). In general, if no operations are desired, you could write "NIL". Or, as Felix points out, you can structure your statements so that one case statement is for when area < 50, and the else statement takes care of the situations when area >= 50. I wrote this so that you could hopefully understand what's going on with the conditional and stochastic constructions, but you can certainly use Felix's code to solve your problem. However, note that you'll also want to make sure you account for the case where Height==12 by using the <= or >= signs in your conditions.
... View more
04-03-2017
02:50 AM
|
2
|
1
|
1959
|
|
POST
|
My guess is that Chris's first point might be the relevant issue here. The models need to be closed, and maybe something funny is going on with the roof to make it not a closed solid. When exporting a model as an OBJ in CityEngine, all faces that have the same material are considered part of the same object. Make sure that all the material.* properties for the relevant shapes are set to the same thing. This should be fine if you just make everything white, for example.
... View more
03-31-2017
02:10 AM
|
0
|
0
|
2410
|
|
POST
|
Is there another small window open on another screen? After the first dialog box, there is a second one that allows you to select the coordinate system. The streets should import after saying OK on the second window.
... View more
03-29-2017
10:20 AM
|
0
|
0
|
521
|
|
POST
|
Knowledge about neighboring shapes in CityEngine is really difficult and limited. It's currently limited to the occlusion queries in CGA. If you figure out a way to do it with Python, it's probably the only way to do it.
... View more
03-21-2017
09:36 AM
|
0
|
0
|
1432
|
| 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
|