|
POST
|
What exactly is the problem you see when you generate? Is there an error in the log (Window -> Show Log) or problems view (Window -> Show Problems)? The recursion completes when I generate the code. I checked the Model Hierarchy (Window -> Show Model Hierarchy -> Inspect Model), and all 13 calls to DistributePlant are there, and each call to DistributePlant creates the appropriate TREE shape, so I don't see a problem.
... View more
11-27-2017
05:25 AM
|
0
|
3
|
1114
|
|
POST
|
Handles only work on attributes. In order to use handles, you would have to redesign the code so that you have attributes for the quantities that you want to have handles for. For example, you could put a handle on the attribute nFloors and then set the handle to use the shape which is the mass of the building which is extruded to the correct height. As for the seedian, again, I don't think setting it will get you what you want, but maybe you see a way of getting it to work for you. You can set it in cga code using set(). set Operation This sets the seedian to the value 123456, for example. set(seedian, 123456)
... View more
11-27-2017
04:25 AM
|
0
|
0
|
2076
|
|
POST
|
Handles were first introduced in 2015.0, but they have been updated and extended since then. Here is a tutorial on handles and some pages from the help doc: Tutorial 18: Handles—CityEngine Tutorials | ArcGIS Desktop Handles Creating Handles Handles are only available on attributes. The seed is not really a function but rather a number that belongs to the shape. In cga code, you can get and set this number using the seedian shape attribute. seedian Shape Attribute
... View more
11-24-2017
12:32 AM
|
0
|
2
|
2076
|
|
POST
|
Here's a post where Eric describes what he did: https://community.esri.com/message/674534-re-pipe-in-manhole-rule-of-the-week-example#comment-674534
... View more
11-24-2017
12:21 AM
|
1
|
1
|
2269
|
|
POST
|
If the initial shape is the large space which is divided up into the 4x5 grid, then trying to select one of the 20 individual cells is not possible in the normal selection mode. The whole large shape will be selected, and then all 20 lots will be regenerated with different random numbers. When updating the seed using Ctrl+Shift+G, the seed for the whole shape will be changed, so this will change your type assignment on the grid cells no matter what, which I think is not what you want. To make changes to an individual cell, I would recommend using the local edits mode, which can be found on toolbar or accessible through the keyboard shortcut O. You would have to create an attribute for the building height, put a handle on it, and then you can change the height of each individual building that you can select in local edits mode. @Handle(shape=Mass)
attr building_height = 10
GridCell -->
extrude(building_height)
Mass
Here is a tutorial on local edits (only available starting with 2017.0). Tutorial 20: Local edits—CityEngine Tutorials | ArcGIS Desktop
... View more
11-23-2017
06:46 AM
|
0
|
4
|
2076
|
|
POST
|
You could reduce the complexity of a model using the reduceGeometry() operation, or you could do this in another 3D modeling software. reduceGeometry Operation
... View more
11-23-2017
05:35 AM
|
0
|
1
|
3571
|
|
POST
|
This sounds like a z-fighting issue. This means that there are two shapes being rendered on top of each other at the same exact location. It might help to use the Model Hierarchy (Window -> Show Model Hierarchy -> Inspect Model), which will allow you to go through the shape tree. Double clicking on the shape in the shape tree will bring you to the corresponding rule in the rule file.
... View more
11-22-2017
09:15 AM
|
0
|
1
|
730
|
|
POST
|
If you are getting z-fighting in CityEngine, I would recommend using the Model Hierarchy to click through your shape tree to see if there are two terminal shapes that try to render the same floor. Then, you can try to figure out where in your rules you'd have to make changes in order to prevent two terminal shapes from creating the same floor with different colors. For the Scene Viewer, there will always be problems with the terrain and the ground floor. Unfortunately, extruding floors by 1.3m is a lot, and I would say this is undesirable. Maybe it would be possible to use the Align Shapes to Terrain tool in CityEngine to better align your initial shapes to the terrain? This may help, but it also may not entirely fix the problem. You can check out the options. If you use a "Translate" option, then the initial shape will not be distorted, and if you use a "Project" option, then vertices of the shape would be projected to the terrain resulting in an initial shape that is probably not planar. You might want to project the shapes to better fit the terrain, but you might have to modify your rules to work with non-planar shapes (or maybe the rules will just work without modification). Aligning Shapes to the Terrain
... View more
11-22-2017
09:00 AM
|
0
|
0
|
372
|
|
POST
|
What is in the .mtl file? What should the tree look like? Can you post the model (eg. .obj, .mtl, and related texture files)?
... View more
11-22-2017
07:50 AM
|
0
|
4
|
3571
|
|
POST
|
This blog post describes a step by step procedure for viewing your data in virtual reality: GIS2VR: From CityEngine via Unity to HTC Vive | ArcGIS Blog
... View more
11-20-2017
03:58 AM
|
1
|
3
|
1406
|
|
POST
|
Maybe the z-fighting with the ground is not the problem. 0.1m might still be small. What happens if you raise it a very large amount? Does the problem ever go away (when increasing the elevation by some large enough amount)? Instead of raising the shapes by a certain offset, you could also try extruding the ground shapes to give them a certain volume. Then, they can be on the ground, and they'll have a thickness, similar to real life. When you say that there seems to be a conflict with the "ground surface", what do you mean by this? How are you making the ground surface? Does this imagery just come from the base map? Are the colors you see a mixture of the base map and the colors of the buildings from CityEngine? What happens if you try to export your CityEngine buildings with different colors? What kinds of colors do you see? Can you try to confirm that the problem is z-fighting between the CityEngine buildings and the base map?
... View more
11-20-2017
12:56 AM
|
0
|
3
|
2554
|
|
POST
|
You could try to use the rules in ESRI.lib, which comes with CityEngine, to apply textures to the buildings. The Building_From_Footprint.cga rule is meant to be applied to 2D building footprints. The Building_Mass_Texturizer.cga rule is meant to be applied to 3D building models. So, based on your initial shape, you can choose one of these rules. These rules will use the textures in ESRI.lib.
... View more
11-17-2017
02:11 AM
|
0
|
1
|
2166
|
|
POST
|
Oh, I thought the light gray background was another building that you had created yourself. Ok, in this case, it seems like it is just the background, or base map. (Note: In the Scene Viewer, you can switch the base map using the controls on the right side.) It also looks like your CityEngine scene is located at y=0, where the grid is visible. In the scene viewer, there is z-fighting between the base map and your models. To fix this, you should add a small elevation to your models in CityEngine before you export. One way to do this is to select all your models and use the move tool to either manually move them by pulling on the green axis handle or type in the amount you want to move the models in the edit box in the tool bar. For example, you could try to type in: 0 0.1 0. This will move your models 0.1m in the y direction.
... View more
11-17-2017
01:41 AM
|
0
|
5
|
2554
|
|
POST
|
It looks like there is z-fighting going on with the light gray building that the smaller rooms are on top of. I almost certain this is the problem. The rule you posted seems to only generate the rooms, and I don't think this rule is the cause of the problem. How did you make the light gray buildings? You could try to either lower the light gray plane of the gray building or raise the elevation of the small rooms by a small amount. Are the colors incorrect? For example, if one floor is supposed to be blue, is the flickering color blue, or is it a completely different color? (I would like to know if the colors are incorrect because this would be an indication of a bug.) Note: In your rule, there are still places where you could theoretically get z-fighting. The AddOutline rule ends up creating the floor with the desired color. However, for the rules Lot, Elevator, and StairMaster, it is possible to terminate with some shapes that are not NIL-ed. But, this is not the problem. If you have z-fighting due to the rule, you would see it in CityEngine too. It would also flicker in CityEngine when you move the camera around. Note: If your Lot rule is executed, then normals would be reversed, but only for the shape that follows the shape tree to Lot. This would not reverse normals for the shapes that proceed through the shape tree to the other rules AddOutline, Report, Elevator, and StairMaster. The important idea I'm trying to say is that when rules are executed, a shape tree is created, and the terminal shapes of the shape tree contain the geometry that you see in the viewport. You can use the Model Hierarchy to visualize the shape tree (Window -> Show Model Hierarchy -> Inspect Model -> click on model). Rule Application Standard Rule Working with the Model Hierarchy Explorer
... View more
11-16-2017
05:14 AM
|
0
|
0
|
2554
|
|
POST
|
I'm glad you were able to get it to work with the simple example. Once you have a simple example working, you could add more complexity a little at a time, and then hopefully, you'll be able to figure out at which step things stopped working. 1) Yes, you can change the name of the shape by reporting to a report called "name": report("name", "MyNewNameToBeDisplayedInPopupWindow") 2) See your other post: https://community.esri.com/message/728604-face-rendering-in-scene-viewer#comment-728885
... View more
11-14-2017
03:10 AM
|
1
|
1
|
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
|