m. jędrzejewski, k.marasek, warsaw iccvg, 22-24.09.2004 multimedia chair computation of room...
TRANSCRIPT
M. Jędrzejewski, K.Marasek, Warsaw ICCVG, 22-24.09.2004
Mu
ltim
ed
ia C
hair
Computation of room acoustics using programable video hardware
Marcin Jędrzejewski Krzysztof Marasek
M. Jędrzejewski, K.Marasek, Warsaw ICCVG, 22-24.09.2004
Mu
ltim
ed
ia C
hair
Presentation plan
Acoustics computational methods Graphical Processing Unit ( GPU ) – programming model Used acoustic model Used algorithms and data structures Implementation on GPU Results Conclusions and further work Demo movie
M. Jędrzejewski, K.Marasek, Warsaw ICCVG, 22-24.09.2004
Mu
ltim
ed
ia C
hair
Room acoustics
Geometrical methods- Beam tracing
Not very scaleable
Ray tracing Point sound source Receiver aproximated by sphere Each position change requires
recomputation
- Image sources Computationally ineffective
Echogram:
M. Jędrzejewski, K.Marasek, Warsaw ICCVG, 22-24.09.2004
Mu
ltim
ed
ia C
hair
Room representation
3D geometry Walls are made of polygons Each wall contains information on its absorption coeficient Scene contains also positions of sound source
and receiver
M. Jędrzejewski, K.Marasek, Warsaw ICCVG, 22-24.09.2004
Mu
ltim
ed
ia C
hair
GPU – programming model
Streaming processor - the same program is executed parallely but with different data on input. Each program produces output data.
Programs that are executed are also known as kernels or Pixel Shaders
HLSL as programming language, very similar to C++ Input and output data is stored in a form of textures which are
blocks of memory stored on video card
M. Jędrzejewski, K.Marasek, Warsaw ICCVG, 22-24.09.2004
Mu
ltim
ed
ia C
hair
Program execution
Data (like rays) are loaded to input texture Quad (rectangle composed of two triangles) is rendered, for each
processed texel, pixel shader is executed HLSL program can read from many different textures but can write up to
16 floating point values (using MRT) Many passes of this algorithm
M. Jędrzejewski, K.Marasek, Warsaw ICCVG, 22-24.09.2004
Mu
ltim
ed
ia C
hair
Acoustics model
One frequency band is used for
material absorption High number of reflections (~15 - 25) No diffraction, refraction, diffusion
– purely specular model
M. Jędrzejewski, K.Marasek, Warsaw ICCVG, 22-24.09.2004
Mu
ltim
ed
ia C
hair
Space division algorithms used
Constructive Solid Geometry (CSG) : to remove all illegal geometry Binary Space Partitioning (BSP) : to partition space into
convex subspaces Portal calculation – to find ways
between subspaces Further subspaces division
required for efficient GPU
implementation
M. Jędrzejewski, K.Marasek, Warsaw ICCVG, 22-24.09.2004
Mu
ltim
ed
ia C
hair
Execution flow
1. CSG, BSP, Portals, ...
2. Generation of rays on sphere surface, uploading textures to video card
3. Propagation of rays through portals and reflecting them from walls
4. Retrieving video memory with computed rays and building echogram
5. Using echogram to generate spatial sound
Loading textures: state data and data
structures
Data structures computation
Multipass rendering
Building echogram
Auralization
Real timePrecomputation phase
1 2
3
4
5
M. Jędrzejewski, K.Marasek, Warsaw ICCVG, 22-24.09.2004
Mu
ltim
ed
ia C
hair
Results
Almost 100 mln ray - triangle intersections checks per second Computation of above 16000 rays with 10 reflections in two
room enviroment takes ~30ms
Model Poly count Precomputation CPU GPU
Two rooms 24 1,4s 0,5s 0,016s
House 192 1,89s 0,37s 0,025s
Office 390 4,54s 0,82s 0,027s
Church 390 1,09s 0,82s 0,033s
M. Jędrzejewski, K.Marasek, Warsaw ICCVG, 22-24.09.2004
Mu
ltim
ed
ia C
hair
M. Jędrzejewski, K.Marasek, Warsaw ICCVG, 22-24.09.2004
Mu
ltim
ed
ia C
hair
Conclusions and further work
Real-time computation of echogram with the use of ray tracing algorithm
CPU can execute other code parallely when GPU is computing ray reflections
Making use of NVIDIA Geforce 6800 or ATI X800 cards Making use of PCI-Express architecture (even 16ms speed up
possible) Mapping cone or pyramid tracing algorithms for early reflections
and using raytracing for late reverberation Better optimizations with model 3 of PS and VS
M. Jędrzejewski, K.Marasek, Warsaw ICCVG, 22-24.09.2004
Mu
ltim
ed
ia C
hair
Demo movie