diff --git a/cjio/convert.py b/cjio/convert.py index 521c8d2..3b5c607 100644 --- a/cjio/convert.py +++ b/cjio/convert.py @@ -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 diff --git a/tests/test_convert.py b/tests/test_convert.py index 14ada7c..0352aea 100644 --- a/tests/test_convert.py +++ b/tests/test_convert.py @@ -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: