mathematics and implementation of computer graphics techniques 2015 boundary aligned smooth 3d...
TRANSCRIPT
Mathematics and Implementation of Computer Graphics Techniques 2015
Boundary Aligned Smooth 3D Cross-Frame Field
Jin Huang, Yiying Tong, Hongyu Wei, Hujun BaoSIGGRAPH Asia 2011
Kenshi Takayama
Assistant Prof @ National Insitute of Informatics
1st round
25 July 2015
Background: 2D Frame Field & Quad Meshing
• 2D Frame Field Auto-computed
• UV Parameterization Auto-computed
Mixed-Integer Quadrangulation [Bommes,Zimmer,Kobbelt,SIGGRAPH09]
2D Frame Field UV Parameterization= Quad Mesh
2
Background: 3D Frame Field & Hex Meshing
CubeCover - Parameterization of 3D Volumes [Nieser,Reitebuch,Polthier,SGP11]
“Meta-Mesh” to define 3D Frame Field
UVW Parameterization= Hex Mesh
• 3D Frame Field Heuristic
• UVW Parameterization Auto-computed
3
Definition of 3D Frame
• Don’t care about orientation / ordering of axes
• Question: How distant is from ?
• Key insight:
• Invariant under sign flip / axis reordering!
・・・𝑅1
𝑅2𝑅3
𝑅4
4
Distance between 3D Frames
• Integral over an entire sphere Spherical Harmonics!
𝑑 (𝑅𝑎 ,𝑅𝑏)≔ ∫𝑠∈ 𝑆2
❑
❑
h (𝑅𝑎⊤𝑠 ) h (𝑅𝑏
⊤𝑠 )
𝑑𝑠
2
h (𝑠)≔𝑠𝑥2 𝑠𝑦
2 +𝑠𝑦2 𝑠𝑧
2+𝑠𝑧2 𝑠𝑥
2
5
Basics of Spherical Harmonics
• Something like Fourier series on sphere
• Orthonormality:
6
𝑓 (𝜃 ,𝜙 )=∑𝑙=0
∞
∑𝑚=−𝑙
𝑙
𝑓 𝑙𝑚𝑌 𝑙
𝑚 (𝜃 ,𝜙 )
∫𝑠 ∈𝑆2
❑
𝑌 𝑙𝑚1 (𝑠)𝑌 𝑙
𝑚2 (𝑠 )𝑑𝑠={1 if𝑚1=𝑚2
0 otherwise
𝑚
𝑙
3210-1-2-3
3
2
1
0
Frame represented by SH
• “Frequency” unaffectedby rotation:
• Frame represented as SH coeffs for band (i.e. 9-vector) :
• Coeffs mapped by some 9x9 matrix :
• Distance between & :
h (𝑠 )≔√7𝑌 40 (𝑠 )+√5𝑌 4
4 (𝑠 )h (𝑠)=− 2√𝜋15 (𝑌 4
0 (𝑠 )+√ 57 𝑌 44 (𝑠 )+16√𝜋𝑌 0
0 (𝑠 ))h (𝑅⊤𝑠 )=: 𝑓 [𝑅 ] (𝑠)= ∑
𝑚=− 4
4
𝜆𝑚𝑌 4𝑚 (𝑠)
�� [𝑅 ]=�� h
𝑑 (𝑅𝑎 ,𝑅𝑏)=‖��𝑎 h− ��𝑏 h‖2
simplify
𝑌 40𝑌 4
−1𝑌 4−2𝑌 4
−3𝑌 4−4 𝑌 4
1 𝑌 42 𝑌 4
3 𝑌 44
7
Computing 9x9 from 3D rotation
• Not immediately obvious
• Insight: Obvious for certain cases: & • (Not sure...)
Represent rotation by ZYZ Euler angle
Rotation about Z axis by θ
8
Frame that aligns with boundary surface
• Frame aligns with:• Z axis iff
• Surface normal iff
• : Rotation that brings n to Z axis
Coeff for
9
(Proof in Appendix)
Discretization & Objective
• Tetrahedral mesh over domain
• Frame var at center of every (interior/exterior) triangle
• Piecewise-linear frame field • Gradient constant within each tetrahedron
• Objective to be minimized:
𝐸 smooth≔∑TET 𝑗
volume (TET 𝑗 ) ∑𝑚=− 4
4
‖𝛁 �� TET 𝑗(𝑚)‖2
𝐸align≔ ∑TR I 𝑖∈𝜕Ω
area (TR I 𝑖 )‖( ��𝑛𝑖→Z𝑓 𝑝𝑖
) (0 )−√7‖2𝐸 full≔
𝐸 smooth
volume (Ω )1/3+𝑤align
𝐸align
area (𝜕Ω )
10
Optimization
• Energy quadratic in Simple Laplace-like least squares <Step 1>
• Problem: Arbitrary doesn’t represent rotation!
<Step 2> Project to its closest rotation • (Not sure how to do it...)
• <Step 3> Using as initial guess, run nonlinear optimization over • L-BFGS (solver: ALGLIB, dlib, etc)• (Not sure about analytic form of derivative...)
11
Results & Performance
12
Questions
• Regarding implementation:• Expressions for & • Projection of to its closest rotation • Analytic derivative of w.r.t.
• Possible idea for improvement:• Can we sidestep nonlinear optimization
by alternating Laplace smoothing and “normalization”?
13