|
POST
|
To get facade data, you'll have to collect it from somewhere, whether you buy it from another source or take the photos of facades yourself or find another way to get a set of images. Depending on your images, you might need to process them, for example, to make the facades straight or crop out unwanted bits. Image processing software like Photoshop may be a solution, and CityEngine offers some basic cropping and alignment functionality. Right click on image -> Crop image. This opens a tool that lets you crop an image and fix the alignment so that things that should be horizontal are horizontal. This helps adjust an image with perspective (where horizontal lines are slanted), for example. Then, as you mentioned, the tutorials and examples show how to use the facade images as textures.
... View more
11-02-2016
05:17 AM
|
0
|
0
|
597
|
|
POST
|
No, you cannot set an opacity value specifically for the dirtmap. As you found out, the opacity will affect both the colormap and the dirtmap. I'm afraid the solution would be to change your dirtmap image. Since the colormap and dirtmap are multiplied to get the end result, I'm guessing that if you make the values closer to 1 and decrease the contrast in your dirtmap, you might get what you're looking for. For the bumpmap, the texture layer is 1, so it should be projectUV(1).
... View more
11-02-2016
04:53 AM
|
1
|
1
|
793
|
|
POST
|
The splitArea function doesn't necessarily have to define an explicit number of splits. You could say, for example, split a lot into equal area pieces that are close to 100m^2 in area: splitArea(x) { ~100 : Piece }* I'm not sure what you mean by "recognizing resulting subdivisions". Once you do a split, you can perform other operations on the resulting pieces. I'm also not sure what subdivision algorithm you are referring to. Maybe you are interested a recursive subdivision algorithm? You can also write a rule that recursively subdivides a lot into pieces. Depending on what you want exactly, it could be possible to write a rule to perform the subdivision using splits or splitArea operations.
... View more
11-01-2016
07:54 AM
|
0
|
0
|
522
|
|
POST
|
If you have an attribute in the parent class, you can "pass" it to the child class (this actually happens by default unless you tell it not to). Sorry, "passing" is not the right word here. If an attribute x is defined in the parent class (attr x = 10), and the child class also has an attribute x (attr x = 20), then the parent's value will overwrite the child's value unless you tell it not to overwrite it, and the value will be 10. The details can be found here: import I would recommend upgrading to 2016.1 especially when using imports since several issues were fixed regarding imports and attribute propagation. CGA Changelog
... View more
11-01-2016
03:00 AM
|
0
|
1
|
2280
|
|
POST
|
What version are you using? There was a bug in 2016.0 (and possibly earlier) with attribute passing on second level imports, and it may or may not be related to this. This should be fixed in 2016.1 though.
... View more
10-31-2016
06:48 AM
|
0
|
3
|
2280
|
|
POST
|
Yes, you can have CE 2015 and CE 2016 open at the same time. However, they need to point to different workspaces. Yes, LR is correct. The message about ESRI.lib appears when a workspace set up for CE 2016 is accessed by CE 2015, for example. If you want to go backwards in version, I would recommend having different workspaces for each version of CityEngine since ESRI.lib might not be compatible between the versions. In fact, different workspaces are necessary if you want to run both version simultaneously. If you don't want to ever go backwards or open multiple versions at the same time, then maybe having one workspace that keeps getting updated is fine.
... View more
10-19-2016
03:02 AM
|
0
|
0
|
824
|
|
POST
|
No, you cannot change the colors of these faces in the preferences. The faces with reversed normals appear black when you have single sided lighting enabled (viewport settings icon, top right corner of viewport -> single sided lighting). However, one solution could be to apply a rule that colors all faces red. Then, when single sided lighting is enabled (and the scene light is off), then the faces with reversed normals will be black while all other faces will be red. Maybe this will give you the contrast you want.
... View more
10-19-2016
02:39 AM
|
0
|
0
|
662
|
|
POST
|
Yes, I would suggest the same approach as LR. Perhaps you could use the occlusion tests (i.e. inside, overlaps) to color your objects.
... View more
10-18-2016
12:56 AM
|
0
|
0
|
518
|
|
POST
|
Actually, there is a relatively new feature called Get Map Data in CityEngine 2016.0 and 2016.1 (the two most recent versions). This allows you to create 3D city models quickly and easily from OSM data. Maybe this tool will work for your needs? You can select a region on a map, and it automatically downloads the basemap, elevation data, and OSM data (building footprints and/or street networks) and aligns it all. In 2016.1, there is a rule already assigned to the footprints, so you can just select them all and generate. File -> Get Map Data search for your city -> select a region on the map choose a basemap check the box to download elevation data (if you want it - needs arcgis organizational account) check the box(es) to download OSM data (polygons for building footprints, networks for streets) select all building polygons -> generate Check out the help page for more detailed instructions: Get map data from ArcGIS Online / Portal
... View more
10-18-2016
12:30 AM
|
0
|
0
|
2662
|
|
POST
|
Yes, perhaps there is a way with python and reports and such. I just haven't tried anything in this direction, so I don't have a workflow to recommend.
... View more
10-17-2016
11:57 PM
|
0
|
1
|
2651
|
|
POST
|
Imagine a cube with six sides. Each of the six sides has a normal that points outwards. That means, if you take the bottom part of the cube to be the floor and the top part of the cube to be the ceiling, then the normal for the floor points down, and the normal for the ceiling points up. With backface culling, you would only see the outsides of the cube, and you wouldn't see anything if you were inside the cube looking outwards. So, if the floor has a normal pointing downwards, you would only see the floor if you looked at it from below. You would only see the ceiling when you look down at it from above. You can apply reverseNormals to both the floor and the ceiling so that the normals point inwards (relative to the cube we are imagining). That way if you were standing in the cube, you could see both the floor and the ceiling. Note that I didn't look at the code, but this is in general how normals would work if you imagine a cube scenario.
... View more
10-17-2016
06:36 AM
|
1
|
0
|
3403
|
|
POST
|
It is not possible for a shape to get information about another shape in another branch of the shape tree (except in the case of occlusion testing which happens behind the scenes when you use the occlusion functions). As David mentions, you can however try to set some attributes that you can access in the same branch of the tree. Or, you can globally set variables if you know the information ahead of time. Sometimes python gives you more functionality than what you can get with just CGA, but in this case I don't see a straightforward way to do this with python. By setting variables in the same branch of the tree, I rewrote your code so that FP3 has the same volume as FP. @Hidden attr b1Area = 0 const lotArea = geometry.area const b1Height = 9 Lot --> split(x) { ~1: FP2 | ~1: FP } FP --> extrude(b1Height) B1. print(geometry.volume) FP2 --> set(b1Area, lotArea - geometry.area) split(z) { ~1: FP3 | ~1: OpenSpace } FP3 --> extrude((b1Area*b1Height)/geometry.area) print(geometry.volume) OpenSpace --> color(0,1,0) Your second question about getting the area of the polygon minus the area of the footprints is also a difficult problem. In general, I don't think this is possible because CityEngine cannot do boolean intersections. Python won't help with this.
... View more
10-17-2016
06:27 AM
|
1
|
3
|
2651
|
|
POST
|
I agree with Micah. Maybe it is similar to this posting? How do I fix the flickering facade?
... View more
10-17-2016
04:33 AM
|
1
|
0
|
1043
|
|
POST
|
You can open other applications using python and pass parameters to them. For example, this opens notepad.exe: import subprocess
subprocess.Popen('start notepad.exe', shell=True) This opens notepad.exe with another filename as an argument: subprocess.Popen('start notepad.exe "C:\Users\<username>\Desktop\myParameters.py"', shell=True) No, you cannot open another window within CityEngine similar to the Dashboard, but you can open other applications outside of CityEngine using the code above. In the future, please start new GeoNet posts for new topics. Trim planes are set on operations like comp. This helps trim geometry like ledges that go around buildings so that they meet up correctly at the corners. Please see the visual diagrams in the examples section called "Trim planes" on the comp help page: Component Split Operation . To enable or disable trim planes, you can set the vertical or horizontal trim planes to true or false: split Shape Attribute . The trim operation will then apply the cut along the trim plane to the current geometry.
... View more
10-17-2016
03:32 AM
|
0
|
1
|
2270
|
|
POST
|
Yes, it's true. File path info is either missing or really hard to find in the help pages. We'll try to add this info to the help pages. Thanks for pointing this out. Thanks, Matt, for explaining it all quite well.
... View more
10-14-2016
06:48 AM
|
1
|
0
|
1032
|
| 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
|