Private
Public Access
21 lines
1.3 KiB
Python
21 lines
1.3 KiB
Python
"""Render a genuine view from the same origin/direction as the demo scan cone."""
|
|
import bpy
|
|
from pathlib import Path
|
|
from mathutils import Vector
|
|
ROOT=Path(__file__).resolve().parents[1];OUT=ROOT/'preview/v4'
|
|
bpy.ops.wm.open_mainfile(filepath=str(OUT/'halloween_dark.blend'))
|
|
s=bpy.context.scene;s.frame_set(480)
|
|
bpy.ops.object.camera_add(location=(0,1.48,1.02))
|
|
cam=bpy.context.object;cam.name='Scanner camera at headstone emitter'
|
|
cam.rotation_euler=(Vector((3.25,-.65,1.2))-cam.location).to_track_quat('-Z','Y').to_euler()
|
|
cam.data.lens=20;cam.data.clip_start=.03;s.camera=cam
|
|
# Soft illumination alongside the scanner represents its photo capture light.
|
|
light=bpy.data.lights.new('Scanner photo fill','AREA');light.energy=110;light.color=(.72,.82,1);light.size=.55
|
|
ob=bpy.data.objects.new('Scanner photo fill',light);s.collection.objects.link(ob)
|
|
ob.location=cam.location+Vector((.05,-.05,.06));ob.rotation_euler=cam.rotation_euler
|
|
s.render.use_sequencer=False;s.render.resolution_x=1280;s.render.resolution_y=720;s.render.resolution_percentage=100
|
|
s.eevee.taa_render_samples=32;s.eevee.volumetric_samples=16
|
|
s.render.image_settings.file_format='PNG';s.render.filepath=str(OUT/'gruppenfoto_scanner.png')
|
|
bpy.ops.wm.save_as_mainfile(filepath=str(OUT/'scanner_photo_scene.blend'))
|
|
bpy.ops.render.render(write_still=True)
|