|
POST
|
Are you generating double faces in your CityEngine models, such as two faces that are exactly on top of each other so that they fight to be rendered on the screen (z-fighting)? This can happen for example if you create a floor plane for the floor but also do some reporting on the floor in a different rule. The geometry generated by the reporting rule can be eliminated by terminating the rule with NIL. Or, there might be a bug at certain zoom levels. If you zoom out, do you still get this problem? If you zoom in to the closest zoom level, do you see the problem? Do you get different colors if you re-export the slpk and create a new scene viewer scene? If the problem is not fixed by the comment in the first paragraph (z-fighting), then would you mind posting your code and your CityEngine scene (.cej) file?
... View more
11-14-2017
03:09 AM
|
0
|
2
|
2554
|
|
POST
|
There is also a blog post: GIS2VR: From CityEngine via Unity to HTC Vive | ArcGIS Blog
... View more
11-13-2017
05:19 AM
|
1
|
0
|
1720
|
|
POST
|
Actually, the help doc is not updated with regards to supported file types for the i() operation. FBX files are supported and can be used in the i() operation. I just tried this, and it worked for the test model I found, but I'm not sure if the multiple UV sets also work. Please let me know if you have problems with the multiple UV sets when inserting fbx files using i(). Thanks. Sorry for the confusion.
... View more
11-13-2017
05:08 AM
|
1
|
1
|
2643
|
|
POST
|
Good point. I see how this is problematic. No, sorry, the i() operation only works for OBJ and DAE files, not FBX. See the section "Supported Asset Formats": i Operation
... View more
11-13-2017
04:48 AM
|
0
|
2
|
2643
|
|
POST
|
This is a good idea to use the first scatter to get the clusters and then for each cluster perform another scatter to get the plants. You can create a surface around each cluster point and then perform the next scatter on that. The following code creates 3 cluster points and, for each cluster, inserts a 10x10m quad surface on which a subsequent scatter is performed to get 6 points per cluster. Lot -->
scatter(surface, 3, uniform) { Cluster }
Cluster -->
s(10,0,10)
center(xz)
primitiveQuad
scatter(surface, 6, gaussian) { Point }
... View more
11-13-2017
04:33 AM
|
1
|
0
|
2177
|
|
POST
|
In the first image, the house is converted to a shape, which means that the initial shape consists of multiple faces, which are all the faces of the house. The rule performs an extrude, so each face in the initial shape is extruded in the normal direction with a distance of 2 set by the attribute height. In the second image, I'm not really sure how the example was set up, but maybe it looks like the object was inserted but not found so a cube was inserted. Then, the extrude just extruded all six faces in their normal directions. You can insert the house using i() and then use s() to set the size of the scope to the desired height. This code assumes the initial shape is a 2D shape with the width and depth of the building. Lot -->
i("simpleHouse.obj")
s('1, height, '1)
... View more
11-13-2017
04:17 AM
|
0
|
0
|
3482
|
|
POST
|
Why are the faces resulting from the component split on the oval shaped building not split according to the front and sides of the buildling? -> The "front" selector in the comp split might not necessarily select the faces that we think would correspond to the front of the building. In the comp split, front is determined by the scope. The scope of your building is determined by the first edge of your oval shaped footprint. When selecting the footprint, the first edge is shown in orange. You can set the first edge manually (select desired first edge -> Shapes -> Set First Edge). If you select the long edge in the front of the oval shaped building and set it to the first edge, you will probably get what you want from the comp split. Here is the reference page for comp(). Take a look at the images in the example called Selectors 1: Quadrant-based. A comp split has been performed on the sphere, and the faces that are categorized as front are red. Also, note that you can examine the scopes of your shapes using the Model Hierarchy (Window -> Show Model Hierarchy -> Inspect Model). Component Split Operation Is there an operation to smooth out the model? -> No, sorry, there is no operation in cga to smooth a model. You would have to create a model or part of your model in another 3D modeling software such as Maya. Then, you can insert these models into CityEngine using the i() operation. Why does adding the Floor rule break the model? -> In the Floor rule, the shapes Wall and Tile are created. In the Wall rule, Floor shapes are created. This creates an endless recursion. You can see this error in the Problems view (Window -> Show Problems): Maximum derivation depth reached. This means that the endless recursion was cut off at some maximum number of recursion levels.
... View more
11-10-2017
02:02 AM
|
0
|
1
|
3482
|
|
POST
|
What kind of graphics card do you have? Is the driver up to date? CityEngine 2017.x system requirements—Esri CityEngine | ArcGIS Desktop Could you provide more details about what you were doing when the crash happened?
... View more
11-09-2017
05:43 AM
|
0
|
0
|
1054
|
|
POST
|
Could you please check if your license is valid? Open the ArcGIS Administrator -> CityEngine -> Availability -> Authorized should be "Yes". Could you provide more details about what you were doing when the crash happened?
... View more
11-09-2017
04:28 AM
|
0
|
0
|
903
|
|
POST
|
Sorry, there is no function in cga to read a csv file. One workaround would be to write a python script that reads your data file and writes cga string lists. Then, you access your data in cga using the cga string list functions. If you only need to do this once (i.e. your data won't change), instead of a Python script, you can also manually reformat each column of your data into the cga string list format using a bunch of find/replace operations. From the cga help page: Stringlists are a series of strings stored inside one string. The elements are separated by a semicolon (";"). The data type is "string", thus it is not any real type of array as used in other scripting languages. The functions listItem() and listIndex() and listSize() are probably useful in accessing the data in a list. listItem listIndex listSize
... View more
11-09-2017
03:58 AM
|
0
|
1
|
1482
|
|
POST
|
Are you able to export the selected buildings without generating them? On export, the buildings are generated separately from the generation that happens in the viewport, and generation during export is single threaded whereas the generation that you see happening in the viewport is multi-threaded. We would be interested in trying to reproduce this crash. Would you be willing to share your project?
... View more
11-09-2017
03:41 AM
|
0
|
0
|
1455
|
|
POST
|
You can create a wrapper rule for the Building_From_OpenStreetMap.cga rule in order to define your own styles. In your style, you can control the height of the buildings. You cannot set the max height of a building, but you can set the number of floors and the floor height. This wrapper rule can be placed in any project; it does not need to be in the ESRI.lib folder. For example, here is a wrapper rule that defines a style called MyStyle which creates buildings with a random number of floors in the range [20,100] (if the height is not specified already by an object attribute from OSM data). The number of floors is set by setting the attribute estimatedLevels on line 73. In the Style section, you can add your own style which sets any of the attributes that start with "estimated". Do not make changes to the Hidden Attributes section. import Building_From_OpenStreetMap:"/ESRI.lib/rules/Buildings/Building_From_OpenStreetMap.cga"
// ------------------------------
// Hidden Attributes
// ------------------------------
@Group("From Object Attributes", 2)
// from object attributes
@Hidden
attr height = -1
@Hidden
attr building__levels = -1
@Hidden
attr roof__height = -1
@Hidden
attr roof__shape = ""
@Hidden
attr building__colour = ""
@Hidden
attr roof__colour = ""
@Group("Estimated Attributes (can be set by styles)", 3)
// Note: These attributes can be overriden by styles.
// estimated attributes based on default values or overriden by styles
@Hidden
attr estimatedLevels = Building_From_OpenStreetMap.estimatedLevels
@Hidden
// possible options: "flat", "shed", "pyramid", "gable", "hip", "half-hip", "gablet", "gambrel", "mansard", "gambrel-flat", "mansard-flat", "vault", "dome", "saltbox", "butterfly"
attr estimatedRoofForm = Building_From_OpenStreetMap.estimatedRoofForm // when no obj attr roof__height
@Hidden
// possible options: "flat", "shed", "pyramid", "gable", "hip", "half-hip", "gablet", "gambrel", "mansard", "gambrel-flat", "mansard-flat", "vault", "dome", "saltbox", "butterfly"
attr estimatedNonFlatRoofForm = Building_From_OpenStreetMap.estimatedNonFlatRoofForm // when obj attr roof__height>0
@Hidden
attr estimatedFloorHeight = Building_From_OpenStreetMap.estimatedFloorHeight
@Hidden
attr estimatedNonFlatRoofHeight = Building_From_OpenStreetMap.estimatedNonFlatRoofHeight
@Hidden
// possible options: "extrusion", "setback top", "setback facade", "setback base", "setback everywhere"
attr estimatedBuildingForm = Building_From_OpenStreetMap.estimatedBuildingForm
@Hidden
// format: hex color string
attr estimatedBuildingColor = Building_From_OpenStreetMap.estimatedBuildingColor
@Hidden
// format: hex color string
attr estimatedRoofColor = Building_From_OpenStreetMap.estimatedRoofColor
@Hidden
// possible options: "realistic with facade textures", "schematic facades", "solid color"
attr estimatedRepresentation = Building_From_OpenStreetMap.estimatedRepresentation
// ------------------------------
// Start Rule
// ------------------------------
@StartRule
Lot -->
Building_From_OpenStreetMap.Generate
// ------------------------------
// Styles
// ------------------------------
// Add your own styles here by setting the attributes that start with "estimated"
style MyStyle
attr estimatedLevels = rint(rand(20,100))
Apply this wrapper rule to your building footprints and choose the style MyStyle. Note that you cannot choose one of the preset styles in the Building_From_OpenStreetMap file, such as GenericMediumTown, NewYork, or Vancouver. The Building_From_OpenStreetMap style must be set to the Default Style. Otherwise, the style chosen in Building_From_OpenStreetMap will take precedence over any style set in the wrapper file.
... View more
11-09-2017
03:28 AM
|
1
|
0
|
1340
|
|
POST
|
After comparing the buildings at 14:06 (before height adjustment) to the buildings at 14:09 (after height adjustment), it seems like the buildings are constructed procedurally in the rules. New floors are added when the height is increased to 30. Assets, like the window decorations, can be inserted in the rules using the i() operation, giving the models more complexity. However, it is possible to insert models of buildings, but there's a limit to what you can do with them. Changing the height will only stretch the model. But, you can prepare setbacks on a lot and control the location where the building is inserted. This is done in the Instance City Example. (Help -> Download Tutorials and Examples).
... View more
11-08-2017
08:47 AM
|
0
|
0
|
3482
|
|
POST
|
Sorry, multiple UV sets are not supported yet for Collada files. However, multiple UV sets should be supported for FBX files.
... View more
11-08-2017
06:57 AM
|
0
|
4
|
2643
|
|
POST
|
I made an even simpler example for you, which works for me. Does this work for you? 1) Create a new scene 2) Draw two rectangles 3) Add an object attribute called type to both shapes and set one shape's value to "residential" and the other shape's value to "office". (Inspector -> Object Attributes) 4) Apply this rule to the shapes. attr type = ""
Lot -->
extrude(10)
report("Type", type) 5) Note that, in the Inspector, the rule attribute called 'type' is connected to the object attribute called 'type'. If it is not connected, connect them. Click on drop down arrow next to type -> Connect Attribute -> Object attribute. Also note that the report Type appears in the Reports section of the Inspector with the correct value for each shape. 6) Select both shapes 7) File -> Export models -> Esri Scene Layer Package -> Make sure 'Emit Reports' is checked -> Next -> Feature Granularity = One Feature Per Shape -> Finish 😎 Right click on slpk file in models folder -> Share As -> Upload package to my ArcGIS Online or Portal account -> Share 9) In Navigator, click on second icon along the top to go to your account and see the slpk you just made. Right click -> Open in browser. Or, sign on to ArcGIS Online in your web browser and view your Content to see the slpk file you just made. Select this file. 10) In the browser, in your ArcGIS Online account, click on the slpk file -> Publish -> Open in Scene Viewer In the Scene Viewer, when a building is selected, the type reported is also displayed in the popup window.
... View more
11-08-2017
06:46 AM
|
0
|
3
|
2914
|
| 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
|