Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYimingWu <xp8110@outlook.com>2021-07-28 14:55:29 +0300
committerYimingWu <xp8110@outlook.com>2021-07-28 14:55:29 +0300
commit8e9d06f5a0425255ce526e9c1aa7f852165749f0 (patch)
tree63810f0ac5e66ef5a1cb1be53035a6333a982b89 /source/blender/makesdna
parent544ddcdaac20bab7707a49edbd31b8ae38446603 (diff)
LineArt: Camera Overscan
Expand camera effective region to a portion beyond image frame so strokes won't end right at the border. Reviewed By: Antonio Vazquez (antoniov) Differential Revision: https://developer.blender.org/D12049
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r--source/blender/makesdna/DNA_gpencil_modifier_defaults.h1
-rw-r--r--source/blender/makesdna/DNA_gpencil_modifier_types.h8
2 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_gpencil_modifier_defaults.h b/source/blender/makesdna/DNA_gpencil_modifier_defaults.h
index b9697beeea9..81e9abc4916 100644
--- a/source/blender/makesdna/DNA_gpencil_modifier_defaults.h
+++ b/source/blender/makesdna/DNA_gpencil_modifier_defaults.h
@@ -307,6 +307,7 @@
.calculation_flags = LRT_ALLOW_DUPLI_OBJECTS | LRT_ALLOW_CLIPPING_BOUNDARIES, \
.angle_splitting_threshold = DEG2RAD(60.0f), \
.chaining_image_threshold = 0.001f, \
+ .overscan = 0.1f,\
}
#define _DNA_DEFAULT_LengthGpencilModifierData \
diff --git a/source/blender/makesdna/DNA_gpencil_modifier_types.h b/source/blender/makesdna/DNA_gpencil_modifier_types.h
index fac5bd3d4f4..6ffaf457d63 100644
--- a/source/blender/makesdna/DNA_gpencil_modifier_types.h
+++ b/source/blender/makesdna/DNA_gpencil_modifier_types.h
@@ -963,6 +963,12 @@ typedef struct LineartGpencilModifierData {
char source_vertex_group[64];
char vgname[64];
+ /* Camera focal length is divided by (1 + overscan), before caluclation, which give a wider FOV,
+ * this doesn't change coordinates range internally (-1, 1), but makes the caluclated frame
+ * bigger than actual output. This is for the easier shifting calculation. A value of 0.5 means
+ * the "internal" focal length become 2/3 of the actual camera. */
+ float overscan;
+
float opacity;
short thickness;
@@ -970,7 +976,7 @@ typedef struct LineartGpencilModifierData {
unsigned char material_mask_bits;
unsigned char intersection_mask;
- char _pad[7];
+ char _pad[3];
/** `0..1` range for cosine angle */
float crease_threshold;