Blender V4.3
DNA_camera_defaults.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
9#pragma once
10
11/* clang-format off */
12
13/* -------------------------------------------------------------------- */
17#define _DNA_DEFAULT_CameraDOFSettings \
18 { \
19 .aperture_fstop = 2.8f, \
20 .aperture_ratio = 1.0f, \
21 .focus_distance = 10.0f, \
22 }
23
24#define _DNA_DEFAULT_CameraStereoSettings \
25 { \
26 .interocular_distance = 0.065f, \
27 .convergence_distance = 30.0f * 0.065f, \
28 .pole_merge_angle_from = DEG2RADF(60.0f), \
29 .pole_merge_angle_to = DEG2RADF(75.0f), \
30 }
31
32#define _DNA_DEFAULT_Camera \
33 { \
34 .lens = 50.0f, \
35 .sensor_x = DEFAULT_SENSOR_WIDTH, \
36 .sensor_y = DEFAULT_SENSOR_HEIGHT, \
37 .clip_start = 0.1f, \
38 .clip_end = 1000.0f, \
39 .drawsize = 1.0f, \
40 .ortho_scale = 6.0, \
41 .flag = CAM_SHOWPASSEPARTOUT, \
42 .passepartalpha = 0.5f, \
43 \
44 .panorama_type = CAM_PANORAMA_FISHEYE_EQUISOLID,\
45 .fisheye_fov = M_PI,\
46 .fisheye_lens = 10.5f,\
47 .latitude_min = -0.5f * (float)M_PI,\
48 .latitude_max = 0.5f * (float)M_PI,\
49 .longitude_min = -M_PI,\
50 .longitude_max = M_PI,\
51 /* Fit to match default projective camera with focal_length 50 and sensor_width 36. */ \
52 .fisheye_polynomial_k0 = -1.1735143712967577e-05f,\
53 .fisheye_polynomial_k1 = -0.019988736953434998f,\
54 .fisheye_polynomial_k2 = -3.3525322965709175e-06f,\
55 .fisheye_polynomial_k3 = 3.099275275886036e-06f,\
56 .fisheye_polynomial_k4 = -2.6064646454854524e-08f,\
57 .central_cylindrical_range_u_min = DEG2RADF(-180.0f),\
58 .central_cylindrical_range_u_max = DEG2RADF(180.0f),\
59 .central_cylindrical_range_v_min = -1.0f,\
60 .central_cylindrical_range_v_max = 1.0f,\
61 .central_cylindrical_radius = 1.0f,\
62 \
63 .dof = _DNA_DEFAULT_CameraDOFSettings, \
64 \
65 .stereo = _DNA_DEFAULT_CameraStereoSettings, \
66 }
67
70/* clang-format on */