GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu...

89
GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer Vision, Graphics & Image Processing, 2008 http://www.cse.iitb.ac.in/~{rhushabh, prekshu, sharat}

Transcript of GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu...

Page 1: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

GPU-based Hierarchical Computations for View Independent VisibilityRhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer Vision,

Graphics & Image Processing, 2008http://www.cse.iitb.ac.in/~{rhushabh, prekshu, sharat}

Page 2: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Problem Statement

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Parallel Fast computation of view-independent visibility in a complex scene represented as a point model, using a GPU

Page 3: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Problem Statement

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Parallel Fast computation of view-independent visibility in a complex scene represented as a point model, using a GPU

Page 4: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Parallel Fast computation of view-independent visibility in a complex scene represented as a point model, using a GPU

Problem Statement

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Page 5: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Problem Statement

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Parallel, fast computation of view-independent visibility in a complex scene represented as a point model, using a GPU

Page 6: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Problem Statement

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Parallel, fast computation of view-independent visibility in a complex scene represented as a point model, using a GPU

Page 7: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Problem Statement

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Parallel, fast computation of view-independent visibility in a complex scene represented as a point model, using a GPU

Page 8: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Problem Statement

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Parallel, fast computation of view-independent visibility in a complex scene represented as a point model, using a GPU

Page 9: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Problem Statement

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Parallel, fast computation of view-independent visibility in a complex scene represented as a point model, using a GPU

Page 10: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Problem Statement

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Parallel, fast computation of view-independent visibility in a complex scene represented as a point model, using a GPU

Page 11: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Problem Statement

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Parallel, fast computation of view-independent visibility in a complex scene represented as a point model, using a GPU

Page 12: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Result Video

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

VIDEO !

Page 13: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Challenges

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

O(N3) Time ComplexityN2 point-pairsN occluders considered for every pair

No surface Information

Polygonal Model Point Model

A A BB

[GKSD 07], Visibility Map for Global Illumination in Point Clouds, GRAPHITE 2007

Page 14: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Building the Octree Hierarchy

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Page 15: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Building the Octree Hierarchy

Page 16: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Building the Octree Hierarchy

Page 17: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Building the Octree Hierarchy

Page 18: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Building the Octree Hierarchy

Page 19: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Visibility between Point Clusters

Page 20: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Visibility between Point Clusters

Page 21: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Visibility between Point Clusters

Page 22: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Discussion: Visibility between Point Clusters O(M2 log M) Time Complexity (for Octree with M leaves)

M2 log M << N3

M << N

… but still not fast enough !

Page 23: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Discussion: Visibility between Point Clusters O(M2 log M) Time Complexity (for Octree with M leaves)

M2 log M << N3

M << N

… but still not fast enough !

Page 24: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Contributions O(M2 log M) Time Complexity (for Octree with M leaves)

M2 log M << N3

M << N

… but still not fast enough !

Parallel, Fast computation of view-independent visibility in a complex scene represented as a point model, using a GPU

Problem Statement & Contributions:

Achieved upto 19x speed-up

Page 25: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

O(M2 log M) Time Complexity (for Octree with M leaves)

M2 log M << N3

M << N

… but still not fast enough !

Achieved upto 19x speed-up

Visibility Problem is highly parallel

Problem Statement & Contributions:

Contributions

Parallel, Fast computation of view-independent visibility in a complex scene represented as a point model, using a GPU

Page 26: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

O(M2 log M) Time Complexity (for Octree with M leaves)

M2 log M << N3

M << N

… but still not fast enough !

Achieved upto 19x speed-up

No compromise on quality Visibility problem is highly parallel

Problem Statement & Contributions:

Contributions

Parallel, Fast computation of view-independent visibility in a complex scene represented as a point model, using a GPU

Page 27: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

O(M2 log M) Time Complexity (for Octree with M leaves)

M2 log M << N3

M << N

… but still not fast enough !

Achieved upto 19x speed-up Visibility problem is highly parallel

No Dynamic Memory Allocation and Recursion No compromise on quality

Problem Statement & Contributions:

Contributions

Parallel, Fast computation of view-independent visibility in a complex scene represented as a point model, using a GPU

Page 28: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

O(M2 log M) Time Complexity (for Octree with M leaves)

M2 log M << N3

M << N

… but still not fast enough !

Achieved upto 19x speed-up Visibility problem is highly parallel No compromise on quality No Dynamic Memory Allocation and Recursion

Problem Statement & Contributions:

Contributions

Parallel, Fast computation of view-independent visibility in a complex scene represented as a point model, using a GPU

Page 29: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Application to Global Illumination

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Parallel, Fast computation of view-independent visibility in a complex scene represented as a point model, using a GPU

Page 30: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Application to Global Illumination

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Point modeled Cornell Room and the Stanford Bunny

Parallel, Fast computation of view-independent visibility in a complex scene represented as a point model, using a GPU

Page 31: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Application to Global Illumination

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Can be extended to the Digital Heritage Projecthttp://research.microsoft.com

Page 32: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Plan

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Hierarchical Visibility Map (V-map) Construction on CPU

Parallel V-map Construction on GPU

Strategy 1 – Multiple threads per node Strategy 2 – One thread per node Strategy 3 – Multiple threads per node-pair

Results

Conclusion

Page 33: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Plan

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Hierarchical Visibility Map (V-map) Construction on CPU

Parallel V-map Construction on GPU

Strategy 1 – Multiple threads per node Strategy 2 – One thread per node Strategy 3 – Multiple threads per node-pair

Results

Conclusion

Page 34: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

What is a V-map ?

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

V-map for a tree is a collection of visibility links for every node in the tree

Page 35: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

What is a V-map ?

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

V-map for a tree is a collection of visibility links for every node in the tree

The visibility link for any node N is a set L of nodes

N

Node N List L

Page 36: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

What is a V-map ?

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

V-map for a tree is a collection of visibility links for every node in the tree

The visibility link for any node N is a set L of nodes

Every point in any node L is guaranteed to be visible from every point in N V1

N

Node N V1Visibility Link

List L

Page 37: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

What is a V-map ?

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

V-map for a tree is a collection of visibility links for every node in the tree

The visibility link for any node N is a set L of nodes

Every point in any node L is guaranteed to be visible from every point in N

V2

V1

N

Node N V1 V2Visibility Link

List L

Page 38: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

What is a V-map ?

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

V-map for a tree is a collection of visibility links for every node in the tree

The visibility link for any node N is a set L of nodes

Every point in any node L is guaranteed to be visible from every point in N

V2

V1

N

Node N V1 V2Visibility Link

V3

V3

Page 39: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

What is a V-map ?

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Level 0

(Root)

Page 40: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

What is a V-map ?

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

With respect to at any level,

-- Completely Visible

-- Completely Invisible

-- Partially Visible

Level 0

Level 1

(Root)

Page 41: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

What is a V-map ?

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

With respect to at any level,

-- Completely Visible

-- Completely Invisible

-- Partially Visible

Level 0

Level 1

Level 2

(Root)

Page 42: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

What is a V-map ?

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

With respect to at any level,

-- Completely Visible

-- Completely Invisible

-- Partially Visible

Level 0

Level 1

Level 2

Level 3

(Root)

(Leaf)

Page 43: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

CPU based V-map Construction

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Compute Visibility

A B

Root

Level L-2

Level L-1

Level L

Level L-3

Level 0

a1 b1

Page 44: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

CPU based V-map Construction

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Level L-2

Level L-1

Level L

Level L-3

Level 0

Look up Look up

Root

A B

a1 b1

All leaf-pairs are visible

Page 45: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

CPU based V-map Construction

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Level L-2

Level L-1

Level L

Level L-3

Level 0Complete Visibility Root

A B

a1 b1

Look up Look up

Page 46: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

CPU based V-map Construction

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Level L-2

Level L-1

Level L

Level L-3

Level 0Complete Visibility

New VisibilityLink

Root

A B

a1 b1

Look up Look up

Page 47: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

CPU based V-map Construction

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Level L-2

Level L-1

Level L

Level L-3

Level 0Root

A B

a1 b1

Only some leaf-pairs are visible

Look up Look up

Page 48: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

CPU based V-map Construction

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Level L-2

Level L-1

Level L

Level L-3

Level 0Partial Visibility Root

New VisibilityLink

A B

a1 b1

Look up Look up

Page 49: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

CPU based V-map Construction

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Level L-2

Level L-1

Level L

Level L-3

Level 0Partial Visibility Root

New VisibilityLink

A B

a1 b1

Look up Look up

Page 50: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

CPU based V-map Construction

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Compute Visibility

Root

Level L-2

Level L-1

Level L

Level L-3

Level 0

A B

a2 b1

Page 51: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

CPU based V-map Construction

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Root

Level L-2

Level L-1

Level L

Level L-3

Level 0

A B

a2 b1

Uses Dynamic Memory Allocation

Compute Visibility

Page 52: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

CPU based V-map Construction

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Root

Level L-2

Level L-1

Level L

Level L-3

Level 0

A B

a2 b1

Uses Recursion on the tree

Compute Visibility

Page 53: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Plan

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Hierarchical Visibility Map (V-map) Construction on CPU

Parallel V-map Construction on GPU

Strategy 1 – Multiple threads per node Strategy 2 – One thread per node Strategy 3 – Multiple threads per node-pair

Results

Conclusion

Page 54: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Plan

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Hierarchical Visibility Map (V-map) Construction on CPU

Parallel V-map Construction on GPU

Strategy 1 – Multiple threads per node Strategy 2 – One thread per node Strategy 3 – Multiple threads per node-pair

Results

Conclusion

Page 55: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Strategy 1: Multiple Threads per Node

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

A

N

I0 I1 I2 I3

T0T1

T3T2

Interaction List

Page 56: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Computation by a Single Thread

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Compute Visibility

A I0

Root

Level L-2

Level L-1

Level L

Level L-3

Level 0

a1 b1

Page 57: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Strategy 1: Multiple Threads per Node

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

A

N

I0 I1 I2 I3

T0T1

T3T2

Interaction List

Degree of parallelism limited by the size of the node’s interaction list Serious Limitation: No support for Recursion and Dynamic memory allocation

Discussion:

Page 58: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Plan

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Hierarchical Visibility Map (V-map) Construction on CPU

Parallel V-map Construction on GPU

Strategy 1 – Multiple threads per node Strategy 2 – One thread per node Strategy 3 – Multiple threads per node-pair

Results

Conclusion

Page 59: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Strategy 2: One Thread per Node

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Degree of parallelism limited by number of nodes per level

Serious Limitation: No support Recursion and Dynamic memory allocation

Discussion:

A I0 I1 I2 I3

N I0 I1

Thread T0

Thread T1

LevelL

LevelL

Interaction List

Performance increases as we go down the octree

Page 60: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Plan

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Hierarchical Visibility Map (V-map) Construction on CPU

Parallel V-map Construction on GPU

Strategy 1 – Multiple threads per node Strategy 2 – One thread per node Strategy 3 – Multiple threads per node-pair

Results

Conclusion

Page 61: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Strategy 3: Multiple Threads per Node-Pair

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Level L-2

Level L-1

Level L

Level L-3

Level 0

Compute Visibility between leaves in parallel

A B

Root

Page 62: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Strategy 3: Multiple Threads per Node-Pair

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Level L-2

Level L-1

Level L

Level L-3

Level 0

Store the results in a boolean array

A B

Root

Page 63: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Strategy 3: Multiple Threads per Node-Pair

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Level L-2

Level L-1

Level L

Level L-3

Level 0

Look – up from the boolean array

A B

a1 b1

Look up Look up

Root

Page 64: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Strategy 3: Multiple Threads per Node-Pair

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Level L-2

Level L-1

Level L

Level L-3

Level 0Root

A B

a1 b1

All leaf-pairs are visible

Look up Look up

Page 65: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Strategy 3: Multiple Threads per Node-Pair

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Level L-2

Level L-1

Level L

Level L-3

Level 0Complete Visibility Root

A B

a1 b1

Look up Look up

Page 66: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Strategy 3: Multiple Threads per Node-Pair

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Level L-2

Level L-1

Level L

Level L-3

Level 0Complete Visibility

New VisibilityLink

Root

A B

a1 b1

Look up Look up

Page 67: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Strategy 3: Multiple Threads per Node-Pair

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Level L-2

Level L-1

Level L

Level L-3

Level 0Root

A B

a1 b1

Look up Look up

Page 68: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Strategy 3: Multiple Threads per Node-Pair

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Level L-2

Level L-1

Level L

Level L-3

Level 0Partial Visibility Root

New VisibilityLink

A B

a1 b1

Look up Look up

Page 69: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Strategy 3: Multiple Threads per Node-Pair

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Level L-2

Level L-1

Level L

Level L-3

Level 0Partial Visibility Root

New VisibilityLink

A B

a1 b1

Look up Look up

Page 70: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Strategy 3: Multiple Threads per Node-Pair

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Root

Level L-2

Level L-1

Level L

Level L-3

Level 0

A B

a2 b1

Look up Look up

Page 71: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

CPU v/s GPU

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Compute Visibility in parallel

Compute Visibility

A B

Root

CPU Algorithm GPU Algorithm

A B

Root

Page 72: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

CPU v/s GPU

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Compute Visibility

A B

Root

CPU Algorithm GPU Algorithm

Look – up from the boolean array

A B

Root

Page 73: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Strategy 3: Multiple Threads per Node-Pair

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Degree of parallelism is high as hundreds/thousands of threads run concurrently most of the time Recursion and Dynamic memory allocation happens on the CPU

Performance is best at octree levels near to root

Achieves upto 19x speed-up

Discussion:

No change in Quality

Page 74: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Plan

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Hierarchical Visibility Map (V-map) Construction on CPU

Parallel V-map Construction on GPU

Strategy 1 – Multiple threads per node Strategy 2 – One thread per node Strategy 3 – Multiple threads per node-pair

Results

Conclusion

Page 75: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Results: Visibility Validation

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Page 76: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Results: Visibility Validation

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Page 77: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Results: Timings

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Bunny in the Cornell Room (1,35,000 points)

Max Speedup : 19X

Page 78: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Results: Timings

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Buddha in the Cornell Room (2,30,000 points)

Max Speedup : 14X

Page 79: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Results: Timings

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Ganesha & Satyawati in the Cornell Room (3,50,000 points)

Max Speedup : 17X

Page 80: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Results: Application to Global Illumination

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Page 81: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Results: Application to Global Illumination

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Page 82: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Results: Quality Comparison

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

CPU GPU

Accuracy upto 5 decimal points

Page 83: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Results: Quality Comparison

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

CPU GPU

Accuracy upto 5 decimal points

Page 84: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Discussion: Implementation Details

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Optimal Thread and Block Size Each block (16 x 16) contained 256 threads Every thread-block Grid contained no less than 64 blocks

Optimal Octree Heights Every thread works on a leaf-pair; Multiple threads are independent No Shared Memory Synchronization required With 16 Multi-processors, 64 thread-blocks and 256 threads per block,

we need 16384 leaf-pairs

Asynchronous Computations

Loop Unrolling

Page 85: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Plan

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Hierarchical Visibility Map (V-map) Construction on CPU

Parallel V-map Construction on GPU

Strategy 1 – Multiple threads per node Strategy 2 – One thread per node Strategy 3 – Multiple threads per node-pair

Results

Conclusion

Page 86: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Final Note

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Parallel implementation of the view-independent mutual point-pair visibility problem on the modern day GPU (G80/G92 architecture) was presented

Several strategies to achieve the desired parallelism were introduced and the most suitable one chosen

Speed-ups upto 19X were reported while maintaining the quality of results

Blocks of 256 threads achieved optimal GPU performance

Good octree heights essential for high speed-ups and accurate visibility results

By viewing this V-map construction as a “pre-processing” step, photo-realistic global illumination rendering of complex point models have been shown

Parallel V-map construction solution can be thought as an intuition to solve other problems involving computing relationships amongst data at various levels in a hierarchy

Page 87: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Thank You

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Fractal: Mandel Zoom - Satellite Antenna, Mandelbrot set

Page 88: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Problem Statement

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Fast computation of view-independent visibility in a complex scene represented as a point model, using a GPU

Page 89: GPU-based Hierarchical Computations for View Independent Visibility Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran Sixth Indian Conference on Computer.

Problem Statement

ICVGIP, 2008 Rhushabh Goradia, Prekshu Ajmera, Sharat Chandran

Fast computation of view-independent visibility in a complex scene represented as a point model, using a GPU