POST
|
Adding to what Jonas suggested, for option 2, I'd also recommend putting the setupProjection in HangarFront before the facade is split, as shown below. To get the texture alignment so the bricks are horizontal, you could use alignScopeToGeometry to align the scope to the lowest edge (which happens to be horizontal in your case) before using setupProjection. I added a rotateScope after the extrude in HangarDoorStorage just to make it more intuitive to select the appropriate faces in the subsequent comp, but this is optional. Here is what I changed in your code above. const facadeTexWidth = 15
const facadeTexHeight = 15
HangarFront -->
setupProjection(0, scope.xy, facadeTexWidth, facadeTexHeight)
split(x) { 4: X
| ~3: split(y) { ~10: Door | 5: X }
| 4: X }
HangarDoorStorage -->
extrude(10)
rotateScope(-90, 0, 0)
comp(f) { top: setupProjection(0, scope.xy, facadeTexWidth, facadeTexHeight) X
| side: Wall_AlignToLowestAndTexture }
RoundedRoofComp -->
comp(f) { object.back: X
| object.front: Wall_AlignToLowestAndTexture
| object.top: Y }
Wall_AlignToLowestAndTexture -->
alignScopeToGeometry(zUp, any, world.lowest)
setupProjection(0, scope.xy, facadeTexWidth, facadeTexHeight)
X
X -->
texture("builtin:uvtest.png")
projectUV(0)
... View more
06-06-2023
03:56 AM
|
0
|
0
|
273
|
POST
|
Tutorial 6, which shows how to create a textured building facade with windows, might be of interest. https://doc.arcgis.com/en/cityengine/latest/tutorials/tutorial-6-basic-shape-grammar.htm
... View more
06-05-2023
06:59 AM
|
0
|
0
|
659
|
POST
|
Sorry, there isn't a bevel operation, so there's no easy way to do this currently. A hacky way (not recommended) might be to comp the edges, insert cylinders on the edges, and cut the faces of your cube accordingly so it aligns with the width of the cylinder you chose.
... View more
03-15-2023
06:36 AM
|
0
|
0
|
190
|
POST
|
As @DevinLavigne said, inserting a 3D asset for the arch is the easiest way. I would also recommend this. But, if you really want to make it in cga, here's one way you could do it using extrude(world.up.flatTop, Height). This code does not include the top face when it aligns perfectly with the top of the arch since it looks like you don't need it in your example. However, if you want to add that face on top, then uncomment the code for CreateTopArchFace which is commented out below. @Order(1)
@Range(min=0, max=20, stepsize=1, restricted=false)
attr Height = 10
@Order(2)
@Range(min=0, max=10, stepsize=1, restricted=false)
attr Arch_Height = Height
@Order(3)
@Range(min=3, max=100, stepsize=1, restricted=false)
attr Num_Segments = 16
Generate -->
primitiveCylinder(2*Num_Segments)
r(90, 0, 0)
s('1, scope.sz, 2*Arch_Height)
t(0, 0, '-0.5)
split(z) { ~1: Arch | ~1: NIL }
Arch -->
comp(f) { front: NIL | side= ArchFaces }
# CreateTopArchFace
ArchFaces -->
extrude(world.up.flatTop, Height)
# CreateTopArchFace -->
# case Height==Arch_Height:
# comp(f) { floor(Num_Segments/2)+2: TopArchFace. }
# else:
# NIL
... View more
03-15-2023
06:08 AM
|
0
|
0
|
251
|
IDEA
|
01-29-2023
11:27 PM
|
0
|
0
|
607
|
IDEA
|
01-29-2023
11:27 PM
|
0
|
0
|
721
|
POST
|
Hi @DevinLavigne , I am new to city engine and also trying to develop realistic model of a future park like Alicia. For me Placing the equipment's is challenging, still working on it. By chance do you have any example CGA rule for that?
... View more
01-29-2023
10:21 PM
|
0
|
0
|
368
|
POST
|
Thank you Thank you This is what i was looking for Really really thank you
... View more
12-14-2022
09:20 PM
|
0
|
0
|
467
|
POST
|
Yes, it is possible to do this with occlusion queries. After creating your red buildings in PortaloTuris, check to see if they overlap with anything else. PortaloTuris -->
primitiveCube
s(10,5,5)
color("#ff0000")
CheckPortaloTuris
CheckPortaloTuris -->
case overlaps():
NIL
else:
KeepBuilding It's also possible to use labels. For example, if you want to only check if they occlude with the white buildings (and it doesn't matter if they occlude with other red buildings), then use a label in the occlusion query, and put a rule onto the white buildings which assigns the label. const occluderLabel = "WhiteBuilding"
CheckPortaloTuris -->
case overlaps(inter, occluderLabel):
NIL
else:
KeepBuilding
// assign this rule to the white buildings
WhiteBuilding -->
label(occluderLabel)
... View more
12-14-2022
07:18 AM
|
1
|
0
|
597
|
POST
|
Thank you for the information. I will consider it in my future work.
... View more
12-13-2022
06:09 AM
|
0
|
0
|
549
|
POST
|
Hi David! Im having problem in CityEngine and the video you mentioned is very helpful to me! ("splitting parcels appropriately for Transit Oriented Development simulations") But I'm still confused about how to divide parcels into lots in Python like the picture below? Can you give some suggestions or even python code? Thanks a lot!
... View more
10-18-2022
03:38 AM
|
0
|
0
|
906
|
POST
|
What Jonas says is correct. There also is another way to use csv files without python. You could store your attribute settings in the csv file. Then, in cga code, you could read the csv file using readStringTable() and set rule attributes according to what's in the csv file.
... View more
10-04-2022
04:29 AM
|
0
|
0
|
334
|
POST
|
Here is some code that does what you suggested (rotate and split a cylinder). It assumes the building footprint is rectangular. @Order(1)
@Range(min=0, max=20)
attr eave_height = 10
@Order(2)
@Range(min=0, max=20)
attr roof_height = 5
@Order(3)
@Range(min=3, max=32, stepsize=1)
attr num_hangar_divisions = 8
Lot -->
extrude(eave_height) Mass.
comp(f) { top: HangarRoof }
HangarRoof -->
alignScopeToGeometry(zUp, any, longest)
rotateScope(0, 0, 90)
primitiveCylinder(2*num_hangar_divisions)
s('1, '1, 2*roof_height)
t(0, 0, '-0.5)
split(z) { ~1: NIL | ~1: HangarRoof. }
... View more
10-03-2022
06:59 AM
|
1
|
0
|
302
|
POST
|
Hi @JørnKristiansen May I know this is solved with using only interpolate shape tool? I have similar issue that i need to generate tower and lines from the point using rpk rules. but the elevation for the model generated keep not align with the ground
... View more
08-08-2022
07:48 PM
|
0
|
0
|
1023
|
POST
|
Hi, I using the same code above so to select different land uses. In my case, I have multiple shapes with the same name (for example buildings, gardens, etc.) but when I choose one of the names, only one shape is chosen. Any idea? Thanks.
... View more
12-16-2021
10:39 AM
|
0
|
0
|
1023
|
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
|