|
POST
|
Ah, that's a different story . There are a couple of ways to do this, but I think the example below is the least painful one for beginners. Basically, you have an attribute called LOD and its value determines which rule the script uses to generate the building. The rules each contain successively more modeling commands to make more detailed buildings. Make a few shapes and drag the rule onto them, then change their "LOD" value (default = 0). @Range(0,1,2,3)
attr LOD = 0
@StartRule
Lot -->
case LOD == 0: LOD0
case LOD == 1: LOD1
case LOD == 2: LOD2
else: LOD3
LOD0 -->
color("#FF0000")
LOD1 -->
extrude(10)
color("#00FF00")
LOD2 -->
extrude(10)
color("#0000FF")
comp(f){side: X. | bottom: X. | top: Roof}
Roof -->
roofGable(30)
LOD3 -->
NIL
... View more
06-30-2016
06:12 AM
|
2
|
0
|
3217
|
|
POST
|
If the buildings use the same rule, you can simply select them and change their attribute at the same time. If you use a few different rules, you could select one building and select the other buildings that use the same rule through the rightclick menu. If you're using hundreds of different rules, you could change the attribute with Python (assuming they have the same attribute name).
... View more
06-29-2016
06:45 AM
|
2
|
2
|
3217
|
|
POST
|
Assuming you use the median height to extrude, you first have to convert it from feet to meter, since CE only uses that: attr MEDIAN_HEIGHT = 0 #connect this attribute
@Hidden
attr MEDIAN_HM = MEDIAN_HEIGHT/3.2808 #feet to meter
Lot -->
extrude(MEDIAN_HM) If you have faulty data, you could use some case checking to "fix" it, like this: attr MEDIAN_HEIGHT = 0
attr MEDIAN_HM = MEDIAN_HEIGHT/3.2808
attr FixHeight = 10 # in feet
Lot -->
case MEDIAN_HEIGHT == 0: FixBuilding
else: ExtrudeBuilding
ExtrudeBuilding -->
extrude(MEDIAN_HM)
FixBuilding -->
set(MEDIAN_HEIGHT, FixHeight)
ExtrudeBuilding You could also use something like STORIES*storyheight (if it exists) as building height.
... View more
06-22-2016
01:11 AM
|
2
|
1
|
2348
|
|
POST
|
I guess I'll try extracting some image bits and somehow rotating/rectifying them. Also, triangles: Can JAM Project make ANYthing awesome? [Triangles AMV] - YouTube
... View more
06-16-2016
07:55 AM
|
0
|
0
|
1609
|
|
POST
|
Nah, I'm sampling the aerial image used in CE. It gets packed up with the RPK. If I export the models as multipatch, the image is added entirely, once for each shape
... View more
06-16-2016
07:32 AM
|
0
|
1
|
1609
|
|
POST
|
I'm using the same coordinate system across all programs. All the data is in the same cs as well. I thought decimal degree might cause problems but it's the same with meter-based cs too. I tried coming up with a few solutions* but found nothing so far that I'd call acceptable.. *Using world-aligned textures for roofs
... View more
06-14-2016
08:18 AM
|
0
|
6
|
1609
|
|
POST
|
You have to set the selection, under line 5 add this: ce.setSelection(shapes)
... View more
06-09-2016
07:45 AM
|
1
|
0
|
919
|
|
POST
|
You can do script-based exporting*. I did some selection based exporting myself but don't recall being able to pick selection sets. Instead I gave all shapes in the different sets the same Name and used that to selected them (ce.getObjectsFrom --> ce.withName). * http://cehelp.esri.com/help/index.jsp?topic=/com.procedural.cityengine.help/html/manual/export/export_formats_scriptbased.html
... View more
06-09-2016
01:49 AM
|
0
|
2
|
919
|
|
POST
|
I'm using a custom elevation raster (1 meter cell size) for a polygon layer in a scene. When I zoom out, AGP lowers the surface resolution drastically, leading to cut off polygon edges - see GIF below. Can I somehow prevent this? It doesn't happen in ArcScene (which on the other hand doesn't drape the polygon over the surface as nicely as AGP).
... View more
06-07-2016
06:07 AM
|
0
|
1
|
2526
|
|
POST
|
I created a forest on a polygon using the Esri plant distributor rule. Now I need to split the tree group into separate trees for better ground alignment. I can get the separate trees by exporting each leaf shape as feature and then extracting the shape's centroid in ArcMap. However the export unfortunately doesn't give the leaf shapes their corresponding attributes, like tree type or an unique ID. Is there any way I could extract these attributes and make the trees identifiable? I want to preserve model editability so I can't export as multipatch.
... View more
06-03-2016
06:11 AM
|
0
|
0
|
2389
|
|
POST
|
I think you're looking for scope.sx/y/z. Example: Lot -->
extrude(rand(40,60))
comp(f){left: DoSomething}
DoSomething -->
case scope.sy > 50: print ("it's bigger than fifty!")
else: print ("it's not!")
... View more
06-03-2016
02:16 AM
|
3
|
2
|
1620
|
|
POST
|
You can use "restoreBookmark" with Python, no need to delete bookmarks or limit the number. It's not exactly hard to code either. from scripting import *
ce = CE()
if __name__ == '__main__':
vp = ce.getObjectsFrom(ce.get3DViews(), ce.isViewport)[0] #get viewport
vp.restoreBookmark("b1", True) #navigate to bookmark titled "b1"
ce.waitForUIIdle() #wait for animation to finish
vp.restoreBookmark("b99", True) #navigate to bookmark titled "b99"
... View more
06-03-2016
01:59 AM
|
0
|
0
|
621
|
|
POST
|
I've tried every option I could find, including that. The problem seems to be the lack of an ObjectID in the Excel table - after I imported the table into a GDB (which gave the rows an ObjectID), the relate started working as expected. However I'd rather keep the Excel table as source for easy editability. How do (can?) I give it an ObjectID field? Simply making a new column called ObjectID doesn't work. Also an additional related question: I can click on the image path in ArcMap to open the image with the default image viewer (see lightning symbol in the screenshot above). Sadly this functionality doesn't seem to be in AGP. Or is it hidden somewhere? The only way I managed to display the image at all was as thumbnail through the (compared to ArcMap rather limited) custom popup option, unfortunately only with a fixed path. I found out that unlike ArcMap, AGP doesn't use the mxd path as "root" directory, but instead a temp directory (C:/Users/%USERNAME%/AppData/Local/Temp/ArcGISPro5924/). Furthermore, linking to the image with an URL produces the correct link (like file:///path/image.jpg), however clicking the link in the popup doesn't open anything. Copying the link and pasting it in the browser URL bar however does open the image. Could this be caused by browser security settings?
... View more
06-02-2016
05:46 AM
|
0
|
0
|
844
|
|
POST
|
In ArcMap I created a 1:n relation between a point layer (symbolizing drone positions) and an Excel table (containing paths to images taken with the drone) using the "relate" join. With this I can select a drone point and access the various images taken at that location. See attached image, left side. Now I'm trying to replicate this in AGP, but when I select a drone point, only the related table name is shown in the attributes, with no other data visible. If I open the image table on its own, it just shows all contained entries and zero selected. The relate is the same (one to many, with Strecke_Nr as PK/FK). Is this simply not supported yet?
... View more
06-01-2016
11:13 AM
|
0
|
2
|
3596
|
|
POST
|
Try refreshing the project, refreshing preview or deleting the .prvw folders. Update graphics card drivers. Check how much CE uses your GPU (GPU-Z is a pretty good program for that), generate only the buildings that cause problems, maybe update seed and generate. The image dimensions might cause problems as well, try downsizing them.
... View more
05-25-2016
05:54 AM
|
0
|
0
|
2249
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-13-2018 02:05 AM | |
| 1 | 08-08-2016 06:59 AM | |
| 1 | 07-12-2018 09:08 AM | |
| 4 | 04-12-2019 08:20 AM | |
| 1 | 05-17-2016 03:25 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|