Skip to content

Commit ef58896

Browse files
nicozinkgithub-actions[bot]
authored andcommitted
[MAPS3D-1953] Fix procedural building issues with faux facades and facade hints (internal-5966)
GitOrigin-RevId: 1c0d297df00c886b7bc3239b209e473185be7b2f
1 parent 7701ade commit ef58896

File tree

8 files changed

+357
-34
lines changed

8 files changed

+357
-34
lines changed

debug/procedural-buildings.standard.fragment.json

Lines changed: 66 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -137,47 +137,95 @@
137137
"get",
138138
"height"
139139
],
140-
100
140+
5
141141
]
142142
],
143143
"building-facade-floors": [
144-
"/",
144+
"case",
145145
[
146-
"-",
146+
"<",
147147
[
148148
"get",
149149
"height"
150150
],
151+
20
152+
],
153+
[
154+
"/",
151155
[
152-
"get",
153-
"min_height"
156+
"-",
157+
[
158+
"get",
159+
"height"
160+
],
161+
[
162+
"get",
163+
"min_height"
164+
]
165+
],
166+
[
167+
"random",
168+
6,
169+
8,
170+
[
171+
"id"
172+
]
154173
]
155174
],
156175
[
157-
"random",
158-
2,
159-
30,
176+
"/",
177+
[
178+
"-",
179+
[
180+
"get",
181+
"height"
182+
],
183+
[
184+
"get",
185+
"min_height"
186+
]
187+
],
160188
[
161-
"id"
189+
"random",
190+
20,
191+
30,
192+
[
193+
"id"
194+
]
162195
]
163196
]
164197
],
165198
"building-facade-window": [
199+
"case",
166200
[
167-
"random",
168-
0.7,
169-
0.95,
201+
"==",
170202
[
171-
"id"
172-
]
203+
"get",
204+
"roof_type"
205+
],
206+
"parapet"
173207
],
174208
[
175-
"random",
176-
0.5,
177-
1,
178209
[
179-
"id"
210+
"random",
211+
0.7,
212+
0.95,
213+
[
214+
"id"
215+
]
216+
],
217+
[
218+
"random",
219+
0.9,
220+
1,
221+
[
222+
"id"
223+
]
180224
]
225+
],
226+
[
227+
0.5,
228+
0.9
181229
]
182230
]
183231
},

test/ignores/all.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,12 +232,14 @@ const skip = [
232232

233233
"render-tests/building/opacity",
234234
"render-tests/building/faux-facade/building-facade",
235+
"render-tests/building/faux-facade/building-facade-color-theme",
235236
"render-tests/building/faux-facade/emissive-chance",
236237
"render-tests/building/faux-facade/property-update",
237238
"render-tests/building/faux-facade/shadows-supported",
238239
"render-tests/building/faux-facade/skillion-unsupported",
239240
"render-tests/building/faux-facade/window-ao",
240241
"render-tests/building/faux-facade/building-facade-true-with-facade-hint",
242+
"render-tests/building/faux-facade/building-facade-true-without-facade-hint",
241243
"render-tests/building/faux-facade/feature-state",
242244
"render-tests/building/cutoff-fade",
243245

18.7 KB
Loading

test/integration/render-tests/building/faux-facade/building-facade-color-theme/style.json

Lines changed: 136 additions & 0 deletions
Large diffs are not rendered by default.
3.45 KB
Loading

test/integration/render-tests/building/faux-facade/building-facade-true-with-facade-hint/style.json

Lines changed: 29 additions & 16 deletions
Large diffs are not rendered by default.
21.5 KB
Loading
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
{
2+
"version": 8,
3+
"metadata": {
4+
"test": {
5+
"allowed": 0.000374,
6+
"height": 512,
7+
"width": 512,
8+
"operations": [
9+
]
10+
}
11+
},
12+
"lights": [
13+
{
14+
"type": "ambient",
15+
"id": "environment",
16+
"properties": {
17+
"intensity": 0.4
18+
}
19+
},
20+
{
21+
"type": "directional",
22+
"id": "sun_light",
23+
"properties": {
24+
"intensity": 0.6,
25+
"cast-shadows": true
26+
}
27+
}
28+
],
29+
"sources": {
30+
"geojson": {
31+
"type": "geojson",
32+
"data": {
33+
"type": "FeatureCollection",
34+
"features": [
35+
{
36+
"type": "Feature",
37+
"properties": {
38+
"extrude": "true",
39+
"underground": "false",
40+
"source_id": 127046656
41+
},
42+
"id": 127046656,
43+
"geometry": {
44+
"coordinates": [
45+
[
46+
[
47+
11.568937291974436,
48+
48.13246952281412
49+
],
50+
[
51+
11.568937291974436,
52+
48.132286810394845
53+
],
54+
[
55+
11.56931009612731,
56+
48.132286810394845
57+
],
58+
[
59+
11.56931009612731,
60+
48.13246952281412
61+
],
62+
[
63+
11.568937291974436,
64+
48.13246952281412
65+
]
66+
]
67+
],
68+
"type": "Polygon"
69+
}
70+
}
71+
]
72+
}
73+
}
74+
},
75+
"bearing": 25,
76+
"pitch": 65,
77+
"zoom": 19.45,
78+
"center": [11.5691398, 48.1323676],
79+
"layers": [
80+
{
81+
"id": "background",
82+
"type": "background",
83+
"paint": {
84+
"background-color": "grey"
85+
}
86+
},
87+
{
88+
"id": "building",
89+
"type": "building",
90+
"source": "geojson",
91+
"minzoom": 16,
92+
"layout": {
93+
"building-facade": true,
94+
"building-facade-floors": 2,
95+
"building-roof-shape": "parapet",
96+
"building-base": 0,
97+
"building-height": 10
98+
},
99+
"paint": {
100+
"building-color": [
101+
"match",
102+
["get", "building-part"],
103+
"wall",
104+
["hsl", 41, 90, 90],
105+
"roof",
106+
["hsl", 25, 43, 80],
107+
"window",
108+
["hsl", 198, 22.4, 64.1],
109+
"door",
110+
["hsl", 0, 100, 100],
111+
["hsl", 41, 90, 90]
112+
],
113+
"building-emissive-strength": [
114+
"match",
115+
["get", "building-part"],
116+
"door",
117+
2.5,
118+
0
119+
],
120+
"building-ambient-occlusion-intensity": 1
121+
}
122+
}
123+
]
124+
}

0 commit comments

Comments
 (0)