Add nicer coloring.
This commit is contained in:
parent
565ded39fc
commit
11d306f362
16 changed files with 14 additions and 10 deletions
Binary file not shown.
Binary file not shown.
|
@ -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,
|
||||
|
|
|
@ -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()
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -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"]
|
||||
|
|
|
@ -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
|
||||
|
|
BIN
src/utility/test456/test456.blend
Normal file
BIN
src/utility/test456/test456.blend
Normal file
Binary file not shown.
BIN
src/utility/test456/test456.blend1
Normal file
BIN
src/utility/test456/test456.blend1
Normal file
Binary file not shown.
1
src/utility/test456/test456.json
Normal file
1
src/utility/test456/test456.json
Normal file
|
@ -0,0 +1 @@
|
|||
{"height": "2.0", "radius": "0.6", "color": [0.1, 0.1, 0.1], "output": "test456", "shape": "cone"}
|
BIN
src/utility/test456/test456.png
Normal file
BIN
src/utility/test456/test456.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 311 KiB |
Binary file not shown.
Binary file not shown.
|
@ -1 +1 @@
|
|||
{"shape": "pendant", "radius": 0.5, "height": 1.5, "color": [0.1, 0.1, 0.1]}
|
||||
{"color": [0.1, 0.1, 0.1], "height": 1.5, "radius": 0.5, "shape": "pendant"}
|
Binary file not shown.
Before Width: | Height: | Size: 523 KiB After Width: | Height: | Size: 295 KiB |
Loading…
Reference in a new issue