0% found this document useful (0 votes)
5 views

Modeling

The document discusses geometric modeling techniques, focusing on subdivision algorithms, B-splines, NURBS, and mesh editing methods. It explains how these techniques can be used to create and manipulate 3D models, including the use of differential coordinates and Laplacian mesh editing. Additionally, it provides examples of practical applications in software like Blender and Maya for generating and editing meshes.

Uploaded by

adeaa.atiq
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Modeling

The document discusses geometric modeling techniques, focusing on subdivision algorithms, B-splines, NURBS, and mesh editing methods. It explains how these techniques can be used to create and manipulate 3D models, including the use of differential coordinates and Laplacian mesh editing. Additionally, it provides examples of practical applications in software like Blender and Maya for generating and editing meshes.

Uploaded by

adeaa.atiq
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 50

Geometric Modeling

1/26
Indoors
Outdoors
Movies
Movies
Games
Games
Subdivision
•Procedural algorithm to automatically generate finer and smoother mesh from a coarser input
mesh
• Theoretically, a smooth limit surfaces can exist (depending on the algorithm used)
• After just a few refinements, additional changes often become too small to see/matter

8/31
Subdivision Curves

9/31
Subdivision Surfaces

10/31
Loop Subdivision
•Subdivide each triangle into 4 triangles, and move old and new vertices to new
positions (repeat until reaching the desired resolution)
•Generates a C2 continuous limit surface almost everywhere (except at some
extraordinary vertices where the limit is C1 continuous)

12/31
Move Old/New Vertices
•Perturb the position of each new vertex (black) using a weighted average of the four nearby
original vertices (grey)
•Perturb the position of each original vertex (grey) using a weighted average of the six adjacent
original vertices (grey), assuming the vertex is regular
• Repeat until converged (or a few times)
Extraordinary Points
• Most vertices are regular (degree 6), but not all
• if a mesh is topologically equivalent to a sphere, not all vertices can have degree 6
•At extraordinary points, Warren weights can be used to generate a smooth surface (i.e., the
tangent plane is continuous)
3 3
• When the number of points is 𝑛 = 3, 𝛽 = ; else 𝛽 =
&6 (𝑛

extraordinary
point
Initial Mesh
Add New Vertices
New Vertex and Stencil
Move New Vertex
Original (Regular) Vertex and Stencil
Move Original (Regular) Vertex
Original (Extraordinary) Vertex and Stencil
Move Original (Extraordinary) Vertex
Subdivided Surface
Subdivide Again
And Again
And Again
Final Limit Surface
B-Spline Basis Functions
• Knots – node locations 𝑢0 , 𝑢$ , … 𝑢𝑚
• Lowest level building blocks are piecewise constant (m of them):

i f 𝑢( ≤ 𝑢 < 𝑢 (0$
𝑛(,0 𝑢 = * 1
0 𝑜𝑡ℎ𝑒𝑟𝑤i𝑠𝑒

0-th order: 𝑛>,> 𝑛1,> 𝑛@,>

• Higher order building blocks are defined recursively (i-th basis function of order j is…):
𝑢 − 𝑢( 𝑢 (090$ − 𝑢
𝑛(,9 𝑢 = 𝑛 (,9;$ 𝑢 + 𝑛 (0$,9;$ 𝑢
𝑢(09 − 𝑢( 𝑢 (090$ − 𝑢 (0$

1st order: 𝑛>,1 𝑛 1,1 2nd order: 𝑛>,@


B-Spline Basis Functions
• The basis functions for a B-spline of order 𝑝 are 𝑛 i,𝑝 𝑢
• Let 𝑃 ( , 𝑃 ) , … , 𝑃 𝑛 be control points in (2D or 3D)
•The B-spline is defined as: 𝐶 𝑢 = ∑𝑛i/ ( 𝑛 i,𝑝 𝑢 𝑃 i

• Given m intervals, a B-spline of order p


requires m-p control points 𝑃 i
•For example, the m=6 intervals (to the
right) with order p=3 requires m-p=3
(orange box) control points 𝑃 i
•Thus, the summation (above) would go
from 0 to 2 to include 3 control points
B-Spline
• Moving control points changes the shape of the curve
• For each parametric domain interval, 4 control points shape the curve
• e.g., 𝑠0 = (.3,.4) is controlled 𝑃 0 , 𝑃 1, 𝑃&, 𝑃 3
• [u3,u4) is the first interval to have a full representation in the orange box (of prior slide): 𝑛 0,3 , 𝑛 1,3 , 𝑛 &,3, 𝑛 3,3
• 3 parametric domain intervals are lost off of each side (of the domain)

control point

m=10 intervals
order p=3
knots n+1=10-3 (n=6)
0 to 6 is 7 control points
𝑠0 𝑠1 𝑠& 𝑠3
parametric domain: 𝑢= 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
NURBS Curve
∑i𝑛&0 𝑛 i , 𝑝 𝑢 - i 𝑃 i
• NURBS (Non-Uniform Rational B-Spline) curve is defined by: 𝐶 𝑢 = ∑i𝑛&0 𝑛 i , 𝑝 𝑢 - i
•Increasing the weight 𝑤0on point 𝑃0 pulls the curve closer to 𝑃0, while decreasing 𝑤0releases
the curve to move farther away from 𝑃0
NURBS Surface
• Extending the ideas from curves to surfaces, a NURBS surface is defined as:
∑i(𝑚 ∑𝑛
) +( ) 𝑛 i,𝑝 𝑢 𝑛+,𝑞 𝑣 𝑤i,+𝑃i,+
𝑆 𝑢, 𝑣 = 𝑚 ∑𝑛
∑i( ) +( ) 𝑛 i,𝑝 𝑢 𝑛+,𝑞 𝑣 𝑤i,+
• A 2D array of control points 𝑃i,+ is associated with each basis function 𝑛 i,𝑝 𝑢 𝑛+,𝑞 𝑣
Subdividing Spline Curves
• Add more parametric knots and 2D/3D control points

• First, insert new knots without changing the shape of the curve
• When inserting a knot, add a control point as well
• The positions of the control points are updated to preserve the shape of the curve

• For example: given a spline curve of degree 𝑝 with knots {𝑢$, 𝑢&, … 𝑢 𝑚 } and control points
𝑃 $ , 𝑃 &, … , 𝑃 𝑛
• Insert a new knot 𝑢,between 𝑢𝑘and 𝑢 𝑘 . &
• Add one more control point obtaining the new set of control points 𝑃 ∗$, 𝑃 ∗&, … , 𝑃 ∗𝑛 . &

• After creating more control points, can modify the shape of the curve
Original Curve
Insert a Knot
Add/Adjust Control Points
Adjusting Control Points
• The positions of the new control points are computed using linear interpolation:
𝑃 ∗i = 1 − 𝛼i 𝑃 i ( ) + 𝛼 i 𝑃 i

1 +< 𝑘 − 𝑝 + 1
• Here, 𝛼i = 0 +> 𝑘
𝑢(𝑢31
𝑘 − 𝑝 + 1 ≤ +≤ 𝑘
𝑢 34𝑝 (𝑢 3

• 𝛼i = 1 sets 𝑃 ∗i = 𝑃 i leaving the control point as is (for the control points in the beginning of
the parametric domain)
• 𝛼i = 0 sets 𝑃 ∗i = 𝑃 i ( ) leaving the control point as is, but renumbering it based on the new
number of control points (for control points near the end of the parametric domain)
Mesh Editing
•Manipulate a few control/mesh points and use an algorithm to procedurally deform the mesh
(e.g., twist, bend, stretch, etc.)
• Fast, intuitive, preserves details, widely used in CAD software such as Blender, Maya, etc.
• Spline (e.g. B-spline, NURBS) mesh editing uses control points (as seen in previous slides)
• Laplacian mesh editing allows one to directly move mesh points

mesh editing in Blender spline mesh editing Laplacian mesh editing


Differential Coordinates
•The differential coordinate is the difference between a vertex’s position 𝑥i and the average
position of its neighbors:
1
𝑑i = 𝐿 𝑥i = 𝑥i − ) 𝑥*
𝑛i *∈ i
𝑛
• Differential coordinates approximate the local shape:
• The direction of 𝑑i approximates the normal vector direction
• The magnitude of 𝑑i approximates the mean curvature

• A mesh can be described by a vector of differential coordinates of all its vertices: 𝐷


•One can write 𝐷 = 𝑀0 where 0 is a vector of all the vertex positions, because each 𝑑i is linear
in 𝑥i and all the 𝑥*
• 𝑀 is a constant coefficient and sparse matrix
• vertices only interact with their immediate neighbors
Laplacian Mesh Editing
•Selects control points 𝑥𝑐 for 𝑐 = 1,2, ⋯ , 𝑛 in the region of interest (ROI) and set a target
position 𝑝𝑐 for each control point
• Then, solve the sparse linear system 𝑀X, = 𝐷 for all 𝑥/0 in the ROI, with soft constraints of 𝑥/𝑐
= 𝑝𝑐 on control points
<
• E.g., minimize 𝐸 X, = ∑0∈456 𝑑0 − 𝐿(𝑥/0) < <
+ ∑ 𝑛 𝑥/
𝑐 >1 𝑐 − 𝑝𝑐 <
• Differential coordinates are sensitive to local deformations, so a transformation matrix 𝑇0 X, is
<
computed for each vertex via: min 𝑇0𝑥0 − 𝑥/0 <
<+ ∑ j∈𝑁 i 𝑇0𝑥j − 𝑥/j
𝑇i <
< <
• Then 𝐸 X, = ∑ 0∈4 5 6 𝑇0 X, 𝑑0 − 𝐿(𝑥/0) + ∑𝑐𝑛>1 𝑥/𝑐 − 𝑝𝑐 <
<
Examples
Blender, Maya, Meshlab
• Creates all the meshes with modeling software
•Extends the obj loader given in sample code to read vertex locations,
normals, faces, and texture coordinates from files made in Maya and Blender
Blender, Loop Subdivision, Fluid Simulator
•Modeled all the meshes with low resolution in Blender, and then loop-
subdivide them for smoother looking
• Generate the icings of the donuts using a fluid simulator
• Generate nomal map from the texture using crazybump
Artistic Scene Layout with Mixed Downloaded and Manually Generated Meshes
• Find the cloth and other mesh objects available online
• Manually generate mesh for the diamond
• Put everything together artistically, create a scene that resembles traditional still life oil paintings
Perlin Noise, Procedural Mesh/Texturing Generation
•Procedurally generate terrain with a 2D Perlin Noise function followed by 3 iterations
of Loop subdivision
• Partition the terrain mesh into grass, snow, and water regions based on height
• Model and animate clouds with a 3D Perlin noise function
Procedural and Parametric Mesh Generation
•The boat is parametrically calculated from a number of values; the length, width,
height, thickness, quadratic width, etc.
• The bridge is also parametrically calculated from the given values length, width,
thickness, gap size and number of boards.
•The waves in the sea are procedurally generated based on the function y = 4sin(2x +
ε)cos(2z) where ε is a noise function.
Maya, TF3DM, environment map, billboards
• The toy monster was modeled in Maya from geometric primitives
• The bridged and helicopter were downloaded from TF3DM
• The UVs and textures for the bridge were fixed in Maya
• The lights are billboards, the sky is an environment map, the water was a plane with a normal map
Fractal Geometry: Raytracing Quaternion Julia Sets
•Calculate the ray intersection point (in quaternion space) by iterating over zn+1 = zn2 + c.
•zn represents the origin of the ray and zn+1 represents the ray intersection point.
•c is a quaterion that defines the shape of the Julia Set.
•Caustic effects were accomplished with bidirectional path tracing.
• The D&D die was from TurboSquid.
Blender, Microsoft Word and Paint
• Models are created, modified, and subdivided in Blender (wolf is downloaded online)
• Careful scaling and rotation of objects to make the scene realistic and seamless
• Textures are done using Blender, Word, and Paint
TurboSquid, Blender, Normal mapping, Multiple lights
• Canoe model is downloaded from TurboSquid, and candles and lily pads are created in Blender
• Normal mapping is applied on the water surface and image textures are used for scene objects
• 11 light sources are used to light up the scene, with alpha blending for transparency effect
Procedurally generated terrain, Noise, Haze, Moving camera
• Procedurally generated terrain using the diamond-squares algorithm
• Parts of the terrain were then sequentially smoothed into rolling hills using a derivation of a box blurring technique
• Terrains are painted using height and noise from multiple sine functions
• Haze effect is implemented in fragment shader and moving camera is used to make scene more realistic

You might also like