Computer Graphics 2016 11. Complex 3D Hongxin Zhang State Key Lab of CAD&CG, Zhejiang University 2016-12-12
General spline curves parametric curve basis functions P(t) = X i P i B i (t) t 2 [t 0,t 1 ) control pints Computer Graphics @ ZJU Hongxin Zhang, 2016
Bézier curve Bézier curve where, P i (i=0,1,,n) are control points. Bernstein basis
Bézier curve
Bézier curve Rational Bézier Curve where B i,n (t) is Bernstein basis, ω i is the weight at p i. It s a generalization of Bézier curve, which can express more curves, such as circle.
Bézier surface Bézier surface Bézier surface: where B i,n (u) 和 B j,m (v) Bernstein basis with n degree and m degree, respectively, (n+1) (m+1) P i,j (i=0,1,,n; j=0,1,,m) construct the control meshes.
Bézier surface normal vector of Bézier surface partial derivation of Bézier surface S(u,v): normal N(u,v) :
NURBS curve B-spline curve disadvantages of Bézier curve: 1. control points determine the degree of the curve. many control points means high degree. 2. It s global. A control point influences the whole curve. de Boor et al. replaced Bernstein basis with B-spline basis to generate B-spline curve.
NURBS curve B-spline curve: Where P 0, P 1,,P n are control points, u=[u 0 =a, u 1,, u i,, u n+k+1 =b].
B-spline basis Computer Graphics @ ZJU Hongxin Zhang, 2016
NURBS curve B-spline---de Boor algorithm to calculate the point of B-spline curve C(u) at u: 1. find the interval where u lies in : u [u j,u j+1 ); 2. curve in u [u j,u j+1 ) is only determined by P j-p, P j-p+1,, P j ; 3. calculate 4. = C(u)
NURBS curve Catmull-Clark and Doo-Sabin subdivision Start from Catmull-Clark rules Doo-Sabin rules:
B-spline surface (n+1) (m+1) control points: P i,j (Degrees of u, v: p, q); nodes: U=[u 0,u 1,,u n+p+1 ], V = [v 0,v 1,, v m+q+1 ], Then a tensor B-spline surface with degree p q : Computer Graphics @ ZJU Hongxin Zhang, 2016
NURBS surface NURBS (Non-uniform Rational B-spline) NURBS curves: 重节点
NURBS surface NURBS surface ω ij : weights
Sweeping
More complex objects? Challenge: surface continuity? Computer Graphics @ ZJU Hongxin Zhang, 2016
Homework 4 - Write a report on car shape design - In A4 paper, at least 2 pages - Major solution, processing pipeline - Key techniques and standard - bonus: how to render the shape Computer Graphics @ ZJU Hongxin Zhang, 2016
Polygonal Mesh
What is polygonal mesh? - A polygon mesh is a collection of vertices, edges and faces that defines the shape of a polyhedral object in 3D computer graphics and solid modeling Computer Graphics @ ZJU Hongxin Zhang, 2016
What is polygonal mesh? - A polygon mesh is a collection of vertices, edges and faces that defines the shape of a polyhedral object in 3D computer graphics and solid modeling Computer Graphics @ ZJU Hongxin Zhang, 2016
polygonal mesh representations Computer Graphics @ ZJU Hongxin Zhang, 2016
polygonal mesh representations Computer Graphics @ ZJU Hongxin Zhang, 2016
Computer Graphics @ ZJU Hongxin Zhang, 2016
Wavefront.obj file # List of Vertices, with (x,y,z[,w]) coordinates, w is optional and defaults to 1.0. v 0.123 0.234 0.345 1.0 v...... # Texture coordinates, in (u,v [,w]) coordinates, these will vary between 0 and 1, w is optional and default to 0. vt 0.500 1 [0] vt...... # Normals in (x,y,z) form; normals might not be unit.. vn 0.707 0.000 0.707 vn...... # Parameter space vertices in ( u [,v] [,w] ) form; free form geometry statement ( see below ) vp 0.310000 3.210000 2.100000 vp...... # Face Definitions (see below) f 1 2 3 f 3/1 4/2 5/3 f 6/4/1 3/5/3 7/6/5 f...... Computer Graphics @ ZJU Hongxin Zhang, 2016
Wavefront.obj file - Vertex positions - v, vt, vn - Face definitions - f v1 v2 v3 v4... - f v1/vt1 v2/vt2 v3/vt3... - f v1/vt1/vn1 v2/vt2/vn2 v3/vt3/vn3... - f v1//vn1 v2//vn2 v3//vn3... - Referencing materials - mtllib [external.mtl file name] - usemtl [material name] Computer Graphics @ ZJU Hongxin Zhang, 2016
Wavefront.obj file - Named objects and polygon groups are specified via the following tags. - o [object name] - g [group name] - Smooth shading across polygons is enabled by smoothing groups. - s 1 -... - # Smooth shading can be disabled as well. - s off -... Computer Graphics @ ZJU Hongxin Zhang, 2016
Subdivision surfaces
Chaiken (1974)
subdivision surface subdivision curves: starting from a set of points, generate new points in every step under some rules, when such step goes on infinitely, the points will be convergent to a smooth curve.
subdivision surface
细分曲 面的基本概念 是 一种过程式 ( 迭代 ) 的曲 面构造 方法 输 入 : 多边形 网格 => 控制 网格 输出 :a. 加密 网格 => 有限次迭代 [ 用于绘制 ] b. 连续曲 面 => 极限曲 面 [ 用于分析 ] 离散 连续 Computer Graphics @ ZJU Hongxin Zhang, 2016
Classical subdivision schemes Catmull-Clark surface. [Catmull 1978] Doo-Sabin surface. [Doo 1978] Loop s subdivision schemes. [Loop 1987] Butterfly subdivision schemes. [Dyn 1990] 离散 连续 Computer Graphics @ ZJU Hongxin Zhang, 2016
advantage of subdivision surface - topologically complex shape - stable; - easy to implement; - no need to merge between the surfaces - LOD Computer Graphics @ ZJU Hongxin Zhang, 2016
细分曲 面的基本步骤 细分操作 : 拓拓扑规则 : 加密采样, 重新构造 网格 几何规则 : 光顺 网格 Computer Graphics @ ZJU Hongxin Zhang, 2016
Loop subdivision surface 拓拓扑规则 : 怎样加密三 角 网格? 对分每条边, 并连接新顶点 将每个三 角形剖分成四个更更 小的三 角形 Computer Graphics @ ZJU Hongxin Zhang, 2016
Loop subdivision surface 几何规则 : 怎样放置新顶点的位置? 利利 用原始 网格中与新顶点相邻的顶点来做加权平 均 如果顶点的连接度不不是 6 该怎么办? Computer Graphics @ ZJU Hongxin Zhang, 2016
Loop subdivision surface 几何规则 : 怎样放置新顶点的位置? 奇异顶点处的规则 Computer Graphics @ ZJU Hongxin Zhang, 2016
Loop subdivision surface 怎样选择系数 Beta? 分析极限曲 面性质 与曲 面的连续性和光滑性相关 需要计算相关 ( 细分系数 ) 矩阵的特征结构 Computer Graphics @ ZJU Hongxin Zhang, 2016
Loop subdivision surface 细分结果可达到较好的连续性光顺性! Computer Graphics @ ZJU Hongxin Zhang, 2016
Subdivision schemes 各种不不同的细分 方法 不不同的处理理拓拓扑加密 方法 不不同的布置顶点位置 方法 逼近 v.s. 插值 Computer Graphics @ ZJU Hongxin Zhang, 2016
细分曲 面的基本思想 向上采样 割 角 平均 回插 - 补偿 Computer Graphics @ ZJU Hongxin Zhang, 2016
四边 网格上的拓拓扑规则 Catmull-Clark 型 Primal Dual Doo-Sabin 型 10/09/11 Math Dept. ZJU. 13
Doo-Sabin 型细分曲 面 10/09/11 Math Dept. ZJU. 14
subdivision surface Catmull-Clark and Doo-Sabin subdivision start from Catmull-Clark rules Doo-Sabin rules:
Catmull-Clark subdivision 面点模板 边点模板 顶点模板 10/09/11 Math Dept. ZJU. 15
subdivision surface Catmull-Clark subdivision surface:
subdivision surface Doo-Sabin surface
不不同细分曲 面的 比较
不不同细分曲 面的 比较
参考资料料 普林林斯顿 大学的课件 半静态回插细分 From Pixar, Geri s Game
Geri s Game Computer Graphics @ ZJU Hongxin Zhang, 2016
subdivision + random terrain generation
terrain generation Computer Graphics @ ZJU Hongxin Zhang, 2016
More complex 3D
Boolean operation Boolean union Boolean difference Boolean intersection Constructive Solid Geometry
Constructive Solid Geometry
Self-similar Self-affine Invariant fractal set Fractal
Fractal Julia Set
字符 : F 常数 : +, 公理 : F++F++F 规则 : F F F++F F F : 向前 - : 左转 60 + : 右转 60 L-system
L-system for tree
Sketch Tree Demo
procedure (script) modeling A lot of research Natural scene modeling City modeling (shape grammar) Amazing software nodebox v.s. processing
粒 子系统 Computer Graphics @ ZJU Hongxin Zhang, 2016