diff --git a/src/product_gen/__pycache__/generate_lamp.cpython-35.pyc b/src/product_gen/__pycache__/generate_lamp.cpython-35.pyc index 2951ba5..90f6010 100644 Binary files a/src/product_gen/__pycache__/generate_lamp.cpython-35.pyc and b/src/product_gen/__pycache__/generate_lamp.cpython-35.pyc differ diff --git a/src/product_gen/__pycache__/generate_product.cpython-35.pyc b/src/product_gen/__pycache__/generate_product.cpython-35.pyc index 7e9f87f..92ae1f9 100644 Binary files a/src/product_gen/__pycache__/generate_product.cpython-35.pyc and b/src/product_gen/__pycache__/generate_product.cpython-35.pyc differ diff --git a/src/product_gen/generate_lamp.py b/src/product_gen/generate_lamp.py index 0dcabbe..f6f7f02 100644 --- a/src/product_gen/generate_lamp.py +++ b/src/product_gen/generate_lamp.py @@ -25,8 +25,8 @@ def generate_models(shape, height, radius): # Base radius1 = 0.3 - radius2 = 0.2 - depth = 0.2 + radius2 = 0.07 + depth = 0.5 location = (0.0, 0.0, height/2.0+depth/2.0) base = product_gen.generate_lamp_base.generate_cone_base(radius1, radius2, diff --git a/src/product_gen/generate_product.py b/src/product_gen/generate_product.py index 7391573..3bac93d 100644 --- a/src/product_gen/generate_product.py +++ b/src/product_gen/generate_product.py @@ -23,8 +23,8 @@ def generate(shape, # Set up materials and textures colormap = {"shade": color, - "base": (220.0/255.0, 220.0/255.0, 220.0/255.0), - "chord": (20.0/255.0, 20.0/255.0, 20.0/255.0)} + "base": (132.0/255.0, 64.0/255.0, 11.0/255.0), + "chord": (5.0/255.0, 5.0/255.0, 5.0/255.0)} product_gen.generate_lamp.apply_textures(colormap, models) rendering.setup_scene.setup_scene() diff --git a/src/rendering/__pycache__/setup_renderer.cpython-35.pyc b/src/rendering/__pycache__/setup_renderer.cpython-35.pyc index cf2bfb4..9a7b563 100644 Binary files a/src/rendering/__pycache__/setup_renderer.cpython-35.pyc and b/src/rendering/__pycache__/setup_renderer.cpython-35.pyc differ diff --git a/src/rendering/__pycache__/setup_scene.cpython-35.pyc b/src/rendering/__pycache__/setup_scene.cpython-35.pyc index 8e74be9..dbf3891 100644 Binary files a/src/rendering/__pycache__/setup_scene.cpython-35.pyc and b/src/rendering/__pycache__/setup_scene.cpython-35.pyc differ diff --git a/src/rendering/setup_scene.py b/src/rendering/setup_scene.py index 5cc1a3e..c33a8d1 100644 --- a/src/rendering/setup_scene.py +++ b/src/rendering/setup_scene.py @@ -22,8 +22,8 @@ def setup_scene(): mat = bpy.data.materials.get("backwall-material") if mat is None: mat = bpy.data.materials.new("backwall-material") - mat.diffuse_color = (0.5, 0.5, 0.5) - mat.specular_color = (0.5, 0.5, 0.5) + mat.diffuse_color = (0.25, 0.25, 0.25) + mat.specular_color = (0.25, 0.25, 0.25) mat.diffuse_intensity = 1.0 mat.specular_intensity = 1.0 bpy.context.scene.objects.active = bpy.data.objects["back_wall"] diff --git a/src/utility/apply_texture.py b/src/utility/apply_texture.py index 7316c1c..81fad0c 100644 --- a/src/utility/apply_texture.py +++ b/src/utility/apply_texture.py @@ -19,9 +19,12 @@ if __name__ == "__main__": height = float(shape_params["height"]) radius = float(shape_params["radius"]) - color = [random.random(), - random.random(), - random.random()] + + colors = [(0.1, 0.1, 0.1), + (0.68, 0.68, 0.68), + (0.033, 0.065, 0.376), + (0.019, 0.202, 0.032)] + color = random.choice(colors) product_gen.generate_product.generate(shape, height, radius, color, output) shape_parameters = shape_params diff --git a/src/utility/test456/test456.blend b/src/utility/test456/test456.blend new file mode 100644 index 0000000..cc69b0d Binary files /dev/null and b/src/utility/test456/test456.blend differ diff --git a/src/utility/test456/test456.blend1 b/src/utility/test456/test456.blend1 new file mode 100644 index 0000000..e71e7e6 Binary files /dev/null and b/src/utility/test456/test456.blend1 differ diff --git a/src/utility/test456/test456.json b/src/utility/test456/test456.json new file mode 100644 index 0000000..477a27d --- /dev/null +++ b/src/utility/test456/test456.json @@ -0,0 +1 @@ +{"height": "2.0", "radius": "0.6", "color": [0.1, 0.1, 0.1], "output": "test456", "shape": "cone"} \ No newline at end of file diff --git a/src/utility/test456/test456.png b/src/utility/test456/test456.png new file mode 100644 index 0000000..4fcd017 Binary files /dev/null and b/src/utility/test456/test456.png differ diff --git a/test/test/test.blend b/test/test/test.blend index 41be6db..636db48 100644 Binary files a/test/test/test.blend and b/test/test/test.blend differ diff --git a/test/test/test.blend1 b/test/test/test.blend1 index c5a1de7..b8965ed 100644 Binary files a/test/test/test.blend1 and b/test/test/test.blend1 differ diff --git a/test/test/test.json b/test/test/test.json index 11d139a..5d9d52b 100644 --- a/test/test/test.json +++ b/test/test/test.json @@ -1 +1 @@ -{"shape": "pendant", "radius": 0.5, "height": 1.5, "color": [0.1, 0.1, 0.1]} \ No newline at end of file +{"color": [0.1, 0.1, 0.1], "height": 1.5, "radius": 0.5, "shape": "pendant"} \ No newline at end of file diff --git a/test/test/test.png b/test/test/test.png index 13229ed..1f972d2 100644 Binary files a/test/test/test.png and b/test/test/test.png differ