Modeling - cs.jhu.edu

67
Modeling Michael Kazhdan (601.457/657) HB 10.18 – 10.19 FvDFH 20.2 – 20.4 Modeling Seashells, Fowler et al. 1992

Transcript of Modeling - cs.jhu.edu

Slide 1Modeling
• How do we construct 3D models quickly and/or automatically with a computer?
H&B Figure 10.83bFowlerH&B Figure 10.79
Model Construction • Interactive modeling tools
CAD programs
• Passive scanners Stereo, motion, etc.
• Procedural generation Sweeps, fractals, grammars
Interactive Modeling Tools • User constructs objects with drawing program
Menu commands, direct manipulation, etc. CSG, parametric surfaces, quadrics, etc.
Cosmoworlds, SGI
CAD programs
• Passive scanners Stereo, motion, etc.
• Procedural generation Sweeps, fractals, grammars
Active Scanners • Acquire geometry of objects with active sensors
Touch probes Light scanners LiDAR scanners CAT/MRI scanners
Active Scanners • Acquire geometry of objects with active sensors
Touch probes Light scanners LiDAR scanners CAT/MRI scanners
D ep
th C
ol or
Touch probes Light scanners LiDAR scanners CAT/MRI scanners
Active Scanners Triangulation (in 2D):
To figure out the position of a point we need: 1. The position of the camera 2. The position of the light source
Project the light through a slit onto the surface… Find where the lit points project
onto the camera… Cast rays from the lit pixels, through
the camera…
Active Scanners Triangulation (in 2D):
To figure out the position of a point we need: 1. The position of the camera 2. The position of the light source
Project the light through a slit onto the surface… Find where the lit points project
onto the camera… Cast rays from the lit pixels, through
the camera… The lit point is also constrained to lie on the plane from the light source.
For the lit point to project onto the appropriate pixel, it has to lie somewhere on the ray.
The position of the lit point has to be at the intersection
of the ray and the plane.
Laser Range Scanning
Stanford Graphics Laboratory
Active Scanners • Acquire geometry of objects with active sensors
Touch probes Light scanners LiDAR scanners CAT/MRI scanners
Time of flight:
Shoots a laser at the scene and measures the amount of time it takes it to come back
Image courtesy of Wikipedia
Touch probes Light scanners LiDAR scanners CAT/MRI scanners
Model Construction • Interactive modeling tools
CAD programs
• Passive scanners Stereo, motion, etc.
• Procedural generation Sweeps, fractals, grammars
Passive Scanners • Infer 3D geometry from (passive) images
Stereo Motion etc.
Stereo Motion etc.
This is similar to the approach for scanners, but instead of triangulating using a light and a
camera, we triangulate using two cameras.
The challenge is to determine pixel pair correspondences across the two images.
Passive Scanners • Infer 3D geometry from (passive) images
Stereo Motion etc.
Stereo Motion etc.
Image courtesy of http://www.maths.lth.se/matematiklth/personal/calle/
In this case we need to solve simultaneously for the surface points and the camera position.
Model Construction • Interactive modeling tools
CAD programs
• Passive scanners Stereo, motion, etc.
• Procedural generation Sweeps, fractals, grammars
Procedural Modeling • Goal:
• Advantages: Automatic generation Concise representation Parameterized classes of models
Procedural Modeling • Sweeps
• Fractals
• Grammars
Sweeps Given a 3D sweep curve (Θ) and a 2D generating curve (Ψ), define the sweep surface (Θ,Ψ) as the sweep of along :
In this example, the sweep curve is used to translate the generating curve:
Θ,Ψ = Θ + (Ψ)
×
Example: Seashells • Create 3D polygonal surface models of seashells
Fowler et al. Figure 7
“Modeling Seashells,” Deborah Fowler, Hans Meinhardt, and Przemyslaw Prusinkiewicz, Computer Graphics (SIGGRAPH 92), Chicago, Illinois, July, 1992, p 379-387.
Example: Seashells • Sweep generating curve around helico-spiral axis
Generating Curve
Generating Curve
As the generating curve is swept, it is: • Translated • Scaled • Rotated
Example: Seashells • Sweep generating curve around helico-spiral axis
Helico-Spiral definition: Θ = cosΘ ⋅ Θ , Θ , sinΘ ⋅ Θ
Angle: Θ Radius: Θ = Θ Height: Θ = Θ
If (Ψ) is the generating curve, we can try to represent the surface as:
,Ψ = Θ + Ψ , Ψ , 0 ⋅ Θ
Fowler et al. Figure 1
Example: Seashells • Sweep generating curve around helico-spiral axis
Helico-Spiral definition: Θ = cosΘ ⋅ Θ , Θ , sinΘ ⋅ Θ
Angle: Θ Radius: Θ = Θ Height: Θ = Θ
If (Ψ) is the generating curve, we can try to represent the surface as:
,Ψ = Θ + Ψ , Ψ , 0 ⋅ Θ
This doesn’t rotate the generating curve around
the axis of the helix! Fowler et al. Figure 1
Example: Seashells • Sweep generating curve around helico-spiral axis
Fowler et al. Figure 1
Helico-Spiral definition: Θ = cosΘ ⋅ Θ , Θ , sinΘ ⋅ Θ
Angle: Θ Radius: Θ = Θ Height: Θ = Θ
Instead, we compute a local frame Θ , Θ , Θ at each point on the
sweep curve and describe the surface w.r.t. this frame: Θ,Ψ = Θ + Θ ⋅ Ψ + Θ ⋅ Ψ ⋅ (Θ)
Example: Seashells • Sweep generating curve around helico-spiral axis
Fowler et al. Figure 1
Helico-Spiral definition: Θ = cosΘ ⋅ Θ , z Θ , sinΘ ⋅ Θ
Angle: Θ Radius: Θ = Θ Height: Θ = Θ
Instead, we compute a local frame Θ , Θ , Θ at each point on the
sweep curve and describe the surface w.r.t. this frame: Θ,Ψ = Θ + Θ ⋅ Ψ + Θ ⋅ Ψ ⋅ (Θ)
Θ and Θ define the plane that is perpendicular to the curve at Θ: • (Θ) is the curve normal • Θ is the curve bi-tangent
(perp. to Θ and the curve tangent)
Example: Seashells • Generate different shells by varying parameters
Fowler et al. Figure 2 Different helico-spirals
Example: Seashells • Generate different shells by varying parameters
Fowler et al. Figure 3 Different generating curves
Example: Seashells
Generate many interesting shells with a simple procedural model!
Procedural Modeling • Sweeps
Fractal Generation
Deterministic Fractal Generation • General procedure:
Initiator: start with a shape Generator: replace subparts with scaled copy of original
H&B Figure 10.68
H&B Figure 10.69
Fractal Generation
Statistical Fractal Generation • General procedure:
Initiator: start with a shape Generator: replace subparts with a self-similar
Statistical Fractal Generation • General procedure:
Initiator: start with a shape Generator: replace subparts with a self-similar
random pattern
H&B Figure 10.83b
Statistical Fractal Generation • Example: terrain
H&B Figure 10.83b As with Perlin noise, the introduction of
randomness, removes the symmetry/tiling.
Statistical Fractal Generation
Procedural Modeling • Sweeps
by applying production rules
Grammars • Generate description of geometric model
by applying production rules
AB
by applying production rules
AB BaB
by applying production rules
AB BaB BaAb
by applying production rules
AB BaB BaAb AbaAb
by applying production rules
AB BaB BaAb AbaAb
Start → Limb Limb → Node Limb | leaf Node → [Limb] | cylinder
= Leaf
= Cylinder
= Limb
L
= Leaf
= Limb
NL
L
NL Start → Limb Limb → Node Limb | leaf Node → [Limb] | cylinder
= Leaf
= Limb
cNL
L
NL
c NLStart → Limb Limb → Node Limb | leaf Node → [Limb] | cylinder
= Leaf
= Limb
c[L]NL
= Leaf
= Limb
c[NL]cNL
= Leaf
= Limb
L
NL
= Leaf
= Limb
L
NL
= Leaf
= Limb
c[cl]c[cNL]c[L]NL
= Cylinder
= Leaf
= Limb
c[cl]c[c[L]NL]c[NL]cl
NL][NL]c l[L]
Start → Limb Limb → Node Limb | leaf Node → [Limb] | cylinder
= Leaf
= Limb
c[cl]c[c[NL]cl]c[cl]cl
[NL] c l] [c l]
Start → Limb Limb → Node Limb | leaf Node → [Limb] | cylinder
= Leaf
= Limb
[c NL] [L] NL
[c l]
= Cylinder
= Leaf
= Limb
[c NL] [L] NL
= Cylinder
= Leaf
= Limb
= Node = [Limb]
As with Wang tiles, the ability to make a choice creates a variety and removes periodicity.
Summary • Interactive modeling tools
• Passive scanners Stereo, motion, etc.
• Procedural generation Sweeps, fractals, grammars
Constructing 3D models