Week 10 - Spatial Enumeration Flashcards

1
Q

What do Spatial Enumeration / Spatial partitioning techniques intend to do?

A

Organise space so that the kinds of calculations used mostly commonly in graphics can be done more quickly

(not low level vector / matrix calculations, those are done fast in hardware by the GPU nowadays, talking more about high level datastructures)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the costs and gains of indexing a table?

A

Using more memory, lookup / sorted ordering is faster

Have to update the pointers when the table is updated

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What common queries might we ask a graphical scene?

A

Does a given point in space, intersect with any of the objects in the scene.

Raycasting, trace part of a path, raytree, marching through a volume. Find the closest object we clicked on / shot with an object.

Finding which objects are to one side or the other of a plane (essentially an extension to the other ones)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Given a linked list structure pointing to all the objects in the scene, how much time will it take to find the objects a point is in given n objects in the scene?

A

O(n)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

List the methods of spatial enumeration

A

Gridcell

Octree / Adapted Gridcell (focusing on populated cells with an Octree)

Hierarchical bounding volume

Binary space partitioning

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Explain the gridcell method

A

Store the scene in voxels, index into the array to find what objects are at a given position - this is O(1) - memory usage is worse at O(n^3) for each cell in the scene.

Can reduce the memory usage / space complexity by using fewer bigger cells (voxels) to fill the space, but that has implications.

Need to update pointers as the objects in the scene are updated, moving, being created or deleted

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How can we adapt the gridcell method to use less memory?

A

Start with one big cube, recursively split that into smaller cubes, but only where we need to.

Decide a threshold for the maximum number of objects in a square (e.g. 2 objects)

We start with one big cube, and (if there are more objects than the threshold) split it into 8 smaller cubes of equal size, we keep doing this for all of the cubes that contain more objects than the threshold amount, until that is not longer true for any of them.

Every leaf node in the octree points to the objects that are contained within it, every other node points to it’s 8 children.

This does increase the time complexity though, to find an object at a point in space I need to find out which of the nodes in the tree structure represents the point in the tree I am interested in, I won’t know how far down the tree to go until I get there.

Saving significant amount of memory with this, assuming the space isn’t crammed with objects / we have a lot of empty space

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What makes a spatial enumeration method “regular”?

A

They split space into regular, equal sized, chunks.
(With Octree, all the cells at any given level are the same size, so it is also regular)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is spatial cohesion?

A

The idea that often things clump together in space in the real world. This is the thing that makes the OcTree more spatially efficient than the gricell. Most scenes consist of clumps of things separated by empty space.

But, it’s not evenly spread over evenly sized cubes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Hierarchical Bounding Volumes

A

HBVs start with objects and wrap those in increasingly bigger spaces (bounding boxes) until you’ve covered the whole scene. (bounding boxes containing bounding boxes, using a hierarchical tree that improves memory space due to spatial cohesion)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is a bounding volume?

A

A simple shape that encapsulates a a more complicated one. The point being that if you do an intersection test with a more simple shape and get a negative result, then you can be certain it’s not worth doing the intersection test with any of the more complicated expensive things inside that bounding shape.

If we get a positive hit on the bound, we then need to do a more complicated test on the inner structure

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the simplest bounding shape to represent with an equation?

A

A sphere

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is binary space paritioning?

A

It partitions space into two sections, recursively (in 3D uses a plane instead of a line)

Keep dividing (alternating vertically, the horizontally for axis-aligned binary space partitioning) until there is no more than a predetermined number of objects (threshold) in each space.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly