Skip to content

Commit

Permalink
Change gltf colors
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsdukai committed Jan 6, 2023
1 parent c1cc645 commit e6c5119
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cjio/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,9 +367,9 @@ def to_glb(cm):
materials = [
{ # building red
"pbrMetallicRoughness": {
"baseColorFactor": [1.000, 0.000, 0.000, 1.0],
"metallicFactor": 0.5,
"roughnessFactor": 1.0
"baseColorFactor": [0.7200, 0.320, 0.220, 1.0],
"metallicFactor": 0.0,
"roughnessFactor": 0.0
}
},
{ # terrain brown
Expand Down
9 changes: 9 additions & 0 deletions tests/test_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ def test_debug_den_haag_glb(self, data_dir):
cm = cityjson.CityJSON(file=f)
glb = cm.export2glb()

def test_debug_delft_glb(self, data_dir, data_output_dir):
# CityJSON v1.1
p = os.path.join(data_dir, "0-1.city.json")
with open(p, 'r') as f:
cm = cityjson.CityJSON(file=f)
glb = cm.export2glb()
glb.seek(0)
with open(f"{data_output_dir}/0-1.glb", mode='wb') as bo:
bo.write(glb.getvalue())


class TestB3dm:
Expand Down

0 comments on commit e6c5119

Please sign in to comment.