Introduction to Computer Graphics – Modeling (3) –
April 30, 2020 Kenshi Takayama
Introduction to Computer Graphics Modeling (3) April 30, 2020 - - PowerPoint PPT Presentation
Introduction to Computer Graphics Modeling (3) April 30, 2020 Kenshi Takayama Solid modeling 2 Thin shapes represented Unorientable Solid models by single polygons Clear definition of inside & outside at any 3D
April 30, 2020 Kenshi Takayama
2
3
3D printing Physics simulation
Open boundaries (holes) Self-intersections Thin shapes represented by single polygons Unorientable
Non-solid cases Klein bottle
𝐪 ∈ ℝ! is inside/outside of the model 𝑔 𝐪 : ℝ! ↦ true, false
𝐪 𝑔 𝐪 = true } ⊂ ℝ!
4
Box whose min & max corners are 𝑦!"#, 𝑧!"#, 𝑨!"# & 𝑦!$%, 𝑧!$%, 𝑨!$% Sphere of radius 𝑠 centered at 𝐝 𝑔 𝐪 ≔ 𝐪 − 𝐝 < 𝑠 𝑔 𝑦, 𝑧, 𝑨 ≔ 𝑦!"# < 𝑦 < 𝑦!$% ∧ 𝑧!"# < 𝑧 < 𝑧!$% ∧ 𝑨!"# < 𝑨 < 𝑨!$% c r 𝐪!$% 𝐪!"#
5
Union
𝑔
/(𝐪)
𝑔
/(𝐪)
𝑔
/(𝐪)
Intersection Subtraction
CSG Tree
A B C D E
𝐵 ∩ 𝐶 ∖ 𝐷 ∪ 𝐸 ∪ 𝐹
3D point to model surface: 𝑒 𝐪 : ℝ! ↦ ℝ
𝑔 𝐪 ≔ 𝑒(𝐪) < 0
{𝐪 | 𝑒(𝐪) = 0} ⊂ ℝ!
6
c r Sphere of radius 𝑠 centered at 𝐝 𝑒 𝐪 ≔ 𝐪 − 𝐝 − 𝑠
7
Torus with major & minor radii R & a Not necessarily distance functions
8
𝑒 𝐪 = 𝑒3 𝐪 − 𝑒4(𝐪) 𝑒 𝐪 = 𝑒3 𝐪 + 𝑒4(𝐪) 𝑒5 𝐪 = 𝑟5 𝐪 − 𝐝5 − 𝑠5 𝑒 𝐪 = 𝑒3 𝐪 + 𝑒4 𝐪 + 𝑒6 𝐪 + 𝑒7 𝐪
c1 c4 c3 c2
9
𝑒3 𝒒 = 0 2 3 𝑒3 𝒒 + 1 3 𝑒4 𝒒 = 0 1 3 𝑒3 𝒒 + 2 3 𝑒4 𝒒 = 0 𝑒4 𝒒 = 0
10
11
A gradient-based implicit blend [Gourmel,Barthe,Cani,Wyvill,Bernhardt,Grasberger,TOG13] Traditional (simple sum) Proposed
(1) Compute function values at 8 corners (2) Determine type of output triangles based on the sign pattern
(3) Determine vertex positions by linearly interpolating function values
12
Marching Cubes: A High Resolution 3D Surface Construction Algorithm [Lorensen SIGGRAPH87]
13
Shapeshop; Sketch-based solid modeling with blobtrees [Schmidt,Wyvill,Sousa,Jorge,SBIM05]
14
A sketching interface for modeling the internal structures of 3d shapes [Owada,Nielsen,Nakazawa,Igarashi,SmartGraphics03]
15
The asymptotic decider: resolving the ambiguity in marching cubes [Nielson VIS91]
Discontinuous faces across neighboring cells New rules to resolve ambiguity
è Simpler implementation
16
http://paulbourke.net/geometry/polygonise/ Regularised marching tetrahedra: improved iso-surface extraction [Treece C&G99]
17
Feature Sensitive Surface Extraction from Volume Data [Kobbelt SIGGRAPH01] Dual Contouring of Hermite Data [Ju SIGGRAPH02] http://www.graphics.rwth-aachen.de/IsoEx/
Grid size: 65×65×65 Marching Cubes Improved version Marching Cubes (only uses function values) Improved version (uses function gradient as well)
18
Fast, exact, linear booleans [Bernstein SGP09] Exact and Robust (Self-)Intersections for Polygonal Meshes [Campen EG10] Mesh Arrangements for Solid Geometry [Zhou SIGGRAPH16] https://libigl.github.io/libigl/tutorial/tutorial.html#booleanoperationsonmeshes
19
Simplification and Repair of Polygonal Models Using Volumetric Techniques [Nooruddin TVCG03] Robust Inside-Outside Segmentation using Generalized Winding Numbers [Jacobson SIGGRAPH13]
Decide inside/outside based on generalized winding number Decide inside/outside by shooting rays from outside Volumetric representation Surface representation
20
21
Range Scanner (LIDAR) Structured Light Multi-View Stereo Depth Camera
Typical Computer Vision problems
8, 𝑜5 9, 𝑜5 : , 𝑗 ∈ 1, … , 𝑂
Important to other fields (e.g. Machine Learning) as well
22
𝑔
5
23
Modelling with implicit surfaces that interpolate [Turk TOG02] Hermite Radial Basis Functions Implicits [Macedo CGF10] Value+gradient constraints Hermite interpolation Simple offsetting
24
25
𝐲 ≔ (𝑦, 𝑧, 𝑨)
𝑦3 𝑧3 𝑨3 1 𝑦4 𝑧4 𝑨4 1 𝑦; 𝑧; 𝑨; 1 𝑏 𝑐 𝑑 𝑒 𝑔
3
𝑔
4
𝑔
; ・・・ ・・・
=
𝐠 𝑔 𝐲3 = 𝑏𝑦3 + 𝑐𝑧3 + 𝑑𝑨3 + 𝑒 = 𝑔
3
𝑔 𝐲4 = 𝑏𝑦4 + 𝑐𝑧4 + 𝑑𝑨4 + 𝑒 = 𝑔
4
𝑔 𝐲; = 𝑏𝑦; + 𝑐𝑧; + 𝑑𝑨; + 𝑒 = 𝑔
; ・・・
26
𝐠
𝐠
𝐵⊺𝐵 "#
𝐠
= = = 𝑩 𝐝 − 𝐠 4 = F
5<3 ;
𝑔 𝐲5 − 𝑔
5 4 “normal equation”
𝑒4 = 𝛽𝐪 + 𝛾𝐫 − 𝐬 4
27
𝑞8 𝑞9 𝑞: = 𝛽 𝛾 𝑟8 𝑟9 𝑟: 𝑠
8
𝑠
9
𝑠
:
F
5<3 ;
𝑥5 𝑔 𝐲5 − 𝑔
5 4
28
𝑦3 𝑧3 𝑨3 1 𝑦4 𝑧4 𝑨4 1 𝑦; 𝑧; 𝑨; 1 𝑏 𝑐 𝑑 𝑒 𝑔
3
𝑔
4
𝑔
; ・・・ ・・・
= 𝑥3 𝑥4 𝑥;
・ ・ ・
𝑥3 𝑥4 𝑥;
・ ・ ・
𝐠
29
𝐠
𝐵⊺𝑋"𝐵 #$
𝐠
= =
𝑥" 𝐲 = 𝑥( 𝐲 − 𝐲" )
' $&()&
è Coeffs 𝑏, 𝑐, 𝑑, 𝑒 are functions of 𝐲
30
𝑔 𝐲 = 𝑦 𝑧 𝑨 1 𝑏(𝐲) 𝑐(𝐲) 𝑑(𝐲) 𝑒(𝐲)
𝐵⊺𝑋 𝐲 (𝐵 )*
𝐠 𝐵⊺𝑋 𝐲 4 Larger the weight as 𝐲 is closer to 𝐲5
5 𝐲 = 𝑔
5 + 𝐲 − 𝐲5 ⊺𝐨5
F
5<3 ;
𝑥5 𝐲 𝑔 𝐲 − 5 𝐲
4
31
𝑦 𝑧 𝑨 1 𝑦 𝑧 𝑨 1 𝑦 𝑧 𝑨 1 𝑏 𝑐 𝑑 𝑒 3 𝐲 4 𝐲 ; 𝐲
・・・ ・・・
= 𝑥3(𝐲) 𝑥4(𝐲) 𝑥;(𝐲)
・ ・ ・
𝑥3(𝐲) 𝑥4(𝐲) 𝑥;(𝐲)
・ ・ ・ Interpolating and Approximating Implicit Surfaces from Polygon Soup [Shen SIGGRAPH04]
32
Normal constraints Simple offsetting
Interpolating and Approximating Implicit Surfaces from Polygon Soup [Shen SIGGRAPH04] Input : Polygon Soup Interpolation Approximation 1 Approximation 2 Approximation 3
33
356 7
(Gaussian)
3 𝐲 !DE!
(Inverse Multiquadric)
3
34
Basis function translated to each data point 𝐲$
Unknown
35
𝑔 𝐲3 = 𝑥3𝜚3,3 + 𝑥4𝜚3,4 + ⋯ + 𝑥;𝜚3,; = 𝑔
3
𝑔 𝐲4 = 𝑥3𝜚4,3 + 𝑥4𝜚4,4 + ⋯ + 𝑥;𝜚4,; = 𝑔
4
𝑔 𝐲; = 𝑥3𝜚;,3 + 𝑥4𝜚;,4 + ⋯ + 𝑥;𝜚;,; = 𝑔
;
Notation: 𝜚5,F = 𝜚 𝐲5 − 𝐲F ・・・
𝜚3,3 𝜚3,4 𝜚3,; 𝜚4,3 𝜚4,4 𝜚4,; 𝜚;,3 𝜚;,4 𝜚;,; 𝑥3 𝑥4 𝑥; 𝑔
3
𝑔
4
𝑔
; ・ ・ ・ ・・・
=
・・・
𝐠
36
Scattered Data Interpolation for Computer Graphics [Anjyo SIGGRAPH14 Course]
𝜏
小 大
ℝ" 𝛂;𝑔 𝐲 4𝑒𝐲
37
𝛂(𝑔 𝑦, 𝑧 ≔ 𝑔
%%, 𝑔 %+, 𝑔 +%, 𝑔 ++
𝐹( 𝑔 ≔ I
ℝ!𝑔 %% ( + 𝑔 ++ ( + 2𝑔 %+ (
𝛂(𝑔 𝑦, 𝑧, 𝑨 ≔ 𝑔
%%, 𝑔 %+, 𝑔 %-, 𝑔 +%, 𝑔 ++, 𝑔 +-, 𝑔
ℝ"𝑔 .. ( + 𝑔 // ( + 𝑔 00 ( + 2 𝑔 ./ ( + 𝑔 /0 ( + 𝑔 0. (
𝛂%𝑔 𝑦, 𝑧 ≔ 𝑔
&&&, 𝑔 &&', 𝑔 &'&, 𝑔 &'', 𝑔 '&&, 𝑔 '&', 𝑔 ''&, 𝑔 '''
𝐹1 𝑔 ≔ I
ℝ!𝑔 %%% ( + 𝑔 +++ (
+ 2 𝑔
%%+ (
+ 𝑔
++% (
𝛂!𝑔 𝑦, 𝑧 ≔ 𝑔
""", 𝑔 ""#, 𝑔 ""$, 𝑔 "#", 𝑔 "##, 𝑔 "#$, 𝑔 "$", 𝑔 "$#, 𝑔 "$$,
𝑔
#"", 𝑔 #"#, 𝑔 #"$, 𝑔 ##", 𝑔 ###, 𝑔 ##$, 𝑔 #$", 𝑔 #$#, 𝑔 #$$,
𝑔
$"", 𝑔 $"#, 𝑔 $"$, 𝑔 $#", 𝑔 $##, 𝑔 $#$, 𝑔 $$", 𝑔 $$#, 𝑔 $$$
𝑔
!!! " + 𝑔 ### "
+ 𝑔
$$$ " + 3 𝑔 !!# "
+ 𝑔
##$ "
+ 𝑔
$$! " + 𝑔 !## "
+ 𝑔
#$$ " + 𝑔 $!! "
+ 𝑔
!#$ "
𝐹1 𝑔 ≔ I
ℝ"
𝑛 = 2 𝑛 = 3 2D 3D “Thin-plate” energy
3 , the minimizer of 𝐹; 𝑔 is represented
𝐲 4OA6
𝐲 4OA4 log 𝐲
𝐲 4 log 𝐲 (minimizes 𝐹4)
𝐲 6 (minimizes 𝐹6)
38
Splines minimizing rotation-invariant semi-norms in Sobolev spaces [Duchon, 1977]
356 7
39
40
𝑔 𝐲# = 𝑥#𝜚#,# + 𝑥&𝜚#,& + ⋯ + 𝑥'𝜚#,' + 𝑏𝑦# + 𝑐𝑧# + 𝑑𝑨# + 𝑒 = 𝑔
#
𝑔 𝐲& = 𝑥#𝜚&,# + 𝑥&𝜚&,& + ⋯ + 𝑥'𝜚&,' + 𝑏𝑦& + 𝑐𝑧& + 𝑑𝑨& + 𝑒 = 𝑔
&
𝑔 𝐲' = 𝑥#𝜚',# + 𝑥&𝜚',& + ⋯ + 𝑥'𝜚',' + 𝑏𝑦' + 𝑐𝑧' + 𝑑𝑨' + 𝑒 = 𝑔
'
・・・ ・ ・ ・
𝜚3,3 𝜚3,4 𝜚3,; 𝑦3 𝑧3 𝑨3 1 𝜚4,3 𝜚4,4 𝜚4,; 𝑦4 𝑧4 𝑨4 1 𝜚;,3 𝜚;,4 𝜚;,; 𝑦; 𝑧; 𝑨; 1 𝑥3 𝑥4 𝑥; 𝑏 𝑐 𝑑 𝑒 𝑔
3
𝑔
4
𝑔
; ・・・ ・・・
=
・・・
𝐠
4 unknowns 𝑏, 𝑐, 𝑑, 𝑒 added è 4 new constraints needed
3 are sampled from a linear function, RBF should
;
𝑥5 = 0
;
𝑦5𝑥5 = 0
;
𝑧5𝑥5 = 0
;
𝑨5𝑥5 = 0
41
𝜚3,3 𝜚3,4 𝜚3,; 𝑦3 𝑧3 𝑨3 1 𝜚4,3 𝜚4,4 𝜚4,; 𝑦4 𝑧4 𝑨4 1 𝜚;,3 𝜚;,4 𝜚;,; 𝑦; 𝑧; 𝑨; 1 𝑦3 𝑦4 𝑦; 0 0 0 0 𝑧3 𝑧4 𝑧; 0 0 0 0 𝑨3 𝑨4 𝑧; 0 0 0 0 1 1 1 0 0 0 0 𝑥3 𝑥4 𝑥; 𝑏 𝑐 𝑑 𝑒 𝑔
3
𝑔
4
𝑔
; ・・・ ・・・
=
・・・ ・・・ ・ ・ ・
𝐠
Scattered Data Interpolation for Computer Graphics [Anjyo SIGGRAPH14 Course]
356 7
⊺𝛂𝜚 𝐲 − 𝐲3
356 7
42
= 𝜚88 𝜚89 𝜚8: 𝜚98 𝜚99 𝜚9: 𝜚:8 𝜚:9 𝜚::
Hermite Radial Basis Functions Implicits [Macedo CGF10] Hessian matrix (function) Unknown 3D vector
Gradient constraint: 𝛂𝑔 𝐲# = 𝑥#𝛂𝜚#,# + H(
#,#𝐰# + 𝑥&𝛂𝜚#,& + H( #,&𝐰& + ⋯ + 𝑥'𝛂𝜚#,' + H( #,'𝐰' +
𝑏 𝑐 𝑑 = 𝐨# Value constraint: 𝑔 𝐲# = 𝑥#𝜚#,# + 𝐰#
⊺𝛂𝜚#,# + 𝑥&𝜚#,& + 𝐰& ⊺𝛂𝜚#,& + ⋯ + 𝑥'𝜚#,' + 𝐰' ⊺ 𝛂𝜚#,' + 𝑏𝑦# + 𝑐𝑧# + 𝑑𝑨# + 𝑒 = 𝑔 #
43
Hermite Radial Basis Functions Implicits [Macedo CGF10]
𝐨# 𝑔
#
𝜚#,# 𝛂𝜚#,#
⊺
H(
#,#
𝛂𝜚#,# 𝜚#,& 𝛂𝜚#,&
⊺
H(
#,&
𝛂𝜚#,& 𝜚#,' 𝛂𝜚#,'
⊺
H(
#,'
𝛂𝜚#,' 𝑦# 𝑧# 𝑨# 1 1 0 0 0 0 1 0 0 0 0 1 0
・・・
=
6 𝑥# 𝐰# 𝐰& 𝑥&
・・・
𝐰' 𝑥' 𝑏 𝑐 𝑑 𝑒
44
𝐨# 𝑔
#
=
𝑥# 𝐰# 𝐰& 𝑥&
・・・
𝐰' 𝑥' 𝑏 𝑐 𝑑 𝑒
6
・・・ ・・・
4
7
・・・
6 ⊺
⊺
⊺ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 𝐨& 𝑔
&
𝐨' 𝑔
'
・・・ ・・・ ・ ・ ・
45
Gradient constraints Simple offsetting with value constraints only
value constraints 𝑔 𝐲0 = 0 gradient constraints 𝛂𝑔 𝐲0 = 𝐨0
can be uniquely specified by using RBF
è Unknown normals 𝐨0 determine the function: 𝑔 𝐨2 è Unknown normals 𝐨0 determine the function’s smoothness:
𝐹 𝐨2 ≔ 𝐹 𝑔 𝐨2
minimize 𝐨$𝐼 𝐨
$𝐨" = 1
∀𝑗
46
Variational Implicit Point Set Surfaces [Huang,Carr,Ju,SIGGRAPH19]
𝐨 = ⋮ 𝐨$
)
⋮
Matrix 𝐼 depends only on 𝐲3
47
Variational Implicit Point Set Surfaces [Huang,Carr,Ju,SIGGRAPH19]
Input points
48
49