diff --git a/src/product_gen/__pycache__/generate_lamp.cpython-35.pyc b/src/product_gen/__pycache__/generate_lamp.cpython-35.pyc index 0287860..557153d 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 830b4ce..5ba0aa7 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 47bc5ee..7a8747e 100644 --- a/src/product_gen/generate_lamp.py +++ b/src/product_gen/generate_lamp.py @@ -22,7 +22,6 @@ def generate_models(shape, height, radius): radius2, height) - # Base if "bio" not in shape: radius1 = 0.3 diff --git a/src/rendering/__pycache__/setup_renderer.cpython-35.pyc b/src/rendering/__pycache__/setup_renderer.cpython-35.pyc index 9a7b563..611be14 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 dbf3891..0052fe1 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_renderer.py b/src/rendering/setup_renderer.py index cfb9632..30d017b 100644 --- a/src/rendering/setup_renderer.py +++ b/src/rendering/setup_renderer.py @@ -5,7 +5,7 @@ def setup_renderer(engine="CYCLES"): # Set up and do the render if engine=="CYCLES": bpy.context.scene.render.engine = 'CYCLES' - bpy.context.scene.cycles.samples = 24.0 + bpy.context.scene.cycles.samples = 12.0 bpy.context.scene.cycles.caustics_reflective = False bpy.context.scene.cycles.caustics_refractive = False bpy.context.scene.cycles.max_bounces = 0.0 @@ -16,4 +16,4 @@ def setup_renderer(engine="CYCLES"): bpy.data.scenes["Scene"].render.border_max_x = 0.65 # Set the border right at the image's right border bpy.context.scene.render.resolution_x = 600.0 bpy.context.scene.render.resolution_y = 600.0 - bpy.context.scene.render.resolution_percentage = 100.0 \ No newline at end of file + bpy.context.scene.render.resolution_percentage = 50.0 \ No newline at end of file diff --git a/src/rendering/setup_scene.py b/src/rendering/setup_scene.py index c33a8d1..b0c0f2e 100644 --- a/src/rendering/setup_scene.py +++ b/src/rendering/setup_scene.py @@ -16,23 +16,23 @@ def setup_scene(): #bpy.context.scene.world.light_settings.use_environment_light = True # Add back wall - bpy.ops.mesh.primitive_plane_add(radius=20, location=(-10.0, 0.0, 0.0)) - bpy.ops.transform.rotate(value=math.pi/2.0, axis=(0.0,1.0,0.0)) - bpy.data.objects["Plane"].name = "back_wall" - mat = bpy.data.materials.get("backwall-material") - if mat is None: - mat = bpy.data.materials.new("backwall-material") - 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"] - if bpy.context.active_object.data.materials: - # assign to 1st material slot - bpy.context.active_object.data.materials[0] = mat - else: - # no slots - bpy.context.active_object.data.materials.append(mat) +# bpy.ops.mesh.primitive_plane_add(radius=20, location=(-10.0, 0.0, 0.0)) +# bpy.ops.transform.rotate(value=math.pi/2.0, axis=(0.0,1.0,0.0)) +# bpy.data.objects["Plane"].name = "back_wall" +# mat = bpy.data.materials.get("backwall-material") +# if mat is None: +# mat = bpy.data.materials.new("backwall-material") +# 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"] +# if bpy.context.active_object.data.materials: +# # assign to 1st material slot +# bpy.context.active_object.data.materials[0] = mat +# else: +# # no slots +# bpy.context.active_object.data.materials.append(mat) # Set up cameras bpy.data.objects["Camera"].location = (10.0, 0.0, -1) diff --git a/src/utility/test456/bio.png b/src/utility/test456/bio.png new file mode 100644 index 0000000..8d66a48 Binary files /dev/null and b/src/utility/test456/bio.png differ diff --git a/src/utility/test456/cone.png b/src/utility/test456/cone.png new file mode 100644 index 0000000..4fcd017 Binary files /dev/null and b/src/utility/test456/cone.png differ diff --git a/src/utility/test456/mesh.png b/src/utility/test456/mesh.png new file mode 100644 index 0000000..e64254b Binary files /dev/null and b/src/utility/test456/mesh.png differ diff --git a/src/utility/test456/test456.blend b/src/utility/test456/test456.blend index cc69b0d..48f01b6 100644 Binary files a/src/utility/test456/test456.blend and b/src/utility/test456/test456.blend differ diff --git a/src/utility/test456/test456.blend1 b/src/utility/test456/test456.blend1 index e71e7e6..90435bd 100644 Binary files a/src/utility/test456/test456.blend1 and b/src/utility/test456/test456.blend1 differ diff --git a/src/utility/test456/test456.json b/src/utility/test456/test456.json index 477a27d..acc8419 100644 --- a/src/utility/test456/test456.json +++ b/src/utility/test456/test456.json @@ -1 +1 @@ -{"height": "2.0", "radius": "0.6", "color": [0.1, 0.1, 0.1], "output": "test456", "shape": "cone"} \ No newline at end of file +{"color": [0.1, 0.1, 0.1], "radius": 0.5665623488444744, "shape": "cone", "height": 1.542497772868874} \ No newline at end of file diff --git a/src/utility/test456/test456.png b/src/utility/test456/test456.png index 4fcd017..0b74432 100644 Binary files a/src/utility/test456/test456.png and b/src/utility/test456/test456.png differ diff --git a/test/test/test.blend b/test/test/test.blend index a94e527..fd6c3ca 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 045ed54..c2cd11f 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 8dec8eb..c6e2a44 100644 --- a/test/test/test.json +++ b/test/test/test.json @@ -1 +1 @@ -{"height": 1.5, "radius": 1.5, "color": [0.1, 0.1, 0.1], "shape": "bio"} \ No newline at end of file +{"height": 1.5, "color": [0.1, 0.1, 0.1], "shape": "bio", "radius": 1.5} \ No newline at end of file diff --git a/test/test/test.png b/test/test/test.png index 5915d65..8d66a48 100644 Binary files a/test/test/test.png and b/test/test/test.png differ