1 / 28

Precomputation aided GI on the GPU

Precomputation aided GI on the GPU. László Szirmay-Kalos. GI: light path generation . image. Virtual world. Path precomputation. Entry point. Exit point. Transfer factors: T ( y ,  i  x,  o ). Entry point y. Entry dir  i. Exit dir  o. Exit Point x.

delores
Download Presentation

Precomputation aided GI on the GPU

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Precomputation aided GI on the GPU László Szirmay-Kalos

  2. GI: light path generation image Virtual world

  3. Path precomputation Entry point Exit point

  4. Transfer factors: T(y,i x,o) Entry point y Entry dir i Exit dir o Exit Point x

  5. Having the transfer factors

  6. Having the Transfer factors L(x,o) =  S Lin(y,wi) T(y,ix,o) dwidy • Directional lights or Image Based Lighting: • Linis independent of y • Diffuse surfaces: L(x,o) =  Lin(wi) S T(y,ix,o) dydwi= =  Lin(wi) Tenv(ix,o) dwi L(x) =  S Lin(y) T(y,ix) dwidy

  7. Problems • Exit points: • Vertices of a highly tessellated mesh • Points corresponding to texel centers • Entry points: • Vertices of a highly tessellated mesh • Sampled randomly • No problem if directional lights or environment lighting • Exit directions: • no problem if the scene is diffuse • T is a 4-variate (8-dimensional) function: • how to store? • Simplification: diffuse surfaces + environment lighting requires just 2 variate functions

  8. Storing the Transfer factors • Finite element representation • Pros: compact, good for low frequency illumination • Cons: costly to update • Sampling + interpolation • Pros: easier to update, good for high frequency illumination • Cons: not as compact

  9. Finite-element representation Tenv(ix) T x(i) = NTn bn()

  10. How to computeTm • Find an adjoint basis function set:  bn(w) b*m(w) dw = 1 if m=n, and 0 otherwise T x(i) = NTn bn()// multiply by b*m() T x()b*m(w)dw =  NTnbn()b*m(w)dw = Tm Monte Carlo integration

  11. Monte Carlo preprocess i L b*n(wi) p(i, y,path) 1 K Tn +=  y x Number of samples

  12. Precomputed Radiance Transfer (Sloan02) • Transfer factors for directional illumination • Express directional illumination with adjoint basis functions • Thanks to orthogonality, the exit radiance is: • It requires N rgb transfer factors at each exit points Lin(w) N Ln b*n() L(x) =  Lin(wi) Tenv(ix) dwi = NLnb*n(i)NTmbm(i)dwi =NLn Tn

  13. Principal ComponentAnalysis • M is the mean of the dataset • Bs are the eigenvectors corresponding to the largest eigenvalues of the covariance matrix:  (Tm-M)T  (Tm-M)

  14. PRT results 1 bounce preproc: 12 sec 5 bounce preproc: 172 sec Run time: 466 FPS

  15. Sampling approach to precomputation aided GI • No finite-element representation • Entry-exit point samples are stored directly • Comparison to PRT: • It is easy to update • It does not assume low frequency environment map • Particularly good for point lights that can be close

  16. Preprocessing: Entry points Random sampling

  17. Preprocessing: Transfer from entry to exit points entry point with unit irradiance

  18. Preprocessing: Reference point illumination unit irrad Virtual lights

  19. Precomputed Radiance Map Item: (entry, exit, irrad) unit irrad irrad transfer

  20. PRM: 4D array Exit point Texcoord: (u,v) Entry point: r, g, b PRM item

  21. Real-time Rendering:Entry point visibility

  22. Rendering:PRM weighting

  23. Implementation CPU GPU Entry point sampling and Photon tracing Exit point illumination computation PRMs in textures Preprocessing Shadow mapping: Direct illum + Entry point visibility Camera rendering: Direct illum + PRM weighting Image Real-time rendering

  24. Tile in a single or few textures PRMs in textures: Tiling u u Exit point Exit point v v r, g, b r, g, b Etc. Pane of Entry point 1 Pane of Entry point 2

  25. Entry point clustering u u Exit point Exit point r, g, b r, g, b v v Pane of Entry point 2 Pane of Entry point 1 Close and have similar normals

  26. Resulting cluster u Exit point Pane of Entry point Cluster 1 r, g, b v

  27. Results 4096 entry points 256 – 32 clusters: 128 – 4Mb texture memory Preproc: 5 minutes Rendering: 40 FPS

  28. Results: Room with stairs 16K entries 32 clusters 4Mb per obj 50 FPS

More Related