Blender Cycles backend¶
quiltwright.cycles
¶
Blender Cycles Quilt Renderer¶
Drives Blender <https://www.blender.org/>_'s Cycles path tracer to produce
quilts for Looking Glass holographic displays. This is the
hardware-ray-tracing sibling of :mod:quiltwright.povray: on Apple Silicon,
Cycles' Metal backend runs ray/triangle intersection on the GPU's dedicated
ray-tracing cores (M3 and later; earlier chips run the same Metal path in GPU
software), and the equivalent applies on NVIDIA (OptiX), AMD (HIP) and Intel
(oneAPI) hardware elsewhere. POV-Ray can never use any of that -- it is a
CPU tracer with its own primitive intersectors -- so scenes that exist as
meshes rather than POV-Ray SDL come here instead.
The structural win over the POV-Ray backend is bigger than the hardware:
POV-Ray re-parses the scene and rebuilds its data structures once per view --
48 times for a Portrait quilt -- while this backend runs one Blender
process for the whole sweep. The scene imports once, Cycles builds its BVH
once (use_persistent_data), and only the camera moves between views.
Off-axis projection. The same shear as every other quiltwright backend,
expressed through Blender's camera shift. For an eye offset s along
the camera's unit right vector, with focal distance Z, vertical field of
view fov and view aspect a, the eye translates by s (the aim
point riding along, so the view direction never rotates) and the frustum is
sheared back with
.. code-block:: text
shift_x = -s / (2 * Z * tan(fov/2) * a)
which is the identical quantity VTK's SetWindowCenter receives in
:func:quiltwright.lfd._apply_off_axis_view, in Blender's units (fractions
of the frame width, under a horizontal sensor fit) instead of VTK's
half-widths. The original look-at point stays pinned to the centre of every
view; that point is the holographic focal plane.
Scene sources. A .blend file renders with its own materials, lights
and world; everything Blender can import -- glTF/GLB, OBJ, STL, PLY, USD,
FBX, Alembic -- is loaded into an empty scene. Imported meshes usually
arrive without lights, which in a path tracer means a black frame, so by
default a neutral world and a sun are added when the scene has no light of
its own. The lighting parameter picks the rig: a neutral
world-plus-sun ("soft", the default), a camera-relative three-point
studio rig ("studio"), Blender's physical sky ("sky"), an
equirectangular .hdr/.exr environment map, or None to add
nothing.
A .blend may also supply its own camera: pass camera=None and the
file's active camera becomes the centre view. The focal plane then comes
from the camera's depth-of-field focus distance (or focus object) -- that is
Blender's native "this distance matters" annotation, and setting it does not
blur anything unless DoF is actually enabled.
Requirements -- a blender binary (macOS: brew install --cask
blender; the standard /Applications install is found automatically),
plus pillow for quilt assembly. Blender 4.x or later.
Typical usage::
from quiltwright.quilt import QUILT_PRESETS, save_quilt
from quiltwright.cycles import CyclesCamera, render_cycles_quilt
camera = CyclesCamera(location=(0, -35, 8), look_at=(0, 0, 5), fov=14)
spec = QUILT_PRESETS["portrait"]
quilt = render_cycles_quilt("protein.glb", spec, camera, samples=128)
save_quilt(quilt, "protein", spec) # -> protein_qs8x6a0.75.png
Part of Quiltwright -- https://github.com/Flux-Frontiers/quiltwright Author: Eric G. Suchanek, PhD
CyclesCamera(location, look_at, up=(0.0, 0.0, 1.0), fov=14.0)
dataclass
¶
A Blender camera in look-at form, plus the quilt's focal geometry.
The look_at point defines the holographic focal plane, so aim it at whatever should sit on the surface of the glass. Geometry closer to the camera floats out of the display; geometry beyond it recedes.
Coordinates are Blender's own: right-handed, Z up. This is the same
convention most mesh interchange formats and :mod:pyvista use, so no
conversion applies -- unlike :class:~quiltwright.povray.PovCamera,
which speaks POV-Ray's left-handed world.
The fov/focal_distance pairing matches PovCamera, so
:func:~quiltwright.povray.depth_budget and
:func:~quiltwright.povray.format_depth_budget accept either camera:
run the depth budget before committing Cycles to a 48-view render,
exactly as you would for POV-Ray.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
location
|
tuple[float, float, float]
|
Eye position |
required |
look_at
|
tuple[float, float, float]
|
Point the camera is aimed at. Becomes the focal plane. |
required |
up
|
tuple[float, float, float]
|
Up-hint used to build the camera basis. Must not be parallel
to the view direction. Defaults to |
(0.0, 0.0, 1.0)
|
fov
|
float
|
Vertical field of view in degrees. Looking Glass
recommends ~14° for object-centric content; see
:class: |
14.0
|
focal_distance
property
¶
Distance from the eye to the focal plane, in scene units.
aimed(location, aim, *, fov, focal_distance=None, lateral_shift=0.0, up=(0.0, 0.0, 1.0))
classmethod
¶
Adopt a scene's own viewpoint, re-aimed and re-centred for a sweep.
The mesh-world twin of :meth:.PovCamera.aimed, with the same
contract: the focal plane moves to focal_distance along the
original aim ray and the eye slides lateral_shift along the
camera's right vector, without touching the view direction or the
lens. Pair with :class:~quiltwright.povray.Clearance for enclosed
scenes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
location
|
Sequence[float]
|
The scene's eye position. |
required |
aim
|
Sequence[float]
|
The scene's aim point. Used for direction only unless
focal_distance is |
required |
fov
|
float
|
Vertical field of view in degrees. |
required |
focal_distance
|
float | None
|
Distance along the aim ray to place the focal plane. Defaults to the scene's own aim distance. |
None
|
lateral_shift
|
float
|
Distance to slide the eye along the camera's right vector before re-aiming. |
0.0
|
up
|
tuple[float, float, float]
|
Up-hint, as on :class: |
(0.0, 0.0, 1.0)
|
Returns:
| Type | Description |
|---|---|
CyclesCamera
|
The centre-view camera. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the camera is degenerate (see :meth: |
Source code in src/quiltwright/cycles.py
238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 | |
basis()
¶
Orthonormal camera basis (forward, right, up).
Right-handed -- right = forward x up_hint -- so a camera looking
down +y with +z up gets right = +x. The driver rebuilds
the same basis inside Blender; the end-to-end test pins the two
against each other via the focal-plane invariant.
Returns:
| Type | Description |
|---|---|
tuple[ndarray, ndarray, ndarray]
|
Three unit vectors as |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the camera is degenerate (zero-length view direction, or up parallel to it). |
Source code in src/quiltwright/cycles.py
209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 | |
autoframe_camera(scene, *, fov=14.0, view_direction=(0.0, -1.0, 0.0), up=(0.0, 0.0, 1.0), margin=FRAME_MARGIN, binary=None)
¶
Probe a mesh file's bounds and return a :class:CyclesCamera framing it.
:func:mesh_bounds then :func:frame_camera -- the one call an
unfamiliar mesh file needs before :func:render_cycles_quilt, since the
file carries no camera of its own. The returned camera's look_at is
the bounds centre (the focal plane); run
:func:~quiltwright.povray.format_depth_budget on it before committing to
a full sweep, exactly as for any other :class:CyclesCamera.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scene
|
str | Path
|
Path to an importable mesh format in :data: |
required |
fov
|
float
|
Vertical field of view in degrees. |
14.0
|
view_direction
|
Sequence[float]
|
Direction from the bounds centre to the eye; see
:func: |
(0.0, -1.0, 0.0)
|
up
|
tuple[float, float, float]
|
Up-hint for the camera. |
(0.0, 0.0, 1.0)
|
margin
|
float
|
Framing headroom; see :func: |
FRAME_MARGIN
|
binary
|
str | None
|
Blender executable; see :func: |
None
|
Returns:
| Type | Description |
|---|---|
CyclesCamera
|
The centre-view :class: |
Raises:
| Type | Description |
|---|---|
RuntimeError
|
If the bounds probe fails; see :func: |
Source code in src/quiltwright/cycles.py
1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 | |
cycles_camera_from_plotter(plotter, *, fov=14.0, zoom=None)
¶
Build the :class:CyclesCamera matching a plotter's current view.
The plotter's camera defines the centre view and its focal point becomes
the holographic focal plane, exactly as in
:func:~quiltwright.lfd.render_quilt -- including its FOV convention:
the lens is narrowed to fov and the camera dollied back so the focal
plane stays the same size in frame. The result is expressed in
Blender's world under the glTF contract above, so it pairs with
:func:export_plotter_gltf and nothing else.
The plotter is read, never mutated: unlike render_quilt, whose
sweep must drive the live VTK camera, this backend renders from a copy
of the view, so the plotter remains exactly as composed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
plotter
|
A |
required | |
fov
|
float | None
|
Vertical field of view in degrees for the quilt cameras;
the eye dollies back to compensate. |
14.0
|
zoom
|
float | None
|
Optional dolly factor applied after framing; values > 1 make the subject fill more of each tile, which is what drives perceived depth. |
None
|
Returns:
| Type | Description |
|---|---|
|
The centre-view :class: |
Source code in src/quiltwright/cycles.py
1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 | |
export_plotter_gltf(plotter, path)
¶
Export a composed PyVista plotter scene as glTF for this backend.
A thin wrapper over plotter.export_gltf that pins the export
settings the coordinate contract above depends on -- most importantly
rotate_scene=False. Export works headless: no OpenGL context or
prior render is required, so it runs where plotter.show() cannot.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
plotter
|
A |
required | |
path
|
str | Path
|
Destination |
required |
Returns:
| Type | Description |
|---|---|
Path
|
path, as a :class: |
Source code in src/quiltwright/cycles.py
1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 | |
frame_camera(lo, hi, *, fov=14.0, view_direction=(0.0, -1.0, 0.0), up=(0.0, 0.0, 1.0), margin=FRAME_MARGIN)
¶
A :class:CyclesCamera framing an axis-aligned box, aimed at its centre.
Places the eye along view_direction from the box centre at the distance
that makes the box's enclosing sphere fill fov (with margin
headroom), and aims back at the centre -- which becomes the holographic
focal plane. Uses the exact spherical relation sin(fov/2) = r / d
rather than the small-angle tangent, since object-centric FOVs (~14-30
deg) are not small angles; the enclosing sphere (half the box diagonal)
is used so the whole box stays framed from any view_direction.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
lo
|
Sequence[float] | ndarray
|
Box minimum corner |
required |
hi
|
Sequence[float] | ndarray
|
Box maximum corner. |
required |
fov
|
float
|
Vertical field of view in degrees. |
14.0
|
view_direction
|
Sequence[float] | ndarray
|
Direction from the box centre to the eye; need not
be normalised. The default |
(0.0, -1.0, 0.0)
|
up
|
tuple[float, float, float]
|
Up-hint passed to the camera; must not be parallel to view_direction. |
(0.0, 0.0, 1.0)
|
margin
|
float
|
Framing headroom beyond a tight fit -- 1.0 is exactly tight, the default leaves a little air. |
FRAME_MARGIN
|
Returns:
| Type | Description |
|---|---|
CyclesCamera
|
The centre-view :class: |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the box is degenerate (zero diagonal) or view_direction is the zero vector. |
Source code in src/quiltwright/cycles.py
1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 | |
mesh_bounds(scene, *, binary=None, extra_args=())
¶
Import a mesh file headlessly and return its world-space bounds.
Runs one background Blender that imports scene through the same
importer :func:render_cycles_quilt uses -- so the returned box is
exactly what the render will see, with the file's transforms and
axis conversion applied -- and reports the combined bounding box of every
mesh object. Pair with :func:frame_camera (or call
:func:autoframe_camera, which does both) to give an imported mesh the
camera it doesn't carry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scene
|
str | Path
|
Path to an importable mesh format in :data: |
required |
binary
|
str | None
|
Blender executable; see :func: |
None
|
extra_args
|
Sequence[str]
|
Extra Blender command-line arguments. |
()
|
Returns:
| Type | Description |
|---|---|
tuple[ndarray, ndarray]
|
|
Raises:
| Type | Description |
|---|---|
FileNotFoundError
|
If the scene file does not exist. |
ValueError
|
If the format is unsupported, or is |
RuntimeError
|
If Blender fails, or the scene has no mesh object. |
Source code in src/quiltwright/cycles.py
1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 | |
render_cycles_path(scene, spec, cameras, out_dir, *, view_cone=None, samples=64, denoise=True, view_transform='Standard', device='auto', lighting='soft', threads=None, binary=None, extra_args=(), progress=True)
¶
Render a mesh scene from each camera of a path, as numbered frames.
One frame per camera, each the quilt :func:render_cycles_quilt would
make from that camera -- or, with :meth:.QuiltSpec.still, one flat
image -- written as frame_0000.png, frame_0001.png, ... for an
encoder such as ffmpeg -i frame_%04d.png. The whole path renders
in one Blender process, so the scene imports once and Cycles keeps
its BVH across frames; calling :func:render_cycles_quilt per frame
pays Blender's start-up and the import every time.
The lighting rig is placed once, from the first camera, and stays fixed
in the world as the camera moves. Each camera's look_at sets that
frame's focal plane and clip range.
Every view of the path is held in a temporary directory until Blender exits, so disk use is about frames x views x one PNG.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scene
|
str | Path
|
Path to the scene, as for :func: |
required |
spec
|
QuiltSpec
|
Quilt specification for every frame. |
required |
cameras
|
Sequence[CyclesCamera]
|
One camera per frame, in order. At least one. |
required |
out_dir
|
str | Path
|
Directory to write the frames into; created if absent. |
required |
view_cone
|
float | None
|
Override the spec's view cone in degrees. |
None
|
samples
|
int
|
Cycles samples per pixel. |
64
|
denoise
|
bool
|
Run Cycles' denoiser on each view. |
True
|
view_transform
|
str
|
Color management; see :func: |
'Standard'
|
device
|
str
|
|
'auto'
|
lighting
|
str | Path | None
|
Rig for an unlit imported scene; see
:func: |
'soft'
|
threads
|
int | None
|
Blender |
None
|
binary
|
str | None
|
Blender executable override. |
None
|
extra_args
|
Sequence[str]
|
Extra Blender command-line arguments. |
()
|
progress
|
bool
|
Print a progress line while rendering. |
True
|
Returns:
| Type | Description |
|---|---|
list[Path]
|
Paths to the written frames, in path order. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If cameras is empty or any camera is degenerate. |
Source code in src/quiltwright/cycles.py
1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 | |
render_cycles_quilt(scene, spec, camera, *, view_cone=None, samples=64, denoise=True, view_transform='Standard', device='auto', lighting='soft', threads=None, binary=None, extra_args=(), keep_views=None, progress=True)
¶
Render a mesh scene with Cycles into a Looking Glass quilt.
Sweeps camera horizontally across the display's view cone using
off-axis projections (see the module docstring), path-traces one image
per view, and tiles them with :func:~quiltwright.lfd.assemble_quilt.
The whole sweep runs in one Blender process: the scene imports once
and Cycles keeps its BVH across views (use_persistent_data), so cost
per view is dominated by actual ray tracing -- on Apple Silicon, Metal
hardware ray tracing when a GPU device is available.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scene
|
str | Path
|
Path to the scene -- |
required |
spec
|
QuiltSpec
|
Quilt specification (grid, size, aspect, cone). |
required |
camera
|
CyclesCamera | None
|
Base camera; its |
required |
view_cone
|
float | None
|
Override the spec's view cone in degrees. |
None
|
samples
|
int
|
Cycles samples per pixel. 64 previews cleanly with denoising; 128-256 for finals. |
64
|
denoise
|
bool
|
Run Cycles' denoiser on each view. |
True
|
view_transform
|
str
|
Color management applied to the render -- an OCIO
view transform name Blender recognises ( |
'Standard'
|
device
|
str
|
|
'auto'
|
lighting
|
str | Path | None
|
How to light an imported scene that has no lights of
its own -- without this a path tracer renders an unlit import black.
|
'soft'
|
threads
|
int | None
|
Blender |
None
|
binary
|
str | None
|
Blender executable; defaults to |
None
|
extra_args
|
Sequence[str]
|
Extra Blender command-line arguments, e.g. a
|
()
|
keep_views
|
str | Path | None
|
Directory to retain the per-view PNGs and the job
description in, for inspection. Discarded if |
None
|
progress
|
bool
|
Print a progress line while rendering. |
True
|
Returns:
| Type | Description |
|---|---|
ndarray
|
|
Source code in src/quiltwright/cycles.py
865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 | |
render_cycles_quilt_from_plotter(plotter, spec, *, fov=14.0, zoom=None, gltf=None, **kwargs)
¶
Render a PyVista plotter's scene into a quilt with Cycles.
The hardware-ray-traced sibling of :func:~quiltwright.lfd.render_quilt:
same plotter in, same quilt out, but the views are path-traced by Cycles
-- with GPU ray tracing where the hardware offers it -- instead of
rasterised by VTK. Compose the scene and position the camera exactly as
you would for render_quilt, then swap the call.
The scene is exported to glTF once (see :func:export_plotter_gltf) and
the whole sweep renders in one Blender process. The export carries no
lights, so the backend's lighting rigs supply them -- the "soft"
default for a neutral look, lighting="studio" for a three-point
product shot, "sky" or an HDRI path for environments; pass
materials-appropriate samples for finals.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
plotter
|
An off-screen |
required | |
spec
|
QuiltSpec
|
Quilt specification (grid, size, aspect, cone). |
required |
fov
|
float | None
|
Vertical field of view in degrees, with the
|
14.0
|
zoom
|
float | None
|
Optional dolly factor applied after framing, as on
:func: |
None
|
gltf
|
str | Path | None
|
Also write the exported scene here, for inspection or
reuse. Exported to a temporary file if |
None
|
kwargs
|
Forwarded to :func: |
{}
|
Returns:
| Type | Description |
|---|---|
ndarray
|
|
Source code in src/quiltwright/cycles.py
1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 | |
render_cycles_views(scene, spec, camera, out_dir, *, view_cone=None, samples=64, denoise=True, view_transform='Standard', device='auto', lighting='soft', threads=None, binary=None, extra_args=(), keep_job=False, progress=True)
¶
Render a mesh scene as a sweep of separate view images.
Identical camera geometry to :func:render_cycles_quilt -- the same
off-axis sheared frustum, the same focal plane -- but the frames are
written out individually instead of being tiled into a quilt, for
consumers like hologram printers and lenticular interlacers. Pair with
:func:~quiltwright.lfd.sweep_spec for view counts no quilt grid can
express.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scene
|
str | Path
|
Path to the scene, as for :func: |
required |
spec
|
QuiltSpec
|
Sweep or quilt specification supplying view count, view cone, and per-view pixel size. |
required |
camera
|
CyclesCamera | None
|
Base camera, or |
required |
out_dir
|
str | Path
|
Directory to write the frames into; created if absent. |
required |
view_cone
|
float | None
|
Override the spec's view cone in degrees. |
None
|
samples
|
int
|
Cycles samples per pixel. |
64
|
denoise
|
bool
|
Run Cycles' denoiser on each view. |
True
|
view_transform
|
str
|
Color management; see :func: |
'Standard'
|
device
|
str
|
|
'auto'
|
lighting
|
str | Path | None
|
Rig for an unlit imported scene -- |
'soft'
|
threads
|
int | None
|
Blender |
None
|
binary
|
str | None
|
Blender executable override. |
None
|
extra_args
|
Sequence[str]
|
Extra Blender command-line arguments. |
()
|
keep_job
|
bool
|
Also write the |
False
|
progress
|
bool
|
Print a progress line while rendering. |
True
|
Returns:
| Type | Description |
|---|---|
list[Path]
|
Paths to the written frames, in view order -- view 0 leftmost. |
Source code in src/quiltwright/cycles.py
970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 | |
view_shift_x(offset, focal_distance, fov, aspect)
¶
Blender camera shift_x for one quilt view, under a horizontal
sensor fit.
The off-axis shear in Blender's units: the eye has translated offset
along the right vector, and this shift slides the frustum window back so
the original look-at point stays centred. It is the same quantity VTK's
SetWindowCenter receives in the PyVista backend, converted from
half-widths to Blender's fractions of the frame width (a factor of 2).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
offset
|
float
|
Lateral eye offset along the camera's right vector, in
scene units, from :func: |
required |
focal_distance
|
float
|
Camera-to-focal-plane distance, in scene units. |
required |
fov
|
float
|
Vertical field of view in degrees. |
required |
aspect
|
float
|
Width / height of the rendered view. |
required |
Returns:
| Type | Description |
|---|---|
float
|
The |
Source code in src/quiltwright/cycles.py
285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 | |