Skip to content

Commit 0e6567d

Browse files
committed
feat(assets): add kenney 3D road tiles model collection
- Add 128 glTF road tile models (roadTile_001 through roadTile_128) - Include Blender conversion utilities and documentation - Add license and attribution files for Kenney asset pack - Include donation and social media reference links - Expand 3D asset library for environment and level design
1 parent 6ada3cd commit 0e6567d

3,193 files changed

Lines changed: 536820 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import glob
2+
import bpy
3+
4+
# Fix Kenney's 3D objects (http://kenney.itch.io/kenney-donation) in Three.js
5+
# Three.js' object loader barfs when object is not made of simple quads.
6+
7+
# This script uses Blender command-line to load each asset, converts to tris,
8+
# then convert to quads (to remove some vertices), and re-saves (overwrites!)
9+
10+
# To run:
11+
# > cd <path to assets>
12+
# > blender -b -P fixQuads.py
13+
14+
for obj in glob.glob('*.obj'):
15+
bpy.ops.import_scene.obj(filepath=obj)
16+
model = bpy.data.objects[len(bpy.data.objects) - 1]
17+
18+
bpy.context.scene.objects.active = model
19+
20+
bpy.ops.object.mode_set(mode='EDIT')
21+
bpy.ops.mesh.quads_convert_to_tris()
22+
bpy.ops.mesh.tris_convert_to_quads()
23+
24+
bpy.ops.export_scene.obj(filepath=obj, use_selection=True)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Three.js only supports quads, which means these models have to be converted.
2+
Use the included Python file (by reddit.com/u/mrspeaker) to convert.
3+
4+
fixQuads.py: https://gist.github.com/mrspeaker/f9bae3c3765ee0d73686
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[InternetShortcut]
2+
URL=http://donate.kenney.nl/
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[InternetShortcut]
2+
URL=http://store.steampowered.com/app/363550
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[InternetShortcut]
2+
URL=https://www.facebook.com/KenneyNL
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
3+
3D Road Tiles
4+
by Kenney Vleugels for Kenney (www.kenney.nl)
5+
6+
------------------------------
7+
8+
License (Creative Commons Zero, CC0)
9+
http://creativecommons.org/publicdomain/zero/1.0/
10+
11+
You may use these textures/photographs in personal and commercial projects.
12+
Credit (Kenney or www.kenney.nl) would be nice but is not mandatory.
13+
14+
------------------------------
15+
16+
Donate: http://support.kenney.nl
17+
Request: http://request.kenney.nl
18+
19+
Follow on Twitter for updates:
20+
@KenneyWings
Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
{
2+
"accessors": [
3+
{
4+
"name": "Mesh1 Group1 Model_1_positions",
5+
"componentType": 5126,
6+
"count": 24,
7+
"min": [
8+
0,
9+
0,
10+
-3
11+
],
12+
"max": [
13+
3,
14+
0.45500001311302185,
15+
0
16+
],
17+
"type": "VEC3",
18+
"bufferView": 0,
19+
"byteOffset": 0
20+
},
21+
{
22+
"name": "Mesh1 Group1 Model_1_normals",
23+
"componentType": 5126,
24+
"count": 24,
25+
"min": [
26+
-1,
27+
-1,
28+
-1
29+
],
30+
"max": [
31+
1,
32+
1,
33+
1
34+
],
35+
"type": "VEC3",
36+
"bufferView": 0,
37+
"byteOffset": 288
38+
},
39+
{
40+
"name": "Mesh1 Group1 Model_1_texcoords",
41+
"componentType": 5126,
42+
"count": 24,
43+
"min": [
44+
-3,
45+
-2
46+
],
47+
"max": [
48+
3,
49+
1
50+
],
51+
"type": "VEC2",
52+
"bufferView": 1,
53+
"byteOffset": 0
54+
},
55+
{
56+
"name": "Mesh1 Group1 Model_1_0_indices",
57+
"componentType": 5123,
58+
"count": 36,
59+
"min": [
60+
0
61+
],
62+
"max": [
63+
23
64+
],
65+
"type": "SCALAR",
66+
"bufferView": 2,
67+
"byteOffset": 0
68+
}
69+
],
70+
"asset": {
71+
"generator": "obj2gltf",
72+
"version": "2.0"
73+
},
74+
"buffers": [
75+
{
76+
"name": "roadTile_001",
77+
"byteLength": 840,
78+
"uri": "data:application/octet-stream;base64,jpAvK8P16D4AAEDAjpAvKwAAAAAAAEDAAAAAACsRNiYKk8mqAAAAAMP16D4Kk8mqAABAQMP16D4AAEDAAABAQNMU3SYAAEDAjpAvKwAAAAAAAEDAjpAvK8P16D4AAEDAAABAQMP16D4AAACAAABAQBgW6iYAAACAAABAQNMU3SYAAEDAAABAQMP16D4AAEDAAAAAAMP16D4Kk8mqAAAAACsRNiYKk8mqAABAQBgW6iYAAACAAABAQMP16D4AAACAAABAQNMU3SYAAEDAAABAQBgW6iYAAACAAAAAACsRNiYKk8mqjpAvKwAAAAAAAEDAAAAAAMP16D4Kk8mqAABAQMP16D4AAACAAABAQMP16D4AAEDAjpAvK8P16D4AAEDAAACAv0c0JhH6FWqqAACAv0c0JhH6FWqqAACAv0c0JhH6FWqqAACAv0c0JhH6FWqqvrlpKh70uyYAAIC/vrlpKh70uyYAAIC/vrlpKh70uyYAAIC/vrlpKh70uyYAAIC/AACAPwD3GasnLKYpAACAPwD3GasnLKYpAACAPwD3GasnLKYpAACAPwD3GasnLKYpBmIGqkCcoRUAAIA/BmIGqkCcoRUAAIA/BmIGqkCcoRUAAIA/BmIGqkCcoRUAAIA/jRPNJAAAgL9Z5dgkjRPNJAAAgL9Z5dgkjRPNJAAAgL9Z5dgkjRPNJAAAgL9Z5dgkFW25JQAAgD/J8wKlFW25JQAAgD/J8wKlFW25JQAAgD/J8wKlFW25JQAAgD/J8wKlAABAwB+FCz8AAEDAAACAPwqTyaoAAIA/CpPJqh+FCz8AAEDAH4ULPwAAQMAAAIA/8LeKpgAAgD/wt4qmH4ULPyxCeSofhQs/LEJ5KgAAgD8AAEBAAACAPwAAQEAfhQs/WKBTlR+FCz9YoFOVAACAPwAAQEAAAIA/AABAQB+FCz8AAEDAAAAAwAAAQMAAAIA/r9mRiwAAgD+OkC+rAAAAwPa8KKUAAIA/AABAQAAAgD8AAEBAAAAAwAmGLysAAADAAAABAAIAAAACAAMABAAFAAYABAAGAAcACAAJAAoACAAKAAsADAANAA4ADAAOAA8AEAARABIAEAASABMAFAAVABYAFAAWABcA"
79+
}
80+
],
81+
"bufferViews": [
82+
{
83+
"name": "bufferView_0",
84+
"buffer": 0,
85+
"byteLength": 576,
86+
"byteOffset": 0,
87+
"byteStride": 12,
88+
"target": 34962
89+
},
90+
{
91+
"name": "bufferView_1",
92+
"buffer": 0,
93+
"byteLength": 192,
94+
"byteOffset": 576,
95+
"byteStride": 8,
96+
"target": 34962
97+
},
98+
{
99+
"name": "bufferView_2",
100+
"buffer": 0,
101+
"byteLength": 72,
102+
"byteOffset": 768,
103+
"target": 34963
104+
}
105+
],
106+
"materials": [
107+
{
108+
"name": "Water",
109+
"pbrMetallicRoughness": {
110+
"baseColorFactor": [
111+
0.690196,
112+
0.843137,
113+
0.964706,
114+
1
115+
],
116+
"metallicFactor": 0,
117+
"roughnessFactor": 1
118+
},
119+
"emissiveFactor": [
120+
0,
121+
0,
122+
0
123+
],
124+
"alphaMode": "OPAQUE",
125+
"doubleSided": false
126+
}
127+
],
128+
"meshes": [
129+
{
130+
"name": "Mesh1 Group1 Model_1",
131+
"primitives": [
132+
{
133+
"attributes": {
134+
"POSITION": 0,
135+
"NORMAL": 1,
136+
"TEXCOORD_0": 2
137+
},
138+
"indices": 3,
139+
"material": 0,
140+
"mode": 4
141+
}
142+
]
143+
}
144+
],
145+
"nodes": [
146+
{
147+
"name": "Mesh1 Group1 Model",
148+
"mesh": 0
149+
}
150+
],
151+
"scene": 0,
152+
"scenes": [
153+
{
154+
"nodes": [
155+
0
156+
]
157+
}
158+
]
159+
}
Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
{
2+
"accessors": [
3+
{
4+
"name": "Mesh1 Group1 Model_1_positions",
5+
"componentType": 5126,
6+
"count": 24,
7+
"min": [
8+
0,
9+
0,
10+
-3
11+
],
12+
"max": [
13+
3,
14+
0.6299999952316284,
15+
0
16+
],
17+
"type": "VEC3",
18+
"bufferView": 0,
19+
"byteOffset": 0
20+
},
21+
{
22+
"name": "Mesh1 Group1 Model_1_normals",
23+
"componentType": 5126,
24+
"count": 24,
25+
"min": [
26+
-1,
27+
-1,
28+
-1
29+
],
30+
"max": [
31+
1,
32+
1,
33+
1
34+
],
35+
"type": "VEC3",
36+
"bufferView": 0,
37+
"byteOffset": 288
38+
},
39+
{
40+
"name": "Mesh1 Group1 Model_1_texcoords",
41+
"componentType": 5126,
42+
"count": 24,
43+
"min": [
44+
-3,
45+
-2
46+
],
47+
"max": [
48+
3,
49+
1
50+
],
51+
"type": "VEC2",
52+
"bufferView": 1,
53+
"byteOffset": 0
54+
},
55+
{
56+
"name": "Mesh1 Group1 Model_1_0_indices",
57+
"componentType": 5123,
58+
"count": 36,
59+
"min": [
60+
0
61+
],
62+
"max": [
63+
23
64+
],
65+
"type": "SCALAR",
66+
"bufferView": 2,
67+
"byteOffset": 0
68+
}
69+
],
70+
"asset": {
71+
"generator": "obj2gltf",
72+
"version": "2.0"
73+
},
74+
"buffers": [
75+
{
76+
"name": "roadTile_002",
77+
"byteLength": 840,
78+
"uri": "data:application/octet-stream;base64,GBZqKa5HIT8AAACAGBZqKQAAAAAAAACAAABAQAAAAACgE1CpAABAQK5HIT+gE1CpAAAAAAAAAAAAAEDAGBZqKQAAAAAAAACAGBZqKa5HIT8AAACAAAAAAK5HIT8AAEDAAABAQAAAAACgE1CpGBZqKQAAAAAAAACAAAAAAAAAAAAAAEDAAABAQAAAAAAAAEDAAABAQK5HIT8AAEDAAABAQAAAAAAAAEDAAAAAAAAAAAAAAEDAAAAAAK5HIT8AAEDAAABAQAAAAACgE1CpAABAQAAAAAAAAEDAAABAQK5HIT8AAEDAAABAQK5HIT+gE1CpAAAAAK5HIT8AAEDAGBZqKa5HIT8AAACAAABAQK5HIT+gE1CpAABAQK5HIT8AAEDAr6qTKAAAAAAAAIA/r6qTKAAAAAAAAIA/r6qTKAAAAAAAAIA/r6qTKAAAAAAAAIA/AACAv2DBCA4QDpQoAACAv2DBCA4QDpQoAACAv2DBCA4QDpQoAACAv2DBCA4QDpQou3HICAAAgL8jLt2Iu3HICAAAgL8jLt2Iu3HICAAAgL8jLt2Iu3HICAAAgL8jLt2Ir6qTqAAAAAAAAIC/r6qTqAAAAAAAAIC/r6qTqAAAAAAAAIC/r6qTqAAAAAAAAIC/AACAP291KQ7Ut4qoAACAP291KQ7Ut4qoAACAP291KQ7Ut4qoAACAP291KQ7Ut4qoAAAAgAAAgD/M0/iKAAAAgAAAgD/M0/iKAAAAgAAAgD/M0/iKAAAAgAAAgD/M0/iKGBZqKaRwvT4YFmopAACAPwAAQEAAAIA/AABAQKRwvT4AAEDAAACAP5FhhxIAAIA/kWGHEqRwvT4AAEDApHC9PgAAQMAAAIA/GBZqqQAAgD8AAAAAAAAAwAAAQMAAAADAAABAwKRwvT4AAEDAAACAPwaAXakAAIA/BoBdqaRwvT6WTIWSAACAPwAAQEAAAIA/AABAQKRwvT6WTIWSpHC9PgAAAAAAAADAGBZqKQAAgD8AAEBAAACAPwAAQEAAAADAAAABAAIAAAACAAMABAAFAAYABAAGAAcACAAJAAoACAAKAAsADAANAA4ADAAOAA8AEAARABIAEAASABMAFAAVABYAFAAWABcA"
79+
}
80+
],
81+
"bufferViews": [
82+
{
83+
"name": "bufferView_0",
84+
"buffer": 0,
85+
"byteLength": 576,
86+
"byteOffset": 0,
87+
"byteStride": 12,
88+
"target": 34962
89+
},
90+
{
91+
"name": "bufferView_1",
92+
"buffer": 0,
93+
"byteLength": 192,
94+
"byteOffset": 576,
95+
"byteStride": 8,
96+
"target": 34962
97+
},
98+
{
99+
"name": "bufferView_2",
100+
"buffer": 0,
101+
"byteLength": 72,
102+
"byteOffset": 768,
103+
"target": 34963
104+
}
105+
],
106+
"materials": [
107+
{
108+
"name": "Stone",
109+
"pbrMetallicRoughness": {
110+
"baseColorFactor": [
111+
0.847059,
112+
0.827451,
113+
0.74902,
114+
1
115+
],
116+
"metallicFactor": 0,
117+
"roughnessFactor": 1
118+
},
119+
"emissiveFactor": [
120+
0,
121+
0,
122+
0
123+
],
124+
"alphaMode": "OPAQUE",
125+
"doubleSided": false
126+
}
127+
],
128+
"meshes": [
129+
{
130+
"name": "Mesh1 Group1 Model_1",
131+
"primitives": [
132+
{
133+
"attributes": {
134+
"POSITION": 0,
135+
"NORMAL": 1,
136+
"TEXCOORD_0": 2
137+
},
138+
"indices": 3,
139+
"material": 0,
140+
"mode": 4
141+
}
142+
]
143+
}
144+
],
145+
"nodes": [
146+
{
147+
"name": "Mesh1 Group1 Model",
148+
"mesh": 0
149+
}
150+
],
151+
"scene": 0,
152+
"scenes": [
153+
{
154+
"nodes": [
155+
0
156+
]
157+
}
158+
]
159+
}

0 commit comments

Comments
 (0)