space partitions
Download
Skip this Video
Download Presentation
Space Partitions

Loading in 2 Seconds...

play fullscreen
1 / 16

Space Partitions - PowerPoint PPT Presentation


  • 255 Views
  • Uploaded on

Space Partitions Today’s Short Film Arnold Announcement Proxy Settings for accessing SIGGRAPH papers online. Two paper presentations each on March 18 & 25. 3/18: Portal paper and BSP paper. Read the papers before class. Volunteers wanted for paper presentations on April 8

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Space Partitions' - johana


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
space partitions

Space Partitions

CS6500 Adv. Computer Graphics

© Chun-Fa Chang, Spring 2003

today s short film
Today’s Short Film

Arnold

CS6500 Adv. Computer Graphics

© Chun-Fa Chang, Spring 2003

announcement
Announcement
  • Proxy Settings for accessing SIGGRAPH papers online.
  • Two paper presentations each on March 18 & 25.
    • 3/18: Portal paper and BSP paper.
    • Read the papers before class.
  • Volunteers wanted for paper presentations on April 8

CS6500 Adv. Computer Graphics

© Chun-Fa Chang, Spring 2003

common operations in 3d
Common Operations in 3D
  • Line/object intersection
    • Given a ray or line, which object will it intersect?
  • View frustum culling
  • Collision detection

CS6500 Adv. Computer Graphics

© Chun-Fa Chang, Spring 2003

sorting indexing in 3d
Sorting/Indexing in 3D
  • Sequential search is too slow for large models.
  • How about storing them in a 3D array?
    • Size will be overwhelming
  • Think “hierarchy”

CS6500 Adv. Computer Graphics

© Chun-Fa Chang, Spring 2003

octree
Octree
  • Divide the space in halves in X/Y/Z.
    • Always split in the middle.
    • You may also consider them as splitting in X, then in Y, then in Z.
  • If too many objects are in a partition, divide them again (recursively).

CS6500 Adv. Computer Graphics

© Chun-Fa Chang, Spring 2003

k d tree
K-D Tree
  • More flexible than octree:
    • Not always splitted in the middle.
    • Split in X, then in Y, then in Z, or any order.

CS6500 Adv. Computer Graphics

© Chun-Fa Chang, Spring 2003

kd tree example
Kd-tree Example

4

6

1

10

8

2

3

11

3

13

2

4

5

6

7

12

8

9

10

11

12

13

9

Figure Source: CS638 slides by Stephen Chenney, University of Wisconsin – Madison,

5

1

7

CS6500 Adv. Computer Graphics

© Chun-Fa Chang, Spring 2003

bsp trees
BSP Trees
  • From the paper by Fuchs et al, “On visible surface generation by a priori tree structures” SIGGRAPH 80.
  • Binary Space Partition trees
    • A sequence of cuts that divide a region of space into two
  • Cutting planes can be of any orientation

CS6500 Adv. Computer Graphics

© Chun-Fa Chang, Spring 2003

drawing order from bsp trees
Drawing Order from BSP Trees
  • BSP tress can be used to order polygons from back to front, or visa-versa
    • Descend tree with viewpoint
    • Things on the same side of a splitting plane as the viewpoint are always in front of things on the far side
  • Can draw from back to front
    • Gives the correct order for rendering transparent objects with a z-buffer, and by far the best way to do it
  • Can draw front to back too.

CS6500 Adv. Computer Graphics

© Chun-Fa Chang, Spring 2003

bsp example
BSP Example

1

1

2

2

4

A

3

out

5

7

3

A

out

B

6

8

out

6

5

B

C

C

out

D

out

D

Figure Source: CS638 slides by Stephen Chenney, University of Wisconsin – Madison,

4

8

7

CS6500 Adv. Computer Graphics

© Chun-Fa Chang, Spring 2003

obb tree
OBB Tree
  • OBB stands for Oriented Bounding Box.
  • OBB is a rectangular bounding box at an arbitrary orientation.
  • Asymptotically faster for close proximity situations.

CS6500 Adv. Computer Graphics

© Chun-Fa Chang, Spring 2003

slide13
Off Topics…

CS6500 Adv. Computer Graphics

© Chun-Fa Chang, Spring 2003

mouse interaction in assignment 1
Mouse Interaction in Assignment 1
  • You may write your own like this:

x -= mouse_ref_x;

y -= mouse_ref_y;

xf = (float) x/width;

yf = (float) y/height;

angle = 90* xf;

M = rotation3D(axis_Y, angle);

angle = 90* yf;

M = rotation3D(axis_X, angle) * M;

CS6500 Adv. Computer Graphics

© Chun-Fa Chang, Spring 2003

or you may use glh
Or You May Use GLH
  • So you don’t have to reinvent the wheel.
  • OpenGL Helper Library http://home.earthlink.net/~eberkain/GLH.html
  • Used in some NVIDIA SDK Demos.

CS6500 Adv. Computer Graphics

© Chun-Fa Chang, Spring 2003

example code
Example Code
  • #include
  • glut_simple_mouse_interactor camera, object, *current_interactor;

current_interactor = &camera;

glut_add_interactor(

current_interactor);

CS6500 Adv. Computer Graphics

© Chun-Fa Chang, Spring 2003

ad