Tidy up.
This commit is contained in:
parent
ea2435a159
commit
a1e22c9f2b
13 changed files with 101 additions and 58 deletions
BIN
src/rendering/__pycache__/setup_renderer.cpython-35.pyc
Normal file
BIN
src/rendering/__pycache__/setup_renderer.cpython-35.pyc
Normal file
Binary file not shown.
BIN
src/rendering/__pycache__/setup_scene.cpython-35.pyc
Normal file
BIN
src/rendering/__pycache__/setup_scene.cpython-35.pyc
Normal file
Binary file not shown.
18
src/rendering/setup_renderer.py
Normal file
18
src/rendering/setup_renderer.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
import bpy
|
||||
|
||||
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 = 300.0
|
||||
bpy.context.scene.cycles.caustics_reflective = False
|
||||
bpy.context.scene.cycles.caustics_refractive = False
|
||||
bpy.context.scene.cycles.max_bounces = 1000.0
|
||||
bpy.data.scenes["Scene"].render.use_border = True # Tell Blender to use border render
|
||||
bpy.data.scenes["Scene"].render.border_max_y = 0.75 # Set the border top at 3/4 of the image's height
|
||||
bpy.data.scenes["Scene"].render.border_min_y = 0.33 # Set the border bottom at 1/3 of the image's height
|
||||
bpy.data.scenes["Scene"].render.border_min_x = 0.25 # Set the border left at 1/4 of the image's width
|
||||
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_percentage = 100.0
|
20
src/rendering/setup_scene.py
Normal file
20
src/rendering/setup_scene.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
import bpy
|
||||
|
||||
def initialize_scene():
|
||||
|
||||
# Set up scene
|
||||
objs = bpy.data.objects
|
||||
objs.remove(objs["Cube"], True)
|
||||
|
||||
def setup_scene():
|
||||
|
||||
# Set up world
|
||||
bpy.context.scene.world.use_sky_paper = True
|
||||
bpy.context.scene.world.horizon_color = (0.95, 0.95, 0.95)
|
||||
#bpy.context.scene.world.light_settings.use_environment_light = True
|
||||
|
||||
# Set up lamps and cameras
|
||||
bpy.data.objects["Lamp"].location = bpy.data.objects["Camera"].location
|
||||
bpy.data.objects["Lamp"].delta_location = (-3, 0, -3)
|
||||
#bpy.data.objects["Lamp"].type = "POINT"
|
||||
bpy.data.objects["Lamp"].name = "front"
|
Loading…
Add table
Add a link
Reference in a new issue