POST
|
The above is a workaround. No, setPivot does not change the first edge of a dynamic shape. Sorry for the confusion in my previous comment.
... View more
06-19-2020
05:07 AM
|
0
|
0
|
248
|
POST
|
Shapes -> Compute Edge Attributes can only be done on shapes that are not dynamic. The streetWidth attribute can be used for dynamic lot shapes that are automatically created by street networks. However, note that this attribute is different than the edge attribute /edgeattr/streetwidths that is calculated for non-dynamic shapes. The streetWidth attribute does not include sidewalk widths, and it does not project to the nearest street (lot sides not touching a street get 0). See also: https://community.esri.com/thread/199406-designate-multiple-street-edges#comment-722386 and https://community.esri.com/message/852677-re-streetwidth-used-in-setback#comment-855075
... View more
06-19-2020
04:40 AM
|
0
|
0
|
1594
|
POST
|
No, sorry, I don't know why it doesn't work for you. It works for me. Does it work on a rectangular footprint that you draw yourself? Is the front edge actually changed? When the shape is selected, the front edge of a shape is partly orange to distinguish it from the other edges. Is the Roof_Form set to something that will change (like "gable")?
... View more
06-19-2020
04:15 AM
|
0
|
0
|
1580
|
POST
|
Thanks to your post, we have updated the Plant_Loader so that you can hopefully see the plant names in the drop down box again. To get the new version (v125), go to File -> Manage ESRI.lib, select ESRI.lib, and click Update.
... View more
06-18-2020
01:53 AM
|
1
|
0
|
466
|
POST
|
If you have lots that are not dynamic (i.e. not generated automatically by street networks) and streets in the scene, then it is possible to use edge attributes to sample street widths. To mimic your case, I created a lot with 4 buildings on it. Lot -->
split(x) { ~cell_size: split(z) { ~cell_size: Cell }* }*
Cell -->
offset(-offset_dist, inside)
extrude(10)
Mass The lot is surrounded by streets with widths as indicated in the (last) screenshot below. Select the lot, go to Shapes -> Compute Edge Attributes. This will create object attributes with the prefix /edgeattr/. Streetwidths are calculated based on the streets near the shape. Compute edge attributes tool—ArcGIS CityEngine Resources | Documentation This code samples the edge attribute streetwidths for each side of each building and resizes the facade according to the sampled value. Mass -->
comp(f) { side: Side }
Side -->
s('1, edgeAttr.getFloat("streetwidths"), '1)
set(material.opacity, 0.5) Sampling happens by projecting the current shape geometry onto the outline of the initial shape. Note that in your case with curvy streets where a building side might correspond to multiple streets, the function will only sample one of the streets. edgeAttr functions—ArcGIS CityEngine Resources | Documentation
... View more
06-17-2020
06:57 AM
|
2
|
2
|
1594
|
POST
|
To control the orientation of a roof, you can select an edge of your building footprint and go to Shapes -> Set First Edge. This will only have an effect for shapes with Roof_Form = {shed, gable, half-hip, gambrel, saltbox}. This cannot be done for dynamic shapes (shapes automatically generated by street networks). It looks like your shapes have gable roofs, and if they are building footprints from OpenStreetMap, then they are not dynamic shapes, so this should work for you.
... View more
06-16-2020
10:43 AM
|
0
|
2
|
1580
|
POST
|
Sorry, this is a bug. All the plant names should have been visible in the drop down box, but due to the bug, you don't see the other options. We hope to fix this soon. With regards to the unused attribute warning, this is expected behavior. The code will still compile and run. I understand that it doesn't seem right, but this is just how it is for now.
... View more
06-16-2020
08:15 AM
|
0
|
1
|
466
|
POST
|
You could put a case statement in the Facade rule like this: Facade -->
case scope.sx < 15:
// make the facade however you want it to be when it is <15m
else:
split(x) { ~15: Pattern }* You can also skip the case, and then you will get small pieces when the facade is < 15m, which I think is what you wanted to avoid. It just depends on what you want. If you don't want to scale the three tiles proportionally, then you have to tell the computer what you do want.
... View more
06-16-2020
05:14 AM
|
0
|
0
|
591
|
POST
|
Unfortunately, the video link above doesn't work for me, so I can't see the "bad effect" that you mention. It says the video is unavailable because it is private. Although the images are nice, I'm not exactly sure what your desired goal is. I can guess that 1 is bad because it makes some elements too small and that 2 is bad because it abruptly cuts the tiles at the end. However, I don't understand what is wrong with 3. Questions: (1) What is your desired output for the red, green, and blue tiles when your facade width is short, medium, and long? (2) What is the cga code used to generate your examples 1, 2, and 3? If I were to make a guess, I think you have a pattern which should be about 15m, and you would like to repeat this pattern across a facade of any width such that the pattern stays as close to 15m as possible. The ratios between the tiles in the pattern should also be kept. The pattern consists of a blue tile on the left, a green tile in the middle, and a red tile on the end, where the green is about 75% of the size of the red one, and the blue is about 50% of the red one. In this case, I would use a repeating split that splits out pieces that are approximately 15m (your pattern width). Then, for each pattern piece, do another split that splits it into blue, green, and red tiles. Facade -->
split(x) { ~15: Pattern }*
Pattern -->
split(x) { ~0.5: color(0,0,1) Blue
| ~0.75: color(0,1,0) Green
| ~1: color(1,0,0) Red }
In order to avoid extremely small tile pieces, you could also put a case statement in the Facade rule to check if the width is larger than some minimum threshold before doing the split.
... View more
06-08-2020
09:46 AM
|
1
|
3
|
591
|
POST
|
To see errors, open the Problems view (Window -> Problems). Or, hover the mouse over the red X icon next to the line of code on which the error appears to see the error message. In your screenshot, there are errors because the rules LFootprint and LShape are defined twice. They can only be defined once.
... View more
06-04-2020
05:11 AM
|
0
|
0
|
391
|
POST
|
These are only warnings (not errors). They are ok. Your code will still run. They just say that the functions being defined in these lines are not being used (yet). Later in the tutorial, you add more lines of code which use wall_tex, dirt_tex, etc.
... View more
06-04-2020
04:30 AM
|
0
|
0
|
329
|
POST
|
This is a duplicate post. See this post: https://community.esri.com/message/924919-how-can-i-transfer-the-yard-area-to-the-sign#comment-925667
... View more
04-29-2020
12:18 AM
|
0
|
0
|
423
|
POST
|
The operation set() only sets the attribute for the shape in the derivation shape in which it is set and its descendants. This means, that the value that was set, the yard area in your case, is only set in the Yard shape. Other shapes in the tree do not know about this value. Therefore, instead of creating Sign in the Parcel rule, move it to the Yard rule after the set is called. Also, to print text in the viewport, you might want to use ESRI.lib/rules/General/Text.cga.
... View more
04-29-2020
12:16 AM
|
1
|
1
|
565
|
DOC
|
I think instancing should be supported as long as the geometry was not changed after the i() operation. You can use geometry.isInstanced() to check. geometry function—CGA | Documentation There is more info in Beni's post here: https://community.esri.com/message/918486-datasmith-unreal-engine#comment-920483 in which he references a blog post which describes how to use i() to insert an obj, export with instancing, and replace those assets in Unreal: https://community.esri.com/docs/DOC-13480-from-cityengine-to-unreal-engine-the-journey-from-first-design-steps-to-high-q…
... View more
04-22-2020
09:33 AM
|
0
|
0
|
27290
|
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
|