Modeling (01) RNDr. Martin Madaras, PhD. madaras@skeletex.xyz - - PowerPoint PPT Presentation

modeling 01
SMART_READER_LITE
LIVE PREVIEW

Modeling (01) RNDr. Martin Madaras, PhD. madaras@skeletex.xyz - - PowerPoint PPT Presentation

Fundamentals of Computer Graphics and Image Processing Modeling (01) RNDr. Martin Madaras, PhD. madaras@skeletex.xyz Computer Graphics Image processing Representing and manipulation of 2D images Modeling Representing and


slide-1
SLIDE 1

Fundamentals of Computer Graphics and Image Processing

Modeling (01)

  • RNDr. Martin Madaras, PhD.

madaras@skeletex.xyz

slide-2
SLIDE 2

Computer Graphics

2

 Image processing

 Representing and manipulation of 2D images

 Modeling

 Representing and manipulation of 2D and 3D objects

 Rendering

 Constructing images from virtual models

 Animation

 Simulating changes over time

slide-3
SLIDE 3

3

  • Ask questions, please!!!
  • Be communicative
  • www.slido.com #ZPGSO01
  • More active you are, the better for you!
  • We will go into depth as far, as there are no questions

How the lectures should look like #1

slide-4
SLIDE 4

What is Modeling?

4

 Representation and manipulation of objects

 Acquire  Edit  Transform  Smooth  Render  Deform  Morph  Compress  Transmit  Analyze

slide-5
SLIDE 5

What is Modeling?

5

 Representation and manipulation of objects

 Acquire  Edit  Transform  Smooth  Render  Deform  Morph  Compress  Transmit  Analyze

slide-6
SLIDE 6

Modeling

6

 How to represent ..

 2D and 3D objects in a computer?  Acquire computer representations of objects?  Manipulate representations of objects?

slide-7
SLIDE 7

Quick test #1

7

 Describe the picture

slide-8
SLIDE 8

Quick test #2

8

 Describe the picture

slide-9
SLIDE 9

Quick test #3

9

 Volunteers:

Describe the image to others

 Others:

Reproduce the image

slide-10
SLIDE 10

Semantic vs. numeric

10

 Humans – semantic representation

 concepts, notions, meanings, emotions...  imprecise, ambiguous

 Computers – numeric representation

 exact, mathematical, straightforward

slide-11
SLIDE 11

Detailed representation

11

slide-12
SLIDE 12

2D Object Representations

12

 How to define 2D shapes?

slide-13
SLIDE 13

2D Object Representations

13

 Let’s define these objects

slide-14
SLIDE 14

2D Object Representations

14

 How to make 2D representation smooth at any scale?

Bitmaps, raster, pixels, explicit Shapes, vectors, curves, parametric, implicit

slide-15
SLIDE 15

2D Object Representations

15

 Lines  Polygon (set of lines)  Curves  Vector image (set of curves)

slide-16
SLIDE 16

2D Object Representations

16

 Vector Images

slide-17
SLIDE 17

3D Object Representations

17

 How to represent a 3D object?

slide-18
SLIDE 18

3D Object Representations

18

 Polygons…

slide-19
SLIDE 19

3D Object Representations

19

 Voxels…

slide-20
SLIDE 20

3D Object Representations

20

 Recreating artwork

slide-21
SLIDE 21

3D Object Representations

21

 Mechanical objects

slide-22
SLIDE 22

3D Object Representations

22

 Maps, Cities, Landscape

slide-23
SLIDE 23

3D Object Representations

23

 Clouds, Smoke, Fog, Water

slide-24
SLIDE 24

2D Object Representations

24

 Pixels

 Images

 Lines

 Curves

 Polygons

 Discrete,

Vector graphics

slide-25
SLIDE 25

3D Object Representations

25

 Points

 Range Image, Point Cloud

 Surfaces

 Polygonal, Subdivision, Parametric, Implicit

 Solids

 Voxels, BSP Tree, CSG, Sweep, etc.

 Hierarchical Structures

 Scene graph, Application specific…

slide-26
SLIDE 26

Why so many representation?

26

 Efficiency for different tasks

 Rendering  Acquisition  Manipulation  Animation  Analysis

 Data structures determine algorithms

slide-27
SLIDE 27

Outline

27

 Points

 Range Image, Point Cloud

 Surfaces

 Polygonal, Subdivision, Parametric, Implicit

 Solids

 Voxels, BSP Tree, CSG, Sweep

 Hierarchical Structures

 Scene graph, Application specific

slide-28
SLIDE 28

Range Image

28

 Set of 3D points mapping to pixels of depth image  Structured Point Cloud

 Acquired using a range scanner (eg. Kinect)

slide-29
SLIDE 29

Point Cloud

29

 Unstructured set of 3D point samples

 Acquired from multiple range scans, vision, etc.

slide-30
SLIDE 30

Point Cloud Animation: Road Survey

30

https://www.youtube.com/watch?v=f_ng212b-UM

slide-31
SLIDE 31

Outline

31

 Points

 Range Image, Point Cloud

 Surfaces

 Polygonal, Subdivision, Parametric, Implicit

 Solids

 Voxels, BSP Tree, CSG, Sweep

 Hierarchical Structures

 Scene graph, Application specific

slide-32
SLIDE 32

Polygonal Mesh

32

 Connected mesh of polygons (usually triangles)

 Most common representation, supported in OpenGL

slide-33
SLIDE 33

Subdivision Surface

33

 Coarse mesh with subdivision rule  Smooth surfaces are defined as sequences of refinement

slide-34
SLIDE 34

Subdivision Surface

34

 Properties

 Accurate  Concise  Intuitive specification  Local support  Affine invariant  Arbitrary topology  Guaranteed continuity  Natural parametrization  Efficient display  Efficient intersections Geri’s game, Pixar, 1997: https://www.youtube.com/watch?v=kweN7VLx-JE

slide-35
SLIDE 35

Subdivision Surfaces: Overview

35

https://www.youtube.com/watch?v=ckOTl2GcS-E&t=26s

slide-36
SLIDE 36

Subdivision Surfaces: Overview

36

 Subdivision surfaces

 Loop subdivision  Catmull-Clark  Butterfly, Doo-Sabin, etc.

slide-37
SLIDE 37

Example: Loop subdivision

37

 How to refine mesh ?

 Refine each triangle into 4 triangles by splitting each edge and

connecting the vertices

slide-38
SLIDE 38

Example: Loop subdivision

38

 How position new vertices?

 Choose location of the vertices as weighted average of original

vertices in local neighborhood

 Rules for extraordinary vertices and boundaries:

slide-39
SLIDE 39

Key Questions

39

 How to refine mesh ?

 Aim for properties like smoothness

 How to store mesh ?

 Aim for efficiency of implementing subdivision rules

slide-40
SLIDE 40

Polygonal meshes

40

 V, E, F  P, S

slide-41
SLIDE 41

Polygonal Meshes

41

 Mesh Representations

 Independent faces  Vertex and face tables  Adjacency lists  Winged-Edge

slide-42
SLIDE 42

Independent Faces

42

 Each face lists vertex coordinates

 Redundant vertices  No topology information

slide-43
SLIDE 43

Vertex and Face Tables

43

 Each face lists vertex references

 Shared vertices  Still no topology information

slide-44
SLIDE 44

Adjacency Lists

44

 Store all vertex, edge and face adjacency

 Efficient topology traversal  Extra storage

slide-45
SLIDE 45

Partial Adjacency Lists

45

 Can we can store only some adjacency information and

derive others?

slide-46
SLIDE 46

Winged Edge

46

 Adjacency encoded in edges

 All adjacencies in O(1) time  Little extra storage  Arbitrary polygons

slide-47
SLIDE 47

Winged Edge Example

47

slide-48
SLIDE 48

Parametric Surface

48

 Defined using control points  Surfaces are defined using parametric functions  m × n control points  parameters u,v http://cadauno.sourceforge.net/

slide-49
SLIDE 49

Parametric Surface

49

 Cubic Bezier surface, NURBS

slide-50
SLIDE 50

Implicit Surface

50

 Surface satisfying function F(x,y,z) = 0

Polygonal model Implicit model

slide-51
SLIDE 51

Question

51

What happens if we turn F(x,y,z) = 0 into F(x,y,z) ≤ 0 ?

surface → volume

slide-52
SLIDE 52

Outline

52

 Points

 Range Image, Point Cloud

 Surfaces

 Polygonal, Subdivision, Parametric, Implicit

 Solids

 Voxels, BSP Tree, CSG, Sweep

 Hierarchical Structures

 Scene graph, Application specific

slide-53
SLIDE 53

Volumetric representation

53

 not only boundary

but also the insides

  • f the object

 Medicine  Physics  Simulations  Animation

slide-54
SLIDE 54

Voxels

54

 Uniform grid of volumetric samples  Acquired using CAT, MRI scans etc.  Volume elements, “3D pixels”  Discrete

slide-55
SLIDE 55

Volume Rendering Demo

55

https://www.youtube.com/watch?v=uSyUCLLNtMo

slide-56
SLIDE 56

BSP Trees

56

 Binary space partition

 Constructed from polygonal representations

slide-57
SLIDE 57

Constructive Solid Geometry

57

 Hierarchy of boolean operations

 Union, Difference, Intersect applied to simple shapes

slide-58
SLIDE 58

Functional Representation

58

 F-rep ~ generalization of CSG  More node functions – operators

 e.g. object blending

slide-59
SLIDE 59

59

Mesh reconstruction

 Conversion into an implicit function

 Poisson reconstruction

slide-60
SLIDE 60

60

Mesh reconstruction

 Isosurface extraction

 Marching cubes

slide-61
SLIDE 61

61

Marching cubes

 Create cubes  Classify vertices  Build indices  Lookup edge list

slide-62
SLIDE 62

62

Marching cubes

 Create cubes  Classify vertices  Build indices  Interpolate Triangle

Vertices

slide-63
SLIDE 63

63

Marching cubes

 Create cubes  Classify vertices  Build indices  Interpolate Triangle

Vertices

 Calculate normals

slide-64
SLIDE 64

64

Marching cubes

slide-65
SLIDE 65

65

Marching cubes

slide-66
SLIDE 66

66

Marching cubes

slide-67
SLIDE 67

67

Marching cubes

slide-68
SLIDE 68

68

Marching cubes

slide-69
SLIDE 69

Outline

69

 Points

 Range Image, Point Cloud

 Surfaces

 Polygonal, Subdivision, Parametric, Implicit

 Solids

 Voxels, BSP Tree, CSG, Sweep

 Hierarchical Structures

 Scene graph, Application specific

slide-70
SLIDE 70

Scene Graph

70

 Objects organized in a hierarchical structure

slide-71
SLIDE 71

Application Specific

71

 Specific for given application domain

slide-72
SLIDE 72

Taxonomy of 3D representations

72

slide-73
SLIDE 73

Computational Differences

73

 Efficiency

 Computational complexity ( O(n log n) )  Space/Time trade-off  Numerical stability/accuracy

 Simplicity

 Hardware acceleration  Ease of acquisition  Software creation and maintenance

 Usability

 Designer vs. computational engine

slide-74
SLIDE 74

Parametric vs. polygonal

74

 Parametric

 smooth, reparametrizable  harder rendering  precise rendering

 Polygonal

 discrete, hard to reparametrize  faster rendering or rasterization  approximative rendering

slide-75
SLIDE 75

75

  • Ask questions, please!!!
  • Be communicative
  • www.slido.com #ZPGSO01
  • More active you are, the better for you!

How the lectures should look like #2

slide-76
SLIDE 76

76

www.skeletex.xyz madaras@skeletex.xyz

Questions ?!