Skip to content

Commit 521fec6

Browse files
brnkhyabhishektrip
authored andcommitted
UV improvements (#755)
* add texture and mesh gen based restrictions to atlas info values * change mid floors to use 1:1 mesh/texture ratio * fill the gaps in new uv/mesh sync system * change column calculation * fix empty space uv coordinates add test and realistic atlas sheets * fix a bug where mid wall segment height calculation was calculated later then it should * fix small texture errors move leftover row to top and use top section reuse leftmost area for empty columns * add missing atlas info * fix a wrong atlas info segment * fix wrong segments in the realistic atlas info asset * change atlas and info files * fix floating point precision issue which caused final mid layer not created * change code structure to create walls one by one instead of all together afterwards * add missing atlas info changes * fix a calculation error in uv modifier that occasionally breaks roof uv calculations * remove auto-calculated properties from atlas info inspector * fix a bug where uv modifier uses two wrong vertices to align texture * fix a bug wheree uv modifier uses wrong vertices to calculate texture direction * fix CitySimulator.unity scene to use proper settings * Fix for normal maps not working. * update realistic buildings textures and atlas info * Revert settings files to match develop. * Update changelog
1 parent 506c64b commit 521fec6

File tree

20 files changed

+661
-545
lines changed

20 files changed

+661
-545
lines changed

documentation/docs/05-changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- Added a **Feature Replacement Modifer** that allows replacement of a vector feature at a given Latitude,Longitude with a supplied prefab. Enables replacing a procedurally generated building at a given Latitude,Longitude with a custom 3D model.
66
- Texturing Style dropdown now allows users to select from prepackaged texture styles or custom, which allows for user-defined texturing.
77
##### Improvements
8+
- Improvements to UV mapping for side walls of extruded polygons when using atlas textures. Enables better handling of leftover areas when creating columns.
89
##### Bug Fixes
910
- Fix issue with UvModifier which caused wrong roof uv positions calculations.
1011
- Fix issue with data fetcher to handle failed connections properly, which caused IndexOutOfRangeException during tile loading/unloading.
479 KB
Loading

sdkproject/Assets/Mapbox/Resources/MapboxStyles/Materials/122751851.png.meta

Lines changed: 77 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdkproject/Assets/Mapbox/Resources/MapboxStyles/Styles/MapboxSampleStyles/Dark/Assets/Atlas/DarkAtlasInfo.asset

Lines changed: 5 additions & 158 deletions
Original file line numberDiff line numberDiff line change
@@ -12,174 +12,20 @@ MonoBehaviour:
1212
m_Name: DarkAtlasInfo
1313
m_EditorClassIdentifier:
1414
Textures:
15-
- TextureRect:
16-
serializedVersion: 2
17-
x: 0
18-
y: 0
19-
width: 0.25
20-
height: 0.25
21-
MidFloorCount: 1
22-
ColumnCount: 3
23-
TopSectionRatio: 0.3
24-
BottomSectionRatio: 0.4
25-
PreferredEdgeSectionLength: 40
26-
FloorHeight: 10
27-
FirstFloorHeight: 12
28-
TopFloorHeight: 12
29-
- TextureRect:
30-
serializedVersion: 2
31-
x: 0.25
32-
y: 0
33-
width: 0.25
34-
height: 0.25
35-
MidFloorCount: 1
36-
ColumnCount: 4
37-
TopSectionRatio: 0.3
38-
BottomSectionRatio: 0.4
39-
PreferredEdgeSectionLength: 40
40-
FloorHeight: 10
41-
FirstFloorHeight: 12
42-
TopFloorHeight: 12
4315
- TextureRect:
4416
serializedVersion: 2
4517
x: 0.5
4618
y: 0
4719
width: 0.25
4820
height: 0.25
4921
MidFloorCount: 1
50-
ColumnCount: 5
51-
TopSectionRatio: 0.3
52-
BottomSectionRatio: 0.4
53-
PreferredEdgeSectionLength: 40
54-
FloorHeight: 10
55-
FirstFloorHeight: 12
56-
TopFloorHeight: 12
57-
- TextureRect:
58-
serializedVersion: 2
59-
x: 0.75
60-
y: 0
61-
width: 0.25
62-
height: 0.25
63-
MidFloorCount: 1
64-
ColumnCount: 6
65-
TopSectionRatio: 0.3
66-
BottomSectionRatio: 0.4
67-
PreferredEdgeSectionLength: 40
68-
FloorHeight: 10
69-
FirstFloorHeight: 12
70-
TopFloorHeight: 12
71-
- TextureRect:
72-
serializedVersion: 2
73-
x: 0
74-
y: 0.25
75-
width: 0.25
76-
height: 0.25
77-
MidFloorCount: 1
78-
ColumnCount: 4
79-
TopSectionRatio: 0.3
80-
BottomSectionRatio: 0.4
81-
PreferredEdgeSectionLength: 40
82-
FloorHeight: 10
83-
FirstFloorHeight: 12
84-
TopFloorHeight: 12
85-
- TextureRect:
86-
serializedVersion: 2
87-
x: 0.25
88-
y: 0.25
89-
width: 0.25
90-
height: 0.25
91-
MidFloorCount: 1
92-
ColumnCount: 2
93-
TopSectionRatio: 0.3
94-
BottomSectionRatio: 0.4
95-
PreferredEdgeSectionLength: 40
96-
FloorHeight: 10
97-
FirstFloorHeight: 12
98-
TopFloorHeight: 12
99-
- TextureRect:
100-
serializedVersion: 2
101-
x: 0.5
102-
y: 0.25
103-
width: 0.25
104-
height: 0.25
105-
MidFloorCount: 1
106-
ColumnCount: 1
107-
TopSectionRatio: 0.3
108-
BottomSectionRatio: 0.4
109-
PreferredEdgeSectionLength: 40
110-
FloorHeight: 10
111-
FirstFloorHeight: 12
112-
TopFloorHeight: 12
113-
- TextureRect:
114-
serializedVersion: 2
115-
x: 0.75
116-
y: 0.25
117-
width: 0.25
118-
height: 0.25
119-
MidFloorCount: 1
120-
ColumnCount: 11
121-
TopSectionRatio: 0.3
122-
BottomSectionRatio: 0.4
123-
PreferredEdgeSectionLength: 40
124-
FloorHeight: 10
125-
FirstFloorHeight: 12
126-
TopFloorHeight: 12
127-
- TextureRect:
128-
serializedVersion: 2
129-
x: 0
130-
y: 0.5
131-
width: 0.5
132-
height: 0.5
133-
MidFloorCount: 4
13422
ColumnCount: 1
13523
TopSectionRatio: 0.2
13624
BottomSectionRatio: 0.2
137-
PreferredEdgeSectionLength: 40
138-
FloorHeight: 50
139-
FirstFloorHeight: 12
140-
TopFloorHeight: 12
141-
- TextureRect:
142-
serializedVersion: 2
143-
x: 0.25
144-
y: 0.5
145-
width: 0.25
146-
height: 0.5
147-
MidFloorCount: 4
148-
ColumnCount: 2
149-
TopSectionRatio: 0.2
150-
BottomSectionRatio: 0.2
151-
PreferredEdgeSectionLength: 40
152-
FloorHeight: 50
153-
FirstFloorHeight: 12
154-
TopFloorHeight: 12
155-
- TextureRect:
156-
serializedVersion: 2
157-
x: 0.5
158-
y: 0.5
159-
width: 0.25
160-
height: 0.5
161-
MidFloorCount: 4
162-
ColumnCount: 3
163-
TopSectionRatio: 0.2
164-
BottomSectionRatio: 0.2
165-
PreferredEdgeSectionLength: 40
166-
FloorHeight: 50
167-
FirstFloorHeight: 12
168-
TopFloorHeight: 12
169-
- TextureRect:
170-
serializedVersion: 2
171-
x: 0.75
172-
y: 0.5
173-
width: 0.25
174-
height: 0.5
175-
MidFloorCount: 4
176-
ColumnCount: 4
177-
TopSectionRatio: 0.2
178-
BottomSectionRatio: 0.2
179-
PreferredEdgeSectionLength: 40
180-
FloorHeight: 50
181-
FirstFloorHeight: 12
182-
TopFloorHeight: 12
25+
PreferredEdgeSectionLength: 30
26+
FloorHeight: 18
27+
FirstFloorHeight: 6
28+
TopFloorHeight: 6
18329
Roofs:
18430
- TextureRect:
18531
serializedVersion: 2
@@ -237,3 +83,4 @@ MonoBehaviour:
23783
FloorHeight: 0
23884
FirstFloorHeight: 0
23985
TopFloorHeight: 0
86+
AtlasEntityType: 0

0 commit comments

Comments
 (0)