Preserve homestead context and garden-centred Blender design
This commit is contained in:
24
source/samford-spacious-tour/save_ready_to_play.py
Normal file
24
source/samford-spacious-tour/save_ready_to_play.py
Normal file
@@ -0,0 +1,24 @@
|
||||
import bpy,os
|
||||
from mathutils import Vector
|
||||
OUT=os.path.dirname(os.path.abspath(__file__)); s=bpy.context.scene; cam=s.camera
|
||||
# A wider architectural view makes the short link easier to understand than a close doorway shot.
|
||||
for f,pos,target in [(601,(-13,3.0,5.7),(-8,-1.8,2.6)),(720,(-12,2.4,5.1),(-8,-1.8,2.6))]:
|
||||
cam.location=pos; cam.rotation_euler=(Vector(target)-cam.location).to_track_quat('-Z','Y').to_euler(); cam.keyframe_insert('location',frame=f); cam.keyframe_insert('rotation_euler',frame=f)
|
||||
# Six seats let the whole family gather around the central table.
|
||||
c=bpy.data.collections['10 Furniture']; wood=bpy.data.materials['Unpainted hardwood - long X grain']
|
||||
def box(n,p,sz):
|
||||
bpy.ops.mesh.primitive_cube_add(size=1,location=p); o=bpy.context.object; o.name=n; o.dimensions=sz; bpy.ops.object.transform_apply(location=False,rotation=False,scale=True)
|
||||
for col in list(o.users_collection): col.objects.unlink(o)
|
||||
c.objects.link(o); o.data.materials.append(wood); b=o.modifiers.new('Eased timber edge','BEVEL'); b.width=.007; b.segments=2
|
||||
for x,side in [(-1.46,-1),(1.66,1)]:
|
||||
box('Family dining end chair seat',(x,.3,1.55),(.46,.46,.045))
|
||||
for dx in [-.17,.17]:
|
||||
for dy in [-.17,.17]: box('Family dining end chair leg',(x+dx,.3+dy,1.33),(.038,.038,.42))
|
||||
box('Family dining end chair back',(x+side*.2,.3,1.82),(.035,.46,.32))
|
||||
s.frame_set(1); s.camera=cam; s.render.engine='CYCLES'; s.render.resolution_percentage=100; s.render.filepath=os.path.join(OUT,'family-homestead-overview.png')
|
||||
s['Family table']='Six dining seats around the shared central table.'
|
||||
bpy.ops.wm.save_as_mainfile(filepath=os.path.join(OUT,'samford-spacious-guided-tour.blend'))
|
||||
for o in s.objects:
|
||||
if o.name=='Subtle atmosphere over hillside': o.hide_render=True
|
||||
s.frame_set(660); s.render.engine='BLENDER_WORKBENCH'; s.render.resolution_percentage=30; s.display.shading.color_type='MATERIAL'; s.render.filepath=os.path.join(OUT,'corridor-check.png'); bpy.ops.render.render(write_still=True)
|
||||
print('READY_TO_PLAY_SAVED',flush=True)
|
||||
Reference in New Issue
Block a user