Top Banner
Per-Pixel Evaluation of Parametric Surfaces on GPU M Workshop on General Purpose Computing on Graphics Processor Los Angeles, USA, 7-8 August, 2004 Takashi Kanai Keio University SFC Yusuke Yasui ASTOM Inc.
16

Per-Pixel Evaluation of Parametric Surfaces on GPU ACM Workshop on General Purpose Computing on Graphics Processors Los Angeles, USA, 7-8 August, 2004.

Jan 18, 2016

Download

Documents

Abner Horn
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Per-Pixel Evaluation of Parametric Surfaces on GPU ACM Workshop on General Purpose Computing on Graphics Processors Los Angeles, USA, 7-8 August, 2004.

Per-Pixel Evaluation of Parametric Surfaces on GPU

ACM Workshop on General Purpose Computing on Graphics Processors Los Angeles, USA, 7-8 August, 2004

Takashi KanaiKeio University SFC

Yusuke YasuiASTOM Inc.

Page 2: Per-Pixel Evaluation of Parametric Surfaces on GPU ACM Workshop on General Purpose Computing on Graphics Processors Los Angeles, USA, 7-8 August, 2004.

Per-Pixel Evaluation of Parametric Surfaces on GPU

ACM SIGGRAPH 2004 PosterLos Angeles, USA, 8-12 August, 2004

Takashi KanaiKeio University SFC

Yusuke YasuiASTOM Inc.

Page 3: Per-Pixel Evaluation of Parametric Surfaces on GPU ACM Workshop on General Purpose Computing on Graphics Processors Los Angeles, USA, 7-8 August, 2004.

Surface Rendering In the rendering of parametric surfaces,

in general, we often use a polygon to draw the approximation of its original surface. However, such rendering of a polygon does not represent its original surface exactly. This occurs notably in the case that a polygon is coarse or that a view position becomes closer to a surface.

Page 4: Per-Pixel Evaluation of Parametric Surfaces on GPU ACM Workshop on General Purpose Computing on Graphics Processors Los Angeles, USA, 7-8 August, 2004.

Our Contribution

Use of GPU (Programmable Graphics Hardware)

Fragment-based evaluation (position, derivatives) of parametric surfaces on GPU

Robust and high-quality evaluationInteractive computation

Page 5: Per-Pixel Evaluation of Parametric Surfaces on GPU ACM Workshop on General Purpose Computing on Graphics Processors Los Angeles, USA, 7-8 August, 2004.

Parametric Surfaces on GPU

Linear form of parametric surfaces(Bezier, B-spline, Coons, … )

Control points stored to texture(s)

Basis functions directly provided in a fragment program

i

ini Cvubvus ),(),(

iC

),( vubni

Page 6: Per-Pixel Evaluation of Parametric Surfaces on GPU ACM Workshop on General Purpose Computing on Graphics Processors Los Angeles, USA, 7-8 August, 2004.

Parametric Form of Subdivision Surface [Stam98]

u,v n,k (n: subdivision level, k: domain id) 1st derivatives of both u, v directions can also be computed

)),(( ˆ|),( ,1

0 vutbXCvus nkknTn

k ΛΩ

Bi-cubic B-spline basis functions

nkΩ)0,1( )1,1(

)1,0(

Subdivision Surface on GPU #1

eigenvalues forA subdivision matrix

Coefficients of eigenbasis functions

Control points

Page 7: Per-Pixel Evaluation of Parametric Surfaces on GPU ACM Workshop on General Purpose Computing on Graphics Processors Los Angeles, USA, 7-8 August, 2004.

Implementation on GPU : computed in advance Computed for all patterns of n, k

(n = 1…15, k = 1, 2, 3. … 45 patterns)→ stored in a texture

In the fragment program, Fetch 16 control points from a texture by n, k Basis functions          

… directly computed in FP Linear combination of basis functions and

control points

knT XC 1

0ˆ Λ

)),(( , vutb nk

Subdivision Surface on GPU #2

Page 8: Per-Pixel Evaluation of Parametric Surfaces on GPU ACM Workshop on General Purpose Computing on Graphics Processors Los Angeles, USA, 7-8 August, 2004.

Texture Storage

Subdivision Surface on GPU #3

Page 9: Per-Pixel Evaluation of Parametric Surfaces on GPU ACM Workshop on General Purpose Computing on Graphics Processors Los Angeles, USA, 7-8 August, 2004.

Texture Storage (Close-up View)

Subdivision Surface on GPU #3’

Page 10: Per-Pixel Evaluation of Parametric Surfaces on GPU ACM Workshop on General Purpose Computing on Graphics Processors Los Angeles, USA, 7-8 August, 2004.

Algorithm Overview

Subdivided Polygon- parameters u,v- face id

Rasterization

Fragments

fragment program #1- Compute n and k from

u,v

- Fetch control points from a texture

- Compute basis functions

→ surface position

fragment program #2- Compute n and k - Fetch control points- Compute basis functions→ derivatives, normal → output

Page 11: Per-Pixel Evaluation of Parametric Surfaces on GPU ACM Workshop on General Purpose Computing on Graphics Processors Los Angeles, USA, 7-8 August, 2004.

Application: Reflection Lines[Yasui and Kanai, SMI 2004]

For each fragment,1. Compute a

reflection vector2. Compute an

intersection point3. Assign a color to a

fragment4. A line on a surface

with different color… a reflection line

Page 12: Per-Pixel Evaluation of Parametric Surfaces on GPU ACM Workshop on General Purpose Computing on Graphics Processors Los Angeles, USA, 7-8 August, 2004.

Results

wireframe

polygon-based

fragment-based

Page 13: Per-Pixel Evaluation of Parametric Surfaces on GPU ACM Workshop on General Purpose Computing on Graphics Processors Los Angeles, USA, 7-8 August, 2004.

Polygon-based Pixel-based

Page 14: Per-Pixel Evaluation of Parametric Surfaces on GPU ACM Workshop on General Purpose Computing on Graphics Processors Los Angeles, USA, 7-8 August, 2004.

Discussion Position of a fragment

   Position of parametric surface computed on GPU

Current solution: input polygon: better approximation of a

surface run fragment program with bigger size of

image

Page 15: Per-Pixel Evaluation of Parametric Surfaces on GPU ACM Workshop on General Purpose Computing on Graphics Processors Los Angeles, USA, 7-8 August, 2004.

Conclusion and Future Work

Conclusion Fragment-based evaluation of parametric

surfaces on GPU Robust computation High-quality even for low polygons Interactive computation

Future Work The number of instruction sets in a fragment program

1,024 (GF 5x00) → 65,000 (GF 6x00)

Processing on a single fragment program will be possible

(cuurrently … two FPs) in the near future.

Page 16: Per-Pixel Evaluation of Parametric Surfaces on GPU ACM Workshop on General Purpose Computing on Graphics Processors Los Angeles, USA, 7-8 August, 2004.

Contact & References

Takashi KanaiKeio University SFC

E-mail: [email protected]: http://www.sfc.keio.ac.jp/~kanai/

References

Yusuke Yasui and Takashi Kanai,"Surface Quality Assessment of Subdivision Surfaces on

Programmable Graphics Hardware", Proc. International Conference on Shape Modeling and Applications

2004 (Genova, Italy, 7-9 June 2004), pp.129-136, 2004.