|
POST
|
I don't think there's an easy way to do this because the roof operations do not automatically create UVs, so this means UVs will have to be added using setupProjection(). I would say that the appropriate UVs need to be calculated and specified for each face. However, maybe there's something I'm overlooking since I'm not sure how you managed to get the continuous UVs on the roofs in the blue case. So, maybe there's another way. (In the red case, I'm guessing that setupProjection() is used.)
... View more
05-29-2018
03:32 AM
|
0
|
4
|
2300
|
|
POST
|
You can control what is compared in minimumDistance by choosing the appropriate label. But, then you have to set the label appropriately for all the shapes, and I'm not sure how you could do so in order to get what you want. The inspector shows the values that are initially set by the rule or the values that are set by the user (bold) or the values set by linking (source appears in parentheses). The inspector does not show values of attributes that are reset within the rule using the set() operation. This is because the set() operation only applies to that node which calls it and it's subtree. Other shapes in the subtree might have a different value for the same attribute. You can use reports to display the height in the Inspector (in the Reports section). You can also use the dashboard to visualize the desired reported value nicely.
... View more
05-29-2018
03:12 AM
|
0
|
0
|
2789
|
|
POST
|
The front faces are determined by the local coordinate system of the shape which exists before the comp is applied. Check out where front is on this cube in relation to the coordinate system. You can rotate the coordinate system using rotateScope() so that your desired faces are front. Or, you can set the first edge of your initial shape so that the scope is aligned as desired. Select the desired edge -> Shapes -> Set First Edge. When viewing the initial shape, the first edge is indicated in orange. If your buildings are created on dynamic shapes created from streets, then you can use street.front instead of front as the selector in the comp().
... View more
05-18-2018
07:10 AM
|
2
|
1
|
1107
|
|
POST
|
Try using inter instead of intra in minimumDistance(). Intra means only the shapes in the current shape tree are tested. Inter means that only the shapes that are not part of the current shape are tested. This works for me. Changing the frontSetback changes the height of the building. attr frontSetback = 5
Parcel -->
setback(frontSetback) { front: Garden | remainder: Lot }
Garden -->
color(0,1,0)
Lot -->
label("Lot")
Mass
Mass -->
print(minimumDistance(inter, "Lot"))
extrude(minimumDistance(inter, "Lot"))
... View more
05-14-2018
01:34 AM
|
0
|
0
|
2789
|
|
POST
|
Sorry, it is not possible to have attribute A depend on attribute B and at the same time have attribute B depend on attribute A. The dependency can go only one way. If you create another attribute to choose whether you use buildingHeight or floorCount to calculate the other, then the user can decide whether the building height should be used or the floor count should be used. Then, you can have another function (not an attribute) that calculates the desired amount to extrude the building. However, the values shown in the Inspector won't necessarily be the desired values. If the user changes the value of an attribute, then the user's value is shown in bold. The inspector shows only initial values for attributes. Also, if you set an attribute later in the code, this will not be shown in the inspector. If you want to see calculated values for buildingHeight and floorCount, then you'll have to report these.
... View more
05-07-2018
06:16 AM
|
1
|
0
|
2331
|
|
POST
|
The graphics card is not recognized. Open the windows program "System information" and then select "Components > Display" to see if the graphics card matches the requirements. If it does, maybe the driver has a problem. For this, look into the windows program "Device manager"and see if "Display adapters" shows the correct graphics card. 2 possibilities: * incorrect graphics card (unlikely because you said it was working). * graphics card is not working anymore (could happen after a system update). solution: update driver.
... View more
05-02-2018
06:11 AM
|
0
|
0
|
837
|
|
POST
|
First, values need to be reported. In my example above, the value for parcel area is reported in the CGA code. The name of the report in "ParcelArea". This value is visible in the Inspector under the Reports section. Check that your reports are correct. report("ParcelArea", geometry.area) Second, the object attribute names are case sensitive. The python code gets the reported value and then sets the object attribute called "parcelArea". Object attributes can be seen in the Inspector under the Object Attributes section. Third, object attributes are different from rule attributes. In your screenshot, you circled the rule attributes in the Inspector, but the object attributes are being changed in the python code.
... View more
05-02-2018
02:46 AM
|
0
|
2
|
5912
|
|
POST
|
Exporting to GDB does not export rule attributes. You need to write reports in cga that report the values of the desired rule attributes in order to have this data in the GDB.
... View more
04-30-2018
06:27 AM
|
0
|
1
|
1290
|
|
POST
|
The colorRamp() functions has access to a list of more than 5 colors. For each color map, there are 36 colors (although I don't guarantee that they look visibly different). Specify the value parameter to be any number in the range [0, 1].
... View more
04-27-2018
05:56 AM
|
0
|
0
|
1412
|
|
POST
|
ESRI.lib, which comes with CityEngine and can be found in the Navigator, has plant models and rules that insert them. The Plant_Loader inserts a single plant, and you can set the species and size in the Inspector. The Plant_Distributor scatters a bunch of plants over a surface.
... View more
04-27-2018
03:14 AM
|
0
|
0
|
1866
|
|
POST
|
Just a guess... maybe try clicking in the Viewport and then pressing F to frame the contents of the scene. I feel like sometimes when you import something it doesn't automatically take you to the location of the stuff that you just imported.
... View more
04-27-2018
02:56 AM
|
0
|
0
|
1774
|
|
POST
|
Yes, it is possible to have multiple terrain layers in a scene. Layer -> New Map Layer -> Terrain -> select your height map and texture files. It's a good idea to have one high res terrain layer just for the region of interest and a low res terrain layer for the surroundings. To avoid z fighting between the terrain layers in the region of interest, you might want to lower the low res terrain by setting the offset to -10m or something like that. Or, you can create a shape which is the size of the high res area, move the shape below the terrain, and then align the low res terrain to this shape so that the low res terrain is lower than the high res terrain in the area that they overlap.
... View more
04-27-2018
02:42 AM
|
0
|
0
|
1528
|
|
POST
|
The roof edge selectors (eave, hip, valley, ridge) should be used with comp(e) to extract the edges. This code creates a hip roof and creates green edges along the eave edges. edge_width = 0.2
Lot -->
roofHip(30) Roof.
comp(e) { eave: Edge }
Edge -->
color(0,1,0)
s('1, edge_width, edge_width)
center(yz)
primitiveCube
... View more
04-26-2018
02:08 AM
|
0
|
0
|
1131
|
|
POST
|
With regards to your second point, you can also add/edit object attributes from within CityEngine. In the Inspector, there is a section called Object Attributes. Then, you can connect rule attributes to the object attributes with the same name (drop down menu of rule attribute -> Connect Attribute -> Object Attribute).
... View more
04-26-2018
12:30 AM
|
1
|
0
|
2643
|
|
POST
|
To make a drop down list from which the user can select a value, you can create an attribute and use the @Range annotation. Annotations
... View more
04-26-2018
12:17 AM
|
0
|
0
|
1441
|
| 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
|