POST
|
I am not entirely sure I understand your question, but I am assuming that you are importing a road into CityEngine that has certain height values at each node and that you'd like to set height values for the road in between the nodes to get a finer resolution. In this case, I would recommend that the workflow would be to set the height values of your road at the desired resolution before importing into CityEngine. The road you import into CityEngine should already be the desired resolution. This would be a cleaner workflow than trying to translate and rotate street shapes to achieve a higher resolution street in CGA. Then, once your street is imported into CityEngine, you could use CGA rules to build on top of the imported graph network. However, to answer your first question. Yes, you can access the object attributes of a shape from within your CGA file. If you have an object attribute named "height", then you can create an attribute in the CGA file with the same name "height", and the rule attribute will get its value from the object attribute. In the Inspector, you can also link the attributes (if they don't automatically link), by clicking on the arrow next to the value field of the rule attribute and select "Object Attribute" as the source.
... View more
03-29-2016
05:21 AM
|
0
|
0
|
312
|
POST
|
With normal streets, you could make your sidewalk slightly wider than necessary and then use a split in the v direction to take out the extra width. See the section on UV splits and the UV Split on Streets example: split Operation However, for complete streets, David Wasserman, the creator of complete streets, is the expert.
... View more
03-17-2016
02:12 AM
|
1
|
2
|
512
|
POST
|
The extrude operation is meant to work on faces and is not defined for edges. If you make your walls have some thickness, then you could split out a small, thin 2D footprint for the wall and then extrude it to get the wall. Another option would be to use offset() on each room footprint to get walls around each room. Here, then, you would have double walls, so you would have to offset by half the wall thickness. This option would produce double the geometry though. To create random rooms, you could come up with heuristics using a combination of rand() to generate random numbers, p() for randomness, geometry.area to get the area of the shape, and scope.sx and scope.sz to get the dimensions of the shape.
... View more
03-16-2016
04:28 AM
|
0
|
0
|
346
|
POST
|
Yes, that is correct. You have to use comp(e) with the selectors eave, hip, valley, and ridge because these selectors are only designed to work for edges. Component Split Operation (See the section on Roof Edges.)
... View more
03-14-2016
06:32 AM
|
0
|
0
|
227
|
POST
|
Or, you could use some hacks to create a whole box for the water (Shell rule) and then draw in the wireframe lines in the code. Lot --> Shell split(x) { ~5 : SplitX }* SplitZ --> extrude(rint(rand(1,3))*5) print(scope.sy) set(tempvar, scope.sy) color("#FF9999") comp(f){ side : SplitGroundZ | top : Top. } Shell --> extrude(25) s(scope.sx - 0.01, '1, scope.sz - 0.01) center(xz) color(0, 0, 1, 0.15) BlueShell. WireframeX WireframeY WireframeZ WireframeX --> split(x) { 5 : comp(e) { all : Line. } }* WireframeY --> split(y) { 5 : comp(e) { all : Line. } }* WireframeZ --> split(z) { 5 : comp(e) { all : Line. } }*
... View more
03-14-2016
06:20 AM
|
1
|
0
|
444
|
POST
|
This is a known issue with rendering multiple layers of transparent objects (due to CityEngine not z-sorting transparent objects on rendering). I'm not sure if there's a workaround for this. But, to reduce the strange coloring inside the water, you could use the touches() method to decide which face is an inside or outside face and then only show the outside faces. It doesn't fully solve the problem though. SplitWaterZ --> case touches() : NIL else : split(y) { ~5 : Y. }*
... View more
03-14-2016
05:57 AM
|
1
|
1
|
444
|
POST
|
In your EntranceTile rule, you could separate out a part for the door and frame. Then, DoorAndFrame creates both the door and the frame. EntranceTile --> split(x) { ~1 : SolidWall | 1.5 : split(y) { 2.8 : DoorAndFrame | ~1 : SolidWall } | ~1 : SolidWall } // door plus frame DoorAndFrame --> Door DoorFrame Door --> // add code to resize and position as desired i(door_asset) DoorFrame --> // add code to resize and position as desired i(doorFrame_asset)
... View more
03-11-2016
06:45 AM
|
2
|
0
|
571
|
POST
|
CityEngine automatically determines the appropriate version of the example to download if you download the example from within CityEngine. Help -> Download Tutorials and Examples. Did you try to download the example through this dialog box? I just tried it on 2015.2, and I didn't see any errors in the Problems view.
... View more
03-04-2016
01:50 AM
|
1
|
0
|
536
|
POST
|
Nice workaround! I take back my original statement.
... View more
03-04-2016
01:01 AM
|
1
|
2
|
1762
|
POST
|
Nope, sorry, the first edge is automatically set for street blocks, and there is no way to change it.
... View more
03-03-2016
10:20 AM
|
1
|
6
|
1762
|
POST
|
I think we would have to ask, what makes a lot suitable for building on? Is it because the area is large enough and not so skinny? If so, we could use a combination of the following to make heuristics to define when a lot is suitable for building on: * comparison of scope.sx and scope.sz. For example, for a long skinny lot, scope.sx/scope.sz will be either really close to zero or really large. For a square lot, this aspect ratio would be 1. * comparison of geometry.area and scope.sx*scope.sz. For example, a triangular lot will have a smaller geometry.area/(scope.sx*scope.sz) ratio than a rectangular lot (assuming the scope is aligned to the shape).
... View more
03-02-2016
08:07 AM
|
0
|
0
|
589
|
POST
|
To get the shape in the image, you could probably use shapeO() and then take the remainder as your building: shapeL, shapeU, shapeO operations The reason why setback isn't working as you intended on non-subdivided block is because each side of the non-subdivided lot is touching a street, so street.front will always apply to each side. You could use the selectors front, back, right, left, etc instead of street.front, street.back.
... View more
03-01-2016
06:01 AM
|
1
|
9
|
1762
|
POST
|
Actually, there might be an easier way than Option 2. It might be possible to just set the source to user in the first python script in which case the second python script is unnecessary. Option 3 1) In the first python script, do this to set the source to user before setting the value of the attribute: ce.setAttributeSource(o, "/ce/rule/height", "USER") ce.setAttribute(o, "/ce/rule/height", addh) 2) Now you can run the python script.
... View more
02-17-2016
08:37 AM
|
1
|
4
|
2549
|
POST
|
Yes, reports would be great for this task! Check out this tutorial for how to use reports: Tutorial 11: Reporting—CityEngine Tutorials | ArcGIS for Desktop And, dashboards would be a great way to visualize your reports: Dashboards
... View more
02-15-2016
05:46 AM
|
0
|
3
|
639
|
POST
|
To turn off the automatic block partitioning, select the block, and in the Inspector under Shape Parameters -> Block Parameters, set type to "No Subdivision". Now, you can write a rule for custom partitioning of the block. You could use setback() to create a building with a parking lot in front of it and space on the sides or back of the parcel. See the section called "Adapt the parcel with setbacks" in this tutorial: Tutorial 8: Mass modeling—CityEngine Tutorials | ArcGIS for Desktop Note that if you only have one building on a full block (where the block is surrounded by streets), all sides will qualify as "street.front". In this case, you'll probably want to use a different selector such as "front". See the help page for setback() for more details on what selectors are available: setback Operation
... View more
02-15-2016
03:29 AM
|
0
|
5
|
639
|
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
|