SlideShare une entreprise Scribd logo
1  sur  97
Télécharger pour lire hors ligne
INTRODUCTION	
  TO	
  BIDIRECTIONAL	
  PATH	
  TRACING	
  	
  
&	
  ITS	
  IMPLEMENTATION	
  USING	
  OPENCL	
  
	
  
双方向パストレーシング(BDPT)の基礎からOPENCLによる実装まで	
  
TAKAHIRO	
  HARADA	
  	
  	
  	
  	
  (AMD)	
  
SHO	
  IKEDA	
  (RICOH)	
  
SYOYO	
  FUJITA	
  	
  	
  	
  	
  	
  (LTE)	
  
2	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
OVERVIEW	
  OF	
  THIS	
  TALK	
  
y  IntroducJon	
  (Harada,	
  20min	
  -­‐	
  25min)	
  
‒ Start	
  with	
  path	
  tracing	
  review	
  
‒ Transforming	
  path	
  tracing	
  to	
  bidirecJonal	
  path	
  tracing	
  
y  BidirecJonal	
  Path	
  Tracing	
  (Ikeda,	
  20min	
  -­‐	
  25min)	
  
‒ Classic	
  BDPT	
  
‒ Instant	
  BDPT	
  
‒ Lvc	
  BDPT	
  
y  IntegraJon	
  of	
  BidirecJonal	
  Path	
  Tracing	
  to	
  the	
  Engine	
  (Harada,	
  5min)	
  
y  Examples	
  (Harada,	
  5min)	
  
3	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
PATH	
  TRACING	
  (MONTE	
  CARLO	
  RAY	
  TRACING)	
  
y  !=	
  Raster	
  graphics	
  (game)	
  
y  BeauJful	
  rendering	
  
y  Global	
  illuminaJon	
  
4	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
PATH	
  TRACING	
  (MONTE	
  CARLO	
  RAY	
  TRACING)	
  
y  ComputaJonally	
  expensive	
  
‒ Take	
  Jme	
  to	
  converge	
  
‒ Noisy	
  at	
  first,	
  gebng	
  cleaner	
  later	
  
y  Make	
  1	
  step	
  rendering	
  faster	
  
‒ Total	
  Jme	
  decreases	
  
‒ OpJmizaJon	
  (using	
  more	
  CPU	
  cores,	
  GPUs)	
  
‒  OpenCL	
  (my	
  talk@CEDEC2014)	
  
y  Make	
  1	
  step	
  less	
  noisy	
  
‒ Need	
  less	
  steps	
  
‒ Beeer	
  sampling	
  techniques	
  
‒ Clever	
  algorithm	
  
‒  BDPT	
  (this	
  talk)	
  
PATH	
  TRACING	
  
IMPORTANCE	
  SAMPLING	
  
MULTIPLE	
  IMPORTANCE	
  SAMPLING	
  
6	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
FIRST	
  PATH	
  TRACING	
  
7	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
PATH	
  TRACING	
  IMPLEMENTATION	
  #1	
  
for(int i=0; i<nx; i++) for(int j=0; j<ny; j++)!
{!
Ray ray = genPrimaryRay( i, j );!
!
float4 coeff = 1.f;!
float4& output = pixel[i,j];!
for(int depth=0; depth<maxDepth; depth++)!
{!
Hit hit = intersect( ray );!
if( !hit.hasHit() ) break;!
!
if( hit.isEmissive() )!
{// Implicit Connection!
output += coeff * getEmission( hit );!
break;!
}!
!
ray, f, pdf = randomSample( hit );!
coeff *= f * dot( hit.m_n, ray.m_dir ) / pdf;!
}!
}!
	
  
8	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
SAMPLING	
  NEXT	
  RAY	
  
y  For	
  non	
  transmission	
  surface,	
  no	
  need	
  to	
  
sample	
  the	
  other	
  side	
  
RANDOM	
  SAMPLING	
  
for(int i=0; i<nx; i++) for(int j=0; j<ny; j++)!
{!
Ray ray = genPrimaryRay( i, j );!
!
float4 coeff = 1.f;!
float4& output = pixel[i,j];!
for(int depth=0; depth<maxDepth; depth++)!
{!
Hit hit = intersect( ray );!
if( !hit.hasHit() ) break;!
!
if( hit.isEmissive() )!
{// Implicit Connection!
output += coeff * getEmission( hit );!
break;!
}!
!
ray, f, pdf = randomSample( hit );!
coeff *= f * dot( hit.m_n, ray.m_dir ) / pdf;!
}!
}!
	
  
9	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
SAMPLING	
  NEXT	
  RAY	
  
y  Random	
  sampling	
  is	
  not	
  always	
  efficient	
  
‒ Diffuse	
  surface	
  =>	
  OK	
  
‒ Glossy	
  surface	
  =>	
  Hmm	
  L	
  
‒ Specular	
  surface	
  =>	
  Bad	
  L	
  
y  We	
  usually	
  know	
  the	
  reflecJon	
  characterisJcs	
  about	
  surface	
  
‒ Why	
  not	
  use	
  them?	
  
‒ “Importance	
  sampling”	
  (BRDF)	
  
RANDOM	
  SAMPLING	
  
	
  
10	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
IMPORTANCE	
  SAMPLING	
  (BRDF)	
  
y  Specular	
  surface	
  
‒ Only	
  reflect	
  in	
  the	
  mirrored	
  direcJon	
  
‒ Always	
  sample	
  the	
  direcJon	
  (pdf	
  =	
  1)	
  
y  Glossy	
  surface	
  
‒ Mostly	
  reflect	
  around	
  mirrored	
  direcJon	
  
‒ Sample	
  around	
  the	
  mirrored	
  direcJon	
  
Specular	
  (R)	
   Glossy	
   Mae	
  Specular	
  (T)	
  
11	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
PATH	
  TRACING	
  IMPLEMENTATION	
  #2	
  
for(int i=0; i<nx; i++) for(int j=0; j<ny; j++)!
{!
Ray ray = genPrimaryRay( i, j );!
!
float4 coeff = 1.f;!
float4& output = pixel[i,j];!
for(int depth=0; depth<maxDepth; depth++)!
{!
Hit hit = intersect( ray );!
if( !hit.hasHit() ) break;!
!
if( hit.isEmissive() )!
{// Implicit Connection!
output += coeff * getEmission( hit );!
break;!
}!
!
ray, f, pdf = randomSample( hit );!
coeff *= f * dot( hit.m_n, ray.m_dir ) / pdf;!
}!
}!
	
  
for(int i=0; i<nx; i++) for(int j=0; j<ny; j++)!
{!
Ray ray = genPrimaryRay( i, j );!
!
float4 coeff = 1.f;!
float4& output = pixel[i,j];!
for(int depth=0; depth<maxDepth; depth++)!
{!
Hit hit = intersect( ray );!
if( !hit.hasHit() ) break;!
!
if( hit.isEmissive() )!
{// Implicit Connection!
output += coeff * getEmission( hit );!
break;!
}!
!
ray, f, pdf = brdfSample( hit );!
coeff *= f * dot( hit.m_n, ray.m_dir ) / pdf;!
}!
}!
	
  
Random	
  Sampling	
   Brdf	
  Importance	
  Sampling	
  
12	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
PATH	
  TRACING	
  IMPLEMENTATION	
  #2	
  
for(int i=0; i<nx; i++) for(int j=0; j<ny; j++)!
{!
Ray ray = genPrimaryRay( i, j );!
!
float4 coeff = 1.f;!
float4& output = pixel[i,j];!
for(int depth=0; depth<maxDepth; depth++)!
{!
Hit hit = intersect( ray );!
if( !hit.hasHit() ) break;!
!
if( hit.isEmissive() )!
{// Implicit Connection!
output += coeff * getEmission( hit );!
break;!
}!
!
ray, f, pdf = randomSample( hit );!
coeff *= f * dot( hit.m_n, ray.m_dir ) / pdf;!
}!
}!
	
  
for(int i=0; i<nx; i++) for(int j=0; j<ny; j++)!
{!
Ray ray = genPrimaryRay( i, j );!
!
float4 coeff = 1.f;!
float4& output = pixel[i,j];!
for(int depth=0; depth<maxDepth; depth++)!
{!
Hit hit = intersect( ray );!
if( !hit.hasHit() ) break;!
!
if( hit.isEmissive() )!
{// Implicit Connection!
output += coeff * getEmission( hit );!
break;!
}!
!
ray, f, pdf = brdfSample( hit );!
coeff *= f * dot( hit.m_n, ray.m_dir ) / pdf;!
}!
}!
	
  
Random	
  Sampling	
   Brdf	
  Importance	
  Sampling	
  
13	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
INEFFICIENT	
  CASE	
  
y  Rough	
  surface	
  +	
  Small	
  light	
  
y  Brdf	
  sampling	
  rarely	
  hits	
  the	
  light	
  
y  SoluJon	
  
‒ We	
  know	
  where	
  the	
  lights	
  are	
  
‒ Why	
  ignoring??	
  
‒ Generate	
  ray	
  from	
  lights	
  
‒ “Importance	
  sampling”	
  (Light)	
  
Rough	
  
Reference	
  Brdf	
  sampling	
  
14	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
INEFFICIENT	
  CASE	
  
y  Rough	
  surface	
  +	
  Small	
  light	
  
y  Brdf	
  sampling	
  rarely	
  hits	
  the	
  light	
  
y  SoluJon	
  
‒ We	
  know	
  where	
  the	
  lights	
  are	
  
‒ Why	
  ignoring??	
  
‒ Generate	
  ray	
  from	
  lights	
  
‒ “Importance	
  sampling”	
  (Light)	
  
Rough	
  
Reference	
  Brdf	
  sampling	
  Light	
  sampling	
  
15	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
PATH	
  TRACING	
  IMPLEMENTATION	
  #3	
  
for(int i=0; i<nx; i++) for(int j=0; j<ny; j++)!
{!
Ray ray = genPrimaryRay( i, j );!
!
float4 coeff = 1.f;!
float4& output = pixel[i,j];!
for(int depth=0; depth<maxDepth; depth++)!
{!
Hit hit = intersect( ray );!
if( !hit.hasHit() ) break;!
!
if( hit.isEmissive() )!
{// Implicit Connection!
output += coeff * getEmission( hit );!
break;!
}!
!
ray, f, pdf = brdfSample( hit );!
coeff *= f * dot( hit.m_n, ray.m_dir ) / pdf;!
}!
}!
	
  
for(int i=0; i<nx; i++) for(int j=0; j<ny; j++)!
{!
Ray ray = genPrimaryRay( i, j );!
!
float4 coeff = 1.f;!
float4& output = pixel[i,j];!
for(int depth=0; depth<maxDepth; depth++)!
{!
Hit hit = intersect( ray );!
if( !hit.hasHit() ) break;!
{// Explicit Connection!
ray, pdf = lightSample( hit );!
Hit hit1 = intersect( ray );!
if( !hit1.hasHit() )!
{!
output+=coeff*getEmission( hit1 )/pdf;!
}!
}!
ray, f, pdf = brdfSample( hit );!
coeff *= f * dot( hit.m_n, ray.m_dir ) / pdf;!
}!
}!
	
  
Brdf	
  Importance	
  Sampling	
   Light	
  Importance	
  Sampling	
  
16	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
IMPLICIT	
  CONNECTION,	
  EXPLICIT	
  CONNECTION	
  
y  Implicit	
  ConnecJon	
  
‒ A	
  ray	
  accidentally	
  hit	
  a	
  light	
  source	
  
‒  Ater	
  primary	
  rays	
  are	
  generated	
  from	
  camera	
  
‒  Ater	
  bounced	
  rays	
  are	
  sampled	
  from	
  BRDF	
  
y  Explicit	
  ConnecJon	
  
‒ A	
  path	
  is	
  intenJonally	
  connected	
  to	
  a	
  light	
  source	
  
‒  Direct	
  illuminaJon	
  (sample	
  a	
  vertex	
  on	
  a	
  light	
  source)	
  
Camera	
 Light	
Object	
Camera	
 Light	
Object
17	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
PATH	
  TRACING	
  IMPLEMENTATION	
  #3	
  
y  We	
  should	
  not	
  accumulaJng	
  implicit	
  hits	
  for	
  this	
  implementaBon	
  
y  Even	
  if	
  a	
  ray	
  hits	
  an	
  emissive	
  surface,	
  we	
  ignore	
  it	
  
y  Sounds	
  like	
  we	
  are	
  wasJng	
  something	
  
NOTE	
  
18	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
BRDF	
  SAMPLING	
  +	
  LIGHT	
  SAMPLING	
  
y  Both	
  generate	
  image	
  
‒ Each	
  technique	
  has	
  strong	
  &	
  weak	
  points	
  
‒ Converges	
  to	
  the	
  same	
  image	
  at	
  the	
  end	
  
Brdf	
  sampling	
  (16spp)	
   Light	
  sampling	
  (16spp)	
  
Brdf	
  sampling	
  (inf. spp)	
   Light	
  sampling	
  (inf. spp)	
  
=	
  
19	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
PATH	
  TRACING	
  IMPLEMENTATION	
  #3	
  
y  We	
  should	
  not	
  accumulaJng	
  implicit	
  hits	
  for	
  this	
  implementaBon	
  
y  Even	
  if	
  a	
  ray	
  hits	
  an	
  emissive	
  surface,	
  we	
  ignore	
  it	
  
y  Sounds	
  like	
  we	
  are	
  wasJng	
  something	
  
y  Can	
  we	
  use	
  it	
  somehow?	
  
NOTE	
  
20	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
BRDF	
  SAMPLING	
  +	
  LIGHT	
  SAMPLING	
  
y  Then	
  simply…	
  Take	
  an	
  average?	
  
‒ Works	
  
‒  but	
  not	
  the	
  best	
  
y  We	
  can	
  set	
  any	
  coefficients	
  if	
  they	
  sum	
  up	
  to	
  1.0	
  
‒ brdfSampledImage	
  *	
  0.2	
  +	
  lightSampledImage	
  *	
  0.8	
  ?	
  
‒ brdfSampledImage	
  *	
  0.8	
  +	
  lightSampledImage	
  *	
  0.2	
  ?	
  
‒ Hmm…	
  
x	
  0.5	
  +	
  	
   x	
  0.5	
  	
  
Brdf	
  sample	
   Light	
  sample	
  
x	
  0.2	
  +	
  	
   x	
  0.8	
  	
  
Brdf	
  sample	
   Light	
  sample	
  
21	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
J	
  L	
  
COMPARING	
  BRDF	
  SAMPLING	
  AND	
  LIGHT	
  SAMPLING	
  
y  Light	
  sampling	
  
‒ Good	
  for	
  rough	
  surface	
  
‒ Bad	
  for	
  sharp	
  surface	
  
y  Brdf	
  sampling	
  
‒ Bad	
  for	
  rough	
  surface	
  
‒ Good	
  for	
  sharp	
  surface	
  
L	
  J	
  
22	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
BRDF	
  SAMPLING	
  +	
  LIGHT	
  SAMPLING	
  
y  Then	
  simply…	
  Take	
  an	
  average?	
  
‒ Works	
  
‒  but	
  not	
  the	
  best	
  
y  We	
  can	
  set	
  any	
  coefficients	
  if	
  they	
  sum	
  up	
  to	
  1.0	
  
‒ brdfSampledImage	
  *	
  0.2	
  +	
  lightSampledImage	
  *	
  0.8	
  ?	
  
‒ brdfSampledImage	
  *	
  0.8	
  +	
  lightSampledImage	
  *	
  0.2	
  ?	
  
‒ Hmm	
  
y  We	
  do	
  not	
  have	
  to	
  se	
  the	
  same	
  coefficients	
  for	
  all	
  the	
  pixels	
  J	
  
‒ “MulJple	
  importance	
  sampling”	
  
‒ Per	
  pixel	
  weight	
  
x	
  0.5	
  +	
  	
   x	
  0.5	
  	
  
Brdf	
  sample	
   Light	
  sample	
  
x	
  0.2	
  +	
  	
   x	
  0.8	
  	
  
Brdf	
  sample	
   Light	
  sample	
  
x	
   +	
   x	
   =	
  
Brdf	
  sample	
   Light	
  sample	
  w_b	
   w_l	
   MIS	
  
23	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
BRDF	
  SAMPLING	
  +	
  LIGHT	
  SAMPLING	
  
y  Uniform	
  weighJng	
  (Average)	
  
y  Per	
  pixel	
  weighJng	
  (MulJple	
  Importance	
  Sampling,	
  MIS)	
  
VISUALIZATION	
  OF	
  MIS	
  
x	
   +	
   x	
   =	
  
Brdf	
  sample	
   Light	
  sample	
  w_b	
   w_l	
   MIS	
  
+	
   =	
  1.0	
  
w_b	
   w_l	
  
x	
   +	
   x	
   =	
  
Brdf	
  sample	
   Light	
  sample	
  w_b	
   w_l	
   Average	
  
0.5	
   0.5	
  
0.5	
   0.5	
  +	
   =	
  1.0	
  
w_b	
   w_l	
  
24	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
MULTIPLE	
  IMPORTANCE	
  SAMPLING	
  
y  Light	
  sampling	
  
y  Brdf	
  sampling	
  
0.1	
  0.9	
  
0.9	
  0.1	
  
0.5	
  
0.5	
  
25	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
MULTIPLE	
  IMPORTANCE	
  SAMPLING	
  WEIGHT	
  
y  Detailed	
  look	
  at	
  brdf	
  &	
  light	
  sampling	
  (direct	
  illuminaJon)	
  
y  Possible	
  to	
  sample	
  the	
  same	
  direcJon	
  using	
  both	
  sampling	
  technique	
  
‒ Only	
  difference	
  is	
  the	
  PDF	
  (probability	
  density	
  funcJon)	
  
y  Rough	
  surface	
  
‒ PDF	
  of	
  Brdf	
  sampling	
  is	
  almost	
  uniform	
  
‒  Low	
  confidence	
  in	
  the	
  sample	
  =>	
  Higher	
  noise	
  
‒ PDF	
  of	
  light	
  sampling	
  has	
  a	
  strong	
  spike	
  at	
  light	
  direcJon	
  
‒  High	
  confidence	
  in	
  the	
  sample	
  	
  =>	
  Lower	
  noise	
  
Brdf	
  Sampling	
   Light	
  Sampling	
  
26	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
MULTIPLE	
  IMPORTANCE	
  SAMPLING	
  WEIGHT	
  
y  Detailed	
  look	
  at	
  brdf	
  &	
  light	
  sampling	
  (direct	
  illuminaJon)	
  
y  Possible	
  to	
  sample	
  the	
  same	
  direcJon	
  using	
  both	
  sampling	
  technique	
  
‒ Only	
  difference	
  is	
  the	
  PDF	
  (probability	
  density	
  funcJon)	
  
y  Sharp	
  surface	
  
‒ PDF	
  of	
  Brdf	
  sampling	
  is	
  almost	
  uniform	
  
‒  Very	
  high	
  confidence	
  in	
  the	
  sample	
  =>	
  Lower	
  noise	
  
‒ PDF	
  of	
  light	
  sampling	
  has	
  a	
  strong	
  spike	
  at	
  light	
  direcJon	
  
‒  RelaJvely	
  lower	
  confidence	
  in	
  the	
  sample	
  	
  =>	
  Higher	
  noise	
  
Brdf	
  Sampling	
   Light	
  Sampling	
  
27	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
MULTIPLE	
  IMPORTANCE	
  SAMPLING	
  WEIGHT	
  
y  Use	
  sampling	
  PDF	
  to	
  compute	
  weight	
  
y  Weight	
  for	
  light	
  sample	
  (Explicit	
  hit)	
  
	
  
	
  
	
  
	
  
y  Weight	
  for	
  brdf	
  sample	
  (Implicit	
  hit)	
  
	
  
y  This	
  is	
  very	
  important	
  for	
  an	
  efficient	
  BDPT	
  
28	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
PATH	
  TRACING	
  IMPLEMENTATION	
  #4	
  (FINAL)	
  
for(int i=0; i<nx; i++) for(int j=0; j<ny; j++)!
{!
Ray ray = genPrimaryRay( i, j );!
!
float4 coeff = 1.f;!
float4& output = pixel[i,j];!
float pdfb = 0.f;!
for(int depth=0; depth<maxDepth; depth++)!
{!
Hit hit = intersect( ray );!
if( !hit.hasHit() ) break;!
if( hit.isEmissive() )!
{// Implicit Connection!
pdfl = lightPdf( hit );!
w = pdfb / (pdfb + pdfl);!
output += coeff * getEmission( hit ) * w;!
break;!
}!
{// Explicit Connection!
ray, pdfl = lightSample( hit );!
Hit hit1 = intersect( ray );!
if( !hit1.hasHit() )!
{!
w = pdfl / (pdfb + pdfl);!
output += coeff * getEmission( hit1 ) * w / pdfl;!
}!
}!
ray, f, pdfb = brdfSample( hit );!
coeff *= f * dot( hit.m_n, nextRay.m_dir ) / pdfb;!
}!
}!
	
  
BEYOND	
  PATH	
  TRACING	
  
30	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
OUTDOOR	
  
31	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
INDOOR/OUTDOOR	
  
32	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
INDOOR	
  
33	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
PATH	
  TRACING	
  IS	
  NOT	
  PERFECT	
  
y  Path	
  tracing	
  is	
  really	
  good	
  at	
  an out	
  door	
  scene	
  
y  But	
  not	
  for	
  a	
  scene	
  mostly	
  lit	
  by	
  indirect	
  illuminaJon	
  (indoor,	
  day	
  Jme)	
  
34	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
PATH	
  TRACING	
  IS	
  NOT	
  PERFECT	
  
64	
  spp	
   256	
  spp	
   1024	
  spp	
  
x	
  4	
   x	
  4	
  Indoor	
  Indoor/outdoor	
  Outdoor	
  
Good	
  
Ok	
  
Bad	
  
Path	
  Tracing	
  is..	
  
35	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
BAD	
  CONVERGENCE	
  FOR	
  INDOOR	
  SCENE	
  
y  Ray	
  needs	
  to	
  be	
  bounced	
  more	
  than	
  once	
  
before	
  connecJng	
  to	
  the	
  light	
  source	
  
y  As	
  we	
  bounce,	
  we	
  get	
  less	
  &	
  less	
  confident	
  
about	
  the	
  path	
  
‒ Lower	
  probability	
  =>	
  More	
  noise	
  
36	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
LIGHT	
  TRACING	
  
y  If	
  traced	
  from	
  the	
  light,	
  it	
  is	
  beeer	
  (more	
  confident)	
  
y  Path	
  Tracing	
  
y  Light	
  Tracing	
  
Camera	
 Light	
Object	
Camera	
 Light	
Object	
Path	
  Tracing	
   BDPT	
  
37	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
PATH	
  TRACING	
  +	
  1	
  LIGHT	
  PATH	
  
y  Can	
  we	
  mix	
  path	
  tracing	
  &	
  light	
  tracing	
  
‒ Trace	
  1	
  light	
  path	
  
‒ Connect	
  to	
  camera	
  path	
  
Camera	
 Light	
Object
38	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
PATH	
  TRACING	
  +	
  1	
  LIGHT	
  PATH	
  
y  Can	
  we	
  mix	
  path	
  tracing	
  &	
  light	
  tracing	
  
‒ Trace	
  1	
  light	
  path	
  
‒ Connect	
  to	
  camera	
  path	
  
y  Improves	
  some	
  situaJons	
  (not	
  all)	
  
‒ Example.	
  A	
  room	
  is	
  lit	
  by	
  bounced	
  light	
  
y  Can	
  we	
  trace	
  more	
  than	
  1	
  light	
  path,	
  and	
  combine?	
  
‒ =>	
  BidirecJonal	
  Path	
  Tracing	
  
Camera	
 Light	
Object	
Path	
  Tracing	
   Path	
  Trace	
  +	
  1	
  light	
  path	
  
64	
  spp	
  
BDPT	
  
Bi-Directional Path Tracing (BDPT)	
Camera path	
Light path	
Connection	
Camera	
 Light	
Object	
•  BDPT traces paths from the camera and the light source

•  BDPT combines various path sampling strategies
Bi-Directional Path Tracing (BDPT)	
Camera path	
Light path	
Connection	
Camera	
 Light	
Object	
•  BDPT traces paths from the camera and the light source

•  BDPT combines various path sampling strategies
Bi-Directional Path Tracing (BDPT)	
Camera path	
Light path	
Connection	
Camera	
 Light	
Object	
•  BDPT traces paths from the camera and the light source

•  BDPT combines various path sampling strategies
Bi-Directional Path Tracing (BDPT)	
Camera path	
Light path	
Connection	
Camera	
 Light	
Object	
•  BDPT traces paths from the camera and the light source

•  BDPT combines various path sampling strategies
BDPT	
I = w0
w1
+
+
…	
wk
·
·
·
x0 xk
•  The contributions of the sampling strategies are weighted
BDPT + Multiple Importance Sampling (MIS)	
Xs = x0, · · · xs + xs+1, · · · xk
x0 xk
xs
xs+1
•  MIS weight computation
ws(X) =
ps(X)
Pk
i=0 pi(X)
x0 xk
xs
xs+1
Xs = x0, · · · xs + xs+1, · · · xk
ps(X) = !p 0 · !p 1 · · · !p s · p s+1 · · · p k 1 · p k
BDPT + Multiple Importance Sampling (MIS) (2	
The product of the pdfs of the path sampling
The problem of BDPT on GPU implementation	
0 1 2 3Global Memory	
 0 1 2
•  BDPT stores all the vertices on the camera and light paths

•  The global memory consumption is high
0 1 2 3Global Memory	
 0 1 2
•  BDPT stores all the vertices on the camera and light paths

•  The global memory consumption is high
The problem of BDPT on GPU implementation
0 1 2 3Global Memory	
 0 1 2
•  BDPT stores all the vertices on the camera and light paths

•  The global memory consumption is high
The problem of BDPT on GPU implementation
0 1 2 3Global Memory	
 0 1 2
•  BDPT stores all the vertices on the camera and light paths

•  The global memory consumption is high
The problem of BDPT on GPU implementation
p  Instant BDPT

p  Lvc BDPT	
BDPT algorithm with low memory consumption
Instant BDPT	
Implicit view ( ) path	
Explicit view ( ) path 	
Implicit light ( ) path	
Explicit light ( ) path	
VI
VE LE
LI
•  Path sampling strategies are limited to 4 (PT and LT)

•  Low memory consumption

•  If the camera has no collision detection, 3 sampling strategies
Instant BDPT + MIS	
Explicit view ( ) path 	
VE
wVE
(X) =
pVE
(X)
pVE
(X) + pVI
(X) + pLE
(X)
1
wVE
(X)
= 1 +
pVI
(X)
pVE
(X)
+
pLE
(X)
pVE
(X)
Instant BDPT + MIS (2	
1
wVE
(X)
= 1 +
pVI
(X)
pVE
(X)
+
pLE
(X)
pVE
(X)
pVI
(X)
pVE
(X)
=
!p k 1
p k+1
!p k 1
p k+1
Instant BDPT + MIS (3	
1
wVE
(X)
= 1 +
pVI
(X)
pVE
(X)
+
pLE
(X)
pVE
(X)
x0
xk
s0 =
1
P(x 1 ! x0 ! x1)
pLE
(X)
pVE
(X)
= s0s1 · · · sk
x1
Instant BDPT + MIS (3	
1
wVE
(X)
= 1 +
pVI
(X)
pVE
(X)
+
pLE
(X)
pVE
(X)
x0
xk
s1 =
1
P(x0 ! x1 ! x2)G(x0 $ x1)
pLE
(X)
pVE
(X)
= s0s1 · · · sk
x1
Instant BDPT + MIS (3	
1
wVE
(X)
= 1 +
pVI
(X)
pVE
(X)
+
pLE
(X)
pVE
(X)
x0
xk
pLE
(X)
pVE
(X)
= s0s1 · · · sk sk = P(xk 1 xk xk+1)G(xk 1 $ xk)
x1
Instant BDPT OpenCL implementation
Instant BDPT : Bad case1	
x0 xk
x0 xk
Instant BDPT : Bad case1
x0 xk
Instant BDPT : Bad case1
x0 xk
Instant BDPT : Bad case1
x0
xk
Specular	
Instant BDPT : Bad case
x0
xk
Specular	
Instant BDPT : Bad case
x0
xk
Specular	
Instant BDPT : Bad case
x0
xk
Specular	
Instant BDPT : Bad case
p  Instant BDPT

p  Lvc BDPT	
BDPT algorithm with low memory consumption
Lvc BDPT light vertex cache	
0 1 2 3Light Vertex Cache	
•  Light vertex cache
•  Recursive MIS
Lvc BDPT light vertex cache	
0 1 2 3Light Vertex Cache	
•  Light vertex cache
•  Recursive MIS
Lvc BDPT light vertex cache	
0 1 2 3Light Vertex Cache	
•  Light vertex cache
•  Recursive MIS
Lvc BDPT light vertex cache	
0 1 2 3Light Vertex Cache	
•  Light vertex cache
•  Recursive MIS

•  LvcBDPT doesn’t have the global memory for the camera path
Recursive MIS	
x0
xk
xs
ws(X) =
ps(X)
Pk
i=0 pi(X)
1
ws(X)
=
Pk
i=0 pi(X)
ps(X)
p s+1 · dE
s + 1 + !p s · dL
s+1=
1
ws(X)
= p s+1 · dE
s + 1 + !p s · dL
s+1
dE
1 =
1
!p 0
dE
s =
1 + p sdE
s 1
!p s 1
dL
k =
1
p k+1
Recursive MIS	
x0
xk
xs
dL
s+1 =
1 + !p s+1 · dL
s+2
p s+2
1
ws(X)
= p s+1 · dE
s + 1 + !p s · dL
s+1
Lvc BDPT + Recursive MIS	
x0 xk
xs
dE
1 =
1
!p 0
1
ws(X)
= p s+1 · dE
s + 1 + !p s · dL
s+1
x0 xk
xs
dE
s =
1 + p sdE
s 1
!p s 1
Lvc BDPT + Recursive MIS
1
ws(X)
= p s+1 · dE
s + 1 + !p s · dL
s+1
x0 xk
xs
dE
s =
1 + p sdE
s 1
!p s 1
dL
k =
1
p k+1
Lvc BDPT + Recursive MIS
1
ws(X)
= p s+1 · dE
s + 1 + !p s · dL
s+1
x0 xk
xs
dE
s =
1 + p sdE
s 1
!p s 1
dL
k 1 =
1 + !p k 1 · dL
k
p k
Lvc BDPT + Recursive MIS
1
ws(X)
= p s+1 · dE
s + 1 + !p s · dL
s+1
x0 xk
xs
dE
s =
1 + p sdE
s 1
!p s 1
dL
s+1 =
1 + !p s+1 · dL
s+2
p s+2
Lvc BDPT + Recursive MIS
Lvc BDPT OpenCL implementation
InstantBDPT	
 LvcBDPT
InstantBDPT	
 LvcBDPT
InstantBDPT	
 LvcBDPT
INTEGRATION	
  TO	
  THE	
  
ENGINE	
  
84	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
Back	
  End	
  
World	
  GPU	
  (OCL)	
  
-­‐  Path	
  Tracing	
  
-­‐  Light	
  Tracing	
  
-­‐  	
  	
  
-­‐  	
  	
  
World	
  CPU	
  
-­‐  Path	
  Tracing	
  (OpJmized)	
  
Front	
  End	
  
ENGINE	
  ARCHITECTURE	
  OVERVIEW	
  
Data	
  Loader	
  
-­‐  Obj	
  
-­‐  Eson	
  
-­‐  Fbx	
  
Data	
  Manager	
  
-­‐  Texture	
  
-­‐  Material	
  
-­‐  Mesh	
  
Tahoe	
  API	
  
Texture	
  Loader	
  
-­‐  Png	
  
-­‐  Hdr	
  
-­‐  OpenExr	
  
-­‐  …	
  
Factory	
  (CPU)	
  
Camera	
  
-­‐  PerspecJve	
  
-­‐  Parallel	
  
-­‐  Bake	
  
-­‐  VR	
  
Material	
  System	
  
-­‐  Default	
  
-­‐  Graph	
  
-­‐  OSL	
  
Light	
  Sampler	
  
-­‐  Uniform	
  
-­‐  Group	
  
-­‐  StochasJc	
  
Factory	
  (OCL)	
  
85	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
Back	
  End	
  
World	
  GPU	
  (OCL)	
  
-­‐  Path	
  Tracing	
  
-­‐  Light	
  Tracing	
  
-­‐  BidirecJonal	
  Path	
  Tracing	
  (LvcBDPT)	
  
-­‐  BidirecJonal	
  Path	
  Tracing	
  (InstantBDPT)	
  
World	
  CPU	
  
-­‐  Path	
  Tracing	
  (OpJmized)	
  
Front	
  End	
  
ENGINE	
  ARCHITECTURE	
  OVERVIEW	
  
Data	
  Loader	
  
-­‐  Obj	
  
-­‐  Eson	
  
-­‐  Fbx	
  
Data	
  Manager	
  
-­‐  Texture	
  
-­‐  Material	
  
-­‐  Mesh	
  
Tahoe	
  API	
  
Texture	
  Loader	
  
-­‐  Png	
  
-­‐  Hdr	
  
-­‐  OpenExr	
  
-­‐  …	
  
Factory	
  (CPU)	
  
Camera	
  
-­‐  PerspecJve	
  
-­‐  Parallel	
  
-­‐  Bake	
  
-­‐  VR	
  
Material	
  System	
  
-­‐  Default	
  
-­‐  Graph	
  
-­‐  OSL	
  
Light	
  Sampler	
  
-­‐  Uniform	
  
-­‐  Group	
  
-­‐  StochasJc	
  
Factory	
  (OCL)	
  
86	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
PATH	
  TRACING	
  CODE	
  
y  Not	
  employing	
  a	
  mega	
  kernel	
  implementaJon	
  
y  There	
  are	
  many	
  small	
  kernels	
  for	
  path	
  tracing	
  
‒ Easier	
  to	
  debug	
  
‒ Performance	
  
‒ Extendibility	
  =>	
  Key	
  to	
  add	
  BDPT	
  
y  (See	
  my	
  slides	
  @	
  CEDEC	
  2014)	
  
87	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
PATH	
  TRACING	
  KERNELS	
  
y  Prepare	
  
‒ Camera	
  ray	
  set	
  up	
  
y  Loop	
  
‒ Ray	
  cast	
  
‒ Implicit	
  hit	
  accumulaJon	
  
‒ Material	
  prepare	
  
‒ Shadow	
  ray	
  set	
  up	
  
‒ Material	
  evaluaJon	
  
‒ Ray	
  cast	
  
‒ Explicit	
  hit	
  accumulaJon	
  
‒ Sample	
  next	
  ray	
  
Path	
  Tracing	
  
Each	
  line	
  is	
  one	
  or	
  more	
  OCL	
  kernels	
  
88	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
INSTANT	
  BDPT	
  
y  Prepare	
  
‒ Set	
  up	
  camera	
  ray	
  
‒ Sample	
  light	
  point	
  
y  Loop	
  
‒ Ray	
  cast	
  
‒ Material	
  prepare	
  (sampleBrdf)	
  
‒ Implicit	
  connecJon	
  
‒ Explicit	
  connecJon	
  to	
  light	
  
‒  Make	
  shadow	
  ray	
  
‒  Ray	
  cast	
  
‒  Connect	
  to	
  light	
  
‒ Sample	
  next	
  ray	
  
‒ Update	
  MIS	
  weight	
  term	
  
Trace	
  Light	
  Path	
   Trace	
  Camera	
  Path	
  
Orange:	
  New	
  kernels	
  wrieen	
  for	
  BDPT	
  
White	
  	
  :	
  Using	
  path	
  tracing	
  kernels	
  
89	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
INSTANT	
  BDPT	
  
y  Prepare	
  
‒ Set	
  up	
  light	
  ray	
  
‒ Sample	
  lens	
  point	
  
‒ Explicit	
  connecJon	
  light	
  to	
  camera	
  
y  Loop	
  
‒ Ray	
  cast	
  
‒ Material	
  prepare	
  (sampleBrdf)	
  
‒ Explicit	
  connecJon	
  to	
  camera	
  
‒  Make	
  shadow	
  ray	
  
‒  Ray	
  cast	
  
‒  Set	
  pixel	
  index	
  
‒  Connect	
  to	
  camera	
  
‒ Sample	
  next	
  ray	
  
‒ Update	
  MIS	
  weight	
  term	
  
y  Prepare	
  
‒ Set	
  up	
  camera	
  ray	
  
‒ Sample	
  light	
  point	
  
y  Loop	
  
‒ Ray	
  cast	
  
‒ Material	
  prepare	
  (sampleBrdf)	
  
‒ Implicit	
  connecJon	
  
‒ Explicit	
  connecJon	
  to	
  light	
  
‒  Make	
  shadow	
  ray	
  
‒  Ray	
  cast	
  
‒  Connect	
  to	
  light	
  
‒ Sample	
  next	
  ray	
  
‒ Update	
  MIS	
  weight	
  term	
  
Trace	
  Light	
  Path	
   Trace	
  Camera	
  Path	
  
Orange:	
  New	
  kernels	
  wrieen	
  for	
  BDPT	
  
White	
  	
  :	
  Using	
  path	
  tracing	
  kernels	
  
90	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
LVCBDPT	
  
y  More	
  complicated	
  than	
  Instant	
  BDPT	
  
y  ImplementaJon	
  is	
  not	
  that	
  far	
  from	
  Instant	
  BDPT	
  
EXAMPLES	
  
92	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
BDPT	
   PT	
  
93	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
BDPT	
   PT	
  
94	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
BDPT	
   PT	
  
95	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
CLOSING	
  
y  References	
  
‒ AddiJonal	
  note	
  
‒  To	
  be	
  published	
  in	
  CEDEC	
  library	
  
‒  Detailed	
  explanaJon	
  of	
  Instant	
  BDPT,	
  Lvc	
  BDPT	
  
‒ CEDEC	
  2013	
  
‒  hep://www.slideshare.net/takahiroharada/introducJon-­‐to-­‐monte-­‐carlo-­‐ray-­‐tracing-­‐cedec2013	
  
‒ CEDEC	
  2014	
  
‒  hep://www.slideshare.net/takahiroharada/introducJon-­‐to-­‐monte-­‐carlo-­‐ray-­‐tracing-­‐opencl-­‐implementaJon-­‐cedec-­‐2014	
  
y  Feedback	
  is	
  welcome	
  
‒ For	
  next	
  years	
  presentaJon	
  
96	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
NON	
  SYMMETRIC	
  BRDF	
  
Without	
  Fix	
   With	
  Fix	
  
97	
   |	
  	
  	
  OPENCL	
  BDPT	
  	
  |	
  	
  AUGUST	
  28,	
  2015	
  	
  |	
  	
  	
  HARADA,	
  IKEDA,	
  FUJITA	
  
NON	
  SYMMETRIC	
  BRDF	
  
With	
  Fix	
   With	
  Fix	
  

Contenu connexe

Tendances

A Bit More Deferred Cry Engine3
A Bit More Deferred   Cry Engine3A Bit More Deferred   Cry Engine3
A Bit More Deferred Cry Engine3guest11b095
 
Five Rendering Ideas from Battlefield 3 & Need For Speed: The Run
Five Rendering Ideas from Battlefield 3 & Need For Speed: The RunFive Rendering Ideas from Battlefield 3 & Need For Speed: The Run
Five Rendering Ideas from Battlefield 3 & Need For Speed: The RunElectronic Arts / DICE
 
Rendering Technologies from Crysis 3 (GDC 2013)
Rendering Technologies from Crysis 3 (GDC 2013)Rendering Technologies from Crysis 3 (GDC 2013)
Rendering Technologies from Crysis 3 (GDC 2013)Tiago Sousa
 
Screen Space Reflections in The Surge
Screen Space Reflections in The SurgeScreen Space Reflections in The Surge
Screen Space Reflections in The SurgeMichele Giacalone
 
Paris Master Class 2011 - 07 Dynamic Global Illumination
Paris Master Class 2011 - 07 Dynamic Global IlluminationParis Master Class 2011 - 07 Dynamic Global Illumination
Paris Master Class 2011 - 07 Dynamic Global IlluminationWolfgang Engel
 
HPG 2018 - Game Ray Tracing: State-of-the-Art and Open Problems
HPG 2018 - Game Ray Tracing: State-of-the-Art and Open ProblemsHPG 2018 - Game Ray Tracing: State-of-the-Art and Open Problems
HPG 2018 - Game Ray Tracing: State-of-the-Art and Open ProblemsElectronic Arts / DICE
 
CEDEC 2018 - Towards Effortless Photorealism Through Real-Time Raytracing
CEDEC 2018 - Towards Effortless Photorealism Through Real-Time RaytracingCEDEC 2018 - Towards Effortless Photorealism Through Real-Time Raytracing
CEDEC 2018 - Towards Effortless Photorealism Through Real-Time RaytracingElectronic Arts / DICE
 
Physically Based Sky, Atmosphere and Cloud Rendering in Frostbite
Physically Based Sky, Atmosphere and Cloud Rendering in FrostbitePhysically Based Sky, Atmosphere and Cloud Rendering in Frostbite
Physically Based Sky, Atmosphere and Cloud Rendering in FrostbiteElectronic Arts / DICE
 
Massive Point Light Soft Shadows
Massive Point Light Soft ShadowsMassive Point Light Soft Shadows
Massive Point Light Soft ShadowsWolfgang Engel
 
Graphics Gems from CryENGINE 3 (Siggraph 2013)
Graphics Gems from CryENGINE 3 (Siggraph 2013)Graphics Gems from CryENGINE 3 (Siggraph 2013)
Graphics Gems from CryENGINE 3 (Siggraph 2013)Tiago Sousa
 
Physically Based and Unified Volumetric Rendering in Frostbite
Physically Based and Unified Volumetric Rendering in FrostbitePhysically Based and Unified Volumetric Rendering in Frostbite
Physically Based and Unified Volumetric Rendering in FrostbiteElectronic Arts / DICE
 
SIGGRAPH 2018 - Full Rays Ahead! From Raster to Real-Time Raytracing
SIGGRAPH 2018 - Full Rays Ahead! From Raster to Real-Time RaytracingSIGGRAPH 2018 - Full Rays Ahead! From Raster to Real-Time Raytracing
SIGGRAPH 2018 - Full Rays Ahead! From Raster to Real-Time RaytracingElectronic Arts / DICE
 
Progressive Lightmapper: An Introduction to Lightmapping in Unity
Progressive Lightmapper: An Introduction to Lightmapping in UnityProgressive Lightmapper: An Introduction to Lightmapping in Unity
Progressive Lightmapper: An Introduction to Lightmapping in UnityUnity Technologies
 
Triangle Visibility buffer
Triangle Visibility bufferTriangle Visibility buffer
Triangle Visibility bufferWolfgang Engel
 
Rendering Techniques in Rise of the Tomb Raider
Rendering Techniques in Rise of the Tomb RaiderRendering Techniques in Rise of the Tomb Raider
Rendering Techniques in Rise of the Tomb RaiderEidos-Montréal
 
Rendering Tech of Space Marine
Rendering Tech of Space MarineRendering Tech of Space Marine
Rendering Tech of Space MarinePope Kim
 

Tendances (20)

Stochastic Screen-Space Reflections
Stochastic Screen-Space ReflectionsStochastic Screen-Space Reflections
Stochastic Screen-Space Reflections
 
A Bit More Deferred Cry Engine3
A Bit More Deferred   Cry Engine3A Bit More Deferred   Cry Engine3
A Bit More Deferred Cry Engine3
 
Five Rendering Ideas from Battlefield 3 & Need For Speed: The Run
Five Rendering Ideas from Battlefield 3 & Need For Speed: The RunFive Rendering Ideas from Battlefield 3 & Need For Speed: The Run
Five Rendering Ideas from Battlefield 3 & Need For Speed: The Run
 
Rendering Technologies from Crysis 3 (GDC 2013)
Rendering Technologies from Crysis 3 (GDC 2013)Rendering Technologies from Crysis 3 (GDC 2013)
Rendering Technologies from Crysis 3 (GDC 2013)
 
Screen Space Reflections in The Surge
Screen Space Reflections in The SurgeScreen Space Reflections in The Surge
Screen Space Reflections in The Surge
 
Paris Master Class 2011 - 07 Dynamic Global Illumination
Paris Master Class 2011 - 07 Dynamic Global IlluminationParis Master Class 2011 - 07 Dynamic Global Illumination
Paris Master Class 2011 - 07 Dynamic Global Illumination
 
HPG 2018 - Game Ray Tracing: State-of-the-Art and Open Problems
HPG 2018 - Game Ray Tracing: State-of-the-Art and Open ProblemsHPG 2018 - Game Ray Tracing: State-of-the-Art and Open Problems
HPG 2018 - Game Ray Tracing: State-of-the-Art and Open Problems
 
mssao presentation
mssao presentationmssao presentation
mssao presentation
 
Lighting the City of Glass
Lighting the City of GlassLighting the City of Glass
Lighting the City of Glass
 
CEDEC 2018 - Towards Effortless Photorealism Through Real-Time Raytracing
CEDEC 2018 - Towards Effortless Photorealism Through Real-Time RaytracingCEDEC 2018 - Towards Effortless Photorealism Through Real-Time Raytracing
CEDEC 2018 - Towards Effortless Photorealism Through Real-Time Raytracing
 
Physically Based Sky, Atmosphere and Cloud Rendering in Frostbite
Physically Based Sky, Atmosphere and Cloud Rendering in FrostbitePhysically Based Sky, Atmosphere and Cloud Rendering in Frostbite
Physically Based Sky, Atmosphere and Cloud Rendering in Frostbite
 
Massive Point Light Soft Shadows
Massive Point Light Soft ShadowsMassive Point Light Soft Shadows
Massive Point Light Soft Shadows
 
Graphics Gems from CryENGINE 3 (Siggraph 2013)
Graphics Gems from CryENGINE 3 (Siggraph 2013)Graphics Gems from CryENGINE 3 (Siggraph 2013)
Graphics Gems from CryENGINE 3 (Siggraph 2013)
 
Physically Based and Unified Volumetric Rendering in Frostbite
Physically Based and Unified Volumetric Rendering in FrostbitePhysically Based and Unified Volumetric Rendering in Frostbite
Physically Based and Unified Volumetric Rendering in Frostbite
 
A Real-time Radiosity Architecture
A Real-time Radiosity ArchitectureA Real-time Radiosity Architecture
A Real-time Radiosity Architecture
 
SIGGRAPH 2018 - Full Rays Ahead! From Raster to Real-Time Raytracing
SIGGRAPH 2018 - Full Rays Ahead! From Raster to Real-Time RaytracingSIGGRAPH 2018 - Full Rays Ahead! From Raster to Real-Time Raytracing
SIGGRAPH 2018 - Full Rays Ahead! From Raster to Real-Time Raytracing
 
Progressive Lightmapper: An Introduction to Lightmapping in Unity
Progressive Lightmapper: An Introduction to Lightmapping in UnityProgressive Lightmapper: An Introduction to Lightmapping in Unity
Progressive Lightmapper: An Introduction to Lightmapping in Unity
 
Triangle Visibility buffer
Triangle Visibility bufferTriangle Visibility buffer
Triangle Visibility buffer
 
Rendering Techniques in Rise of the Tomb Raider
Rendering Techniques in Rise of the Tomb RaiderRendering Techniques in Rise of the Tomb Raider
Rendering Techniques in Rise of the Tomb Raider
 
Rendering Tech of Space Marine
Rendering Tech of Space MarineRendering Tech of Space Marine
Rendering Tech of Space Marine
 

En vedette

CEDEC2015講演 チーム開発をスムーズにするために
CEDEC2015講演 チーム開発をスムーズにするためにCEDEC2015講演 チーム開発をスムーズにするために
CEDEC2015講演 チーム開発をスムーズにするためにTakafumi Ikeda
 
Gpuフォトンマッピング手法 h26-09-kgussan-第2回レイトレ合宿
Gpuフォトンマッピング手法 h26-09-kgussan-第2回レイトレ合宿Gpuフォトンマッピング手法 h26-09-kgussan-第2回レイトレ合宿
Gpuフォトンマッピング手法 h26-09-kgussan-第2回レイトレ合宿Takahiro KOGUCHI
 
Alhazen 2016
Alhazen 2016Alhazen 2016
Alhazen 2016qatnonoil
 
Introduction to Monte Carlo Ray Tracing (CEDEC 2013)
Introduction to Monte Carlo Ray Tracing (CEDEC 2013)Introduction to Monte Carlo Ray Tracing (CEDEC 2013)
Introduction to Monte Carlo Ray Tracing (CEDEC 2013)Takahiro Harada
 
物理ベースレンダラedupt解説
物理ベースレンダラedupt解説物理ベースレンダラedupt解説
物理ベースレンダラedupt解説h013
 
フォトンマッピング入門
フォトンマッピング入門フォトンマッピング入門
フォトンマッピング入門Shuichi Hayashi
 

En vedette (6)

CEDEC2015講演 チーム開発をスムーズにするために
CEDEC2015講演 チーム開発をスムーズにするためにCEDEC2015講演 チーム開発をスムーズにするために
CEDEC2015講演 チーム開発をスムーズにするために
 
Gpuフォトンマッピング手法 h26-09-kgussan-第2回レイトレ合宿
Gpuフォトンマッピング手法 h26-09-kgussan-第2回レイトレ合宿Gpuフォトンマッピング手法 h26-09-kgussan-第2回レイトレ合宿
Gpuフォトンマッピング手法 h26-09-kgussan-第2回レイトレ合宿
 
Alhazen 2016
Alhazen 2016Alhazen 2016
Alhazen 2016
 
Introduction to Monte Carlo Ray Tracing (CEDEC 2013)
Introduction to Monte Carlo Ray Tracing (CEDEC 2013)Introduction to Monte Carlo Ray Tracing (CEDEC 2013)
Introduction to Monte Carlo Ray Tracing (CEDEC 2013)
 
物理ベースレンダラedupt解説
物理ベースレンダラedupt解説物理ベースレンダラedupt解説
物理ベースレンダラedupt解説
 
フォトンマッピング入門
フォトンマッピング入門フォトンマッピング入門
フォトンマッピング入門
 

Plus de Takahiro Harada

201907 Radeon ProRender2.0@Siggraph2019
201907 Radeon ProRender2.0@Siggraph2019201907 Radeon ProRender2.0@Siggraph2019
201907 Radeon ProRender2.0@Siggraph2019Takahiro Harada
 
[2018 GDC] Real-Time Ray-Tracing Techniques for Integration into Existing Ren...
[2018 GDC] Real-Time Ray-Tracing Techniques for Integration into Existing Ren...[2018 GDC] Real-Time Ray-Tracing Techniques for Integration into Existing Ren...
[2018 GDC] Real-Time Ray-Tracing Techniques for Integration into Existing Ren...Takahiro Harada
 
Introduction to OpenCL (Japanese, OpenCLの基礎)
Introduction to OpenCL (Japanese, OpenCLの基礎)Introduction to OpenCL (Japanese, OpenCLの基礎)
Introduction to OpenCL (Japanese, OpenCLの基礎)Takahiro Harada
 
[2017 GDC] Radeon ProRender and Radeon Rays in a Gaming Rendering Workflow
[2017 GDC] Radeon ProRender and Radeon Rays in a Gaming Rendering Workflow[2017 GDC] Radeon ProRender and Radeon Rays in a Gaming Rendering Workflow
[2017 GDC] Radeon ProRender and Radeon Rays in a Gaming Rendering WorkflowTakahiro Harada
 
確率的ライトカリング 理論と実装 (CEDEC2016)
確率的ライトカリング 理論と実装 (CEDEC2016)確率的ライトカリング 理論と実装 (CEDEC2016)
確率的ライトカリング 理論と実装 (CEDEC2016)Takahiro Harada
 
Introducing Firerender for 3DS Max
Introducing Firerender for 3DS MaxIntroducing Firerender for 3DS Max
Introducing Firerender for 3DS MaxTakahiro Harada
 
[2016 GDC] Multiplatform GPU Ray-Tracing Solutions With FireRender and FireRays
[2016 GDC] Multiplatform GPU Ray-Tracing Solutions With FireRender and FireRays[2016 GDC] Multiplatform GPU Ray-Tracing Solutions With FireRender and FireRays
[2016 GDC] Multiplatform GPU Ray-Tracing Solutions With FireRender and FireRaysTakahiro Harada
 
Introduction to Bidirectional Path Tracing (BDPT) & Implementation using Open...
Introduction to Bidirectional Path Tracing (BDPT) & Implementation using Open...Introduction to Bidirectional Path Tracing (BDPT) & Implementation using Open...
Introduction to Bidirectional Path Tracing (BDPT) & Implementation using Open...Takahiro Harada
 
Foveated Ray Tracing for VR on Multiple GPUs
Foveated Ray Tracing for VR on Multiple GPUsFoveated Ray Tracing for VR on Multiple GPUs
Foveated Ray Tracing for VR on Multiple GPUsTakahiro Harada
 
Physics Tutorial, GPU Physics (GDC2010)
Physics Tutorial, GPU Physics (GDC2010)Physics Tutorial, GPU Physics (GDC2010)
Physics Tutorial, GPU Physics (GDC2010)Takahiro Harada
 
A 2.5D Culling for Forward+ (SIGGRAPH ASIA 2012)
A 2.5D Culling for Forward+ (SIGGRAPH ASIA 2012)A 2.5D Culling for Forward+ (SIGGRAPH ASIA 2012)
A 2.5D Culling for Forward+ (SIGGRAPH ASIA 2012)Takahiro Harada
 
Using GPUs for Collision detection, Recent Advances in Real-Time Collision an...
Using GPUs for Collision detection, Recent Advances in Real-Time Collision an...Using GPUs for Collision detection, Recent Advances in Real-Time Collision an...
Using GPUs for Collision detection, Recent Advances in Real-Time Collision an...Takahiro Harada
 
Heterogeneous Particle based Simulation (SIGGRAPH ASIA 2011)
Heterogeneous Particle based Simulation (SIGGRAPH ASIA 2011)Heterogeneous Particle based Simulation (SIGGRAPH ASIA 2011)
Heterogeneous Particle based Simulation (SIGGRAPH ASIA 2011)Takahiro Harada
 
A Parallel Constraint Solver for a Rigid Body Simulation (SIGGRAPH ASIA 2011)
A Parallel Constraint Solver for a Rigid Body Simulation (SIGGRAPH ASIA 2011)A Parallel Constraint Solver for a Rigid Body Simulation (SIGGRAPH ASIA 2011)
A Parallel Constraint Solver for a Rigid Body Simulation (SIGGRAPH ASIA 2011)Takahiro Harada
 
Forward+ (EUROGRAPHICS 2012)
Forward+ (EUROGRAPHICS 2012)Forward+ (EUROGRAPHICS 2012)
Forward+ (EUROGRAPHICS 2012)Takahiro Harada
 

Plus de Takahiro Harada (15)

201907 Radeon ProRender2.0@Siggraph2019
201907 Radeon ProRender2.0@Siggraph2019201907 Radeon ProRender2.0@Siggraph2019
201907 Radeon ProRender2.0@Siggraph2019
 
[2018 GDC] Real-Time Ray-Tracing Techniques for Integration into Existing Ren...
[2018 GDC] Real-Time Ray-Tracing Techniques for Integration into Existing Ren...[2018 GDC] Real-Time Ray-Tracing Techniques for Integration into Existing Ren...
[2018 GDC] Real-Time Ray-Tracing Techniques for Integration into Existing Ren...
 
Introduction to OpenCL (Japanese, OpenCLの基礎)
Introduction to OpenCL (Japanese, OpenCLの基礎)Introduction to OpenCL (Japanese, OpenCLの基礎)
Introduction to OpenCL (Japanese, OpenCLの基礎)
 
[2017 GDC] Radeon ProRender and Radeon Rays in a Gaming Rendering Workflow
[2017 GDC] Radeon ProRender and Radeon Rays in a Gaming Rendering Workflow[2017 GDC] Radeon ProRender and Radeon Rays in a Gaming Rendering Workflow
[2017 GDC] Radeon ProRender and Radeon Rays in a Gaming Rendering Workflow
 
確率的ライトカリング 理論と実装 (CEDEC2016)
確率的ライトカリング 理論と実装 (CEDEC2016)確率的ライトカリング 理論と実装 (CEDEC2016)
確率的ライトカリング 理論と実装 (CEDEC2016)
 
Introducing Firerender for 3DS Max
Introducing Firerender for 3DS MaxIntroducing Firerender for 3DS Max
Introducing Firerender for 3DS Max
 
[2016 GDC] Multiplatform GPU Ray-Tracing Solutions With FireRender and FireRays
[2016 GDC] Multiplatform GPU Ray-Tracing Solutions With FireRender and FireRays[2016 GDC] Multiplatform GPU Ray-Tracing Solutions With FireRender and FireRays
[2016 GDC] Multiplatform GPU Ray-Tracing Solutions With FireRender and FireRays
 
Introduction to Bidirectional Path Tracing (BDPT) & Implementation using Open...
Introduction to Bidirectional Path Tracing (BDPT) & Implementation using Open...Introduction to Bidirectional Path Tracing (BDPT) & Implementation using Open...
Introduction to Bidirectional Path Tracing (BDPT) & Implementation using Open...
 
Foveated Ray Tracing for VR on Multiple GPUs
Foveated Ray Tracing for VR on Multiple GPUsFoveated Ray Tracing for VR on Multiple GPUs
Foveated Ray Tracing for VR on Multiple GPUs
 
Physics Tutorial, GPU Physics (GDC2010)
Physics Tutorial, GPU Physics (GDC2010)Physics Tutorial, GPU Physics (GDC2010)
Physics Tutorial, GPU Physics (GDC2010)
 
A 2.5D Culling for Forward+ (SIGGRAPH ASIA 2012)
A 2.5D Culling for Forward+ (SIGGRAPH ASIA 2012)A 2.5D Culling for Forward+ (SIGGRAPH ASIA 2012)
A 2.5D Culling for Forward+ (SIGGRAPH ASIA 2012)
 
Using GPUs for Collision detection, Recent Advances in Real-Time Collision an...
Using GPUs for Collision detection, Recent Advances in Real-Time Collision an...Using GPUs for Collision detection, Recent Advances in Real-Time Collision an...
Using GPUs for Collision detection, Recent Advances in Real-Time Collision an...
 
Heterogeneous Particle based Simulation (SIGGRAPH ASIA 2011)
Heterogeneous Particle based Simulation (SIGGRAPH ASIA 2011)Heterogeneous Particle based Simulation (SIGGRAPH ASIA 2011)
Heterogeneous Particle based Simulation (SIGGRAPH ASIA 2011)
 
A Parallel Constraint Solver for a Rigid Body Simulation (SIGGRAPH ASIA 2011)
A Parallel Constraint Solver for a Rigid Body Simulation (SIGGRAPH ASIA 2011)A Parallel Constraint Solver for a Rigid Body Simulation (SIGGRAPH ASIA 2011)
A Parallel Constraint Solver for a Rigid Body Simulation (SIGGRAPH ASIA 2011)
 
Forward+ (EUROGRAPHICS 2012)
Forward+ (EUROGRAPHICS 2012)Forward+ (EUROGRAPHICS 2012)
Forward+ (EUROGRAPHICS 2012)
 

Dernier

Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1DianaGray10
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioChristian Posta
 
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAAnypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAshyamraj55
 
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDEADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDELiveplex
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdfPedro Manuel
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024SkyPlanner
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfJamie (Taka) Wang
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding TeamAdam Moalla
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxGDSC PJATK
 
100+ ChatGPT Prompts for SEO Optimization
100+ ChatGPT Prompts for SEO Optimization100+ ChatGPT Prompts for SEO Optimization
100+ ChatGPT Prompts for SEO Optimizationarrow10202532yuvraj
 
Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsSeth Reyes
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureEric D. Schabell
 
IEEE Computer Society’s Strategic Activities and Products including SWEBOK Guide
IEEE Computer Society’s Strategic Activities and Products including SWEBOK GuideIEEE Computer Society’s Strategic Activities and Products including SWEBOK Guide
IEEE Computer Society’s Strategic Activities and Products including SWEBOK GuideHironori Washizaki
 
99.99% of Your Traces Are (Probably) Trash (SRECon NA 2024).pdf
99.99% of Your Traces  Are (Probably) Trash (SRECon NA 2024).pdf99.99% of Your Traces  Are (Probably) Trash (SRECon NA 2024).pdf
99.99% of Your Traces Are (Probably) Trash (SRECon NA 2024).pdfPaige Cruz
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemAsko Soukka
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024D Cloud Solutions
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationIES VE
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7DianaGray10
 
UiPath Clipboard AI: "A TIME Magazine Best Invention of 2023 Unveiled"
UiPath Clipboard AI: "A TIME Magazine Best Invention of 2023 Unveiled"UiPath Clipboard AI: "A TIME Magazine Best Invention of 2023 Unveiled"
UiPath Clipboard AI: "A TIME Magazine Best Invention of 2023 Unveiled"DianaGray10
 

Dernier (20)

Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and Istio
 
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAAnypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
 
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDEADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdf
 
Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024
 
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
activity_diagram_combine_v4_20190827.pdfactivity_diagram_combine_v4_20190827.pdf
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptx
 
100+ ChatGPT Prompts for SEO Optimization
100+ ChatGPT Prompts for SEO Optimization100+ ChatGPT Prompts for SEO Optimization
100+ ChatGPT Prompts for SEO Optimization
 
Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and Hazards
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability Adventure
 
IEEE Computer Society’s Strategic Activities and Products including SWEBOK Guide
IEEE Computer Society’s Strategic Activities and Products including SWEBOK GuideIEEE Computer Society’s Strategic Activities and Products including SWEBOK Guide
IEEE Computer Society’s Strategic Activities and Products including SWEBOK Guide
 
99.99% of Your Traces Are (Probably) Trash (SRECon NA 2024).pdf
99.99% of Your Traces  Are (Probably) Trash (SRECon NA 2024).pdf99.99% of Your Traces  Are (Probably) Trash (SRECon NA 2024).pdf
99.99% of Your Traces Are (Probably) Trash (SRECon NA 2024).pdf
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystem
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7
 
20230104 - machine vision
20230104 - machine vision20230104 - machine vision
20230104 - machine vision
 
UiPath Clipboard AI: "A TIME Magazine Best Invention of 2023 Unveiled"
UiPath Clipboard AI: "A TIME Magazine Best Invention of 2023 Unveiled"UiPath Clipboard AI: "A TIME Magazine Best Invention of 2023 Unveiled"
UiPath Clipboard AI: "A TIME Magazine Best Invention of 2023 Unveiled"
 

Introduction to Bidirectional Path Tracing (BDPT) & Implementation using OpenCL (CEDEC 2015)

  • 1. INTRODUCTION  TO  BIDIRECTIONAL  PATH  TRACING     &  ITS  IMPLEMENTATION  USING  OPENCL     双方向パストレーシング(BDPT)の基礎からOPENCLによる実装まで   TAKAHIRO  HARADA          (AMD)   SHO  IKEDA  (RICOH)   SYOYO  FUJITA            (LTE)  
  • 2. 2   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   OVERVIEW  OF  THIS  TALK   y  IntroducJon  (Harada,  20min  -­‐  25min)   ‒ Start  with  path  tracing  review   ‒ Transforming  path  tracing  to  bidirecJonal  path  tracing   y  BidirecJonal  Path  Tracing  (Ikeda,  20min  -­‐  25min)   ‒ Classic  BDPT   ‒ Instant  BDPT   ‒ Lvc  BDPT   y  IntegraJon  of  BidirecJonal  Path  Tracing  to  the  Engine  (Harada,  5min)   y  Examples  (Harada,  5min)  
  • 3. 3   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   PATH  TRACING  (MONTE  CARLO  RAY  TRACING)   y  !=  Raster  graphics  (game)   y  BeauJful  rendering   y  Global  illuminaJon  
  • 4. 4   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   PATH  TRACING  (MONTE  CARLO  RAY  TRACING)   y  ComputaJonally  expensive   ‒ Take  Jme  to  converge   ‒ Noisy  at  first,  gebng  cleaner  later   y  Make  1  step  rendering  faster   ‒ Total  Jme  decreases   ‒ OpJmizaJon  (using  more  CPU  cores,  GPUs)   ‒  OpenCL  (my  talk@CEDEC2014)   y  Make  1  step  less  noisy   ‒ Need  less  steps   ‒ Beeer  sampling  techniques   ‒ Clever  algorithm   ‒  BDPT  (this  talk)  
  • 5. PATH  TRACING   IMPORTANCE  SAMPLING   MULTIPLE  IMPORTANCE  SAMPLING  
  • 6. 6   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   FIRST  PATH  TRACING  
  • 7. 7   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   PATH  TRACING  IMPLEMENTATION  #1   for(int i=0; i<nx; i++) for(int j=0; j<ny; j++)! {! Ray ray = genPrimaryRay( i, j );! ! float4 coeff = 1.f;! float4& output = pixel[i,j];! for(int depth=0; depth<maxDepth; depth++)! {! Hit hit = intersect( ray );! if( !hit.hasHit() ) break;! ! if( hit.isEmissive() )! {// Implicit Connection! output += coeff * getEmission( hit );! break;! }! ! ray, f, pdf = randomSample( hit );! coeff *= f * dot( hit.m_n, ray.m_dir ) / pdf;! }! }!  
  • 8. 8   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   SAMPLING  NEXT  RAY   y  For  non  transmission  surface,  no  need  to   sample  the  other  side   RANDOM  SAMPLING   for(int i=0; i<nx; i++) for(int j=0; j<ny; j++)! {! Ray ray = genPrimaryRay( i, j );! ! float4 coeff = 1.f;! float4& output = pixel[i,j];! for(int depth=0; depth<maxDepth; depth++)! {! Hit hit = intersect( ray );! if( !hit.hasHit() ) break;! ! if( hit.isEmissive() )! {// Implicit Connection! output += coeff * getEmission( hit );! break;! }! ! ray, f, pdf = randomSample( hit );! coeff *= f * dot( hit.m_n, ray.m_dir ) / pdf;! }! }!  
  • 9. 9   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   SAMPLING  NEXT  RAY   y  Random  sampling  is  not  always  efficient   ‒ Diffuse  surface  =>  OK   ‒ Glossy  surface  =>  Hmm  L   ‒ Specular  surface  =>  Bad  L   y  We  usually  know  the  reflecJon  characterisJcs  about  surface   ‒ Why  not  use  them?   ‒ “Importance  sampling”  (BRDF)   RANDOM  SAMPLING    
  • 10. 10   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   IMPORTANCE  SAMPLING  (BRDF)   y  Specular  surface   ‒ Only  reflect  in  the  mirrored  direcJon   ‒ Always  sample  the  direcJon  (pdf  =  1)   y  Glossy  surface   ‒ Mostly  reflect  around  mirrored  direcJon   ‒ Sample  around  the  mirrored  direcJon   Specular  (R)   Glossy   Mae  Specular  (T)  
  • 11. 11   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   PATH  TRACING  IMPLEMENTATION  #2   for(int i=0; i<nx; i++) for(int j=0; j<ny; j++)! {! Ray ray = genPrimaryRay( i, j );! ! float4 coeff = 1.f;! float4& output = pixel[i,j];! for(int depth=0; depth<maxDepth; depth++)! {! Hit hit = intersect( ray );! if( !hit.hasHit() ) break;! ! if( hit.isEmissive() )! {// Implicit Connection! output += coeff * getEmission( hit );! break;! }! ! ray, f, pdf = randomSample( hit );! coeff *= f * dot( hit.m_n, ray.m_dir ) / pdf;! }! }!   for(int i=0; i<nx; i++) for(int j=0; j<ny; j++)! {! Ray ray = genPrimaryRay( i, j );! ! float4 coeff = 1.f;! float4& output = pixel[i,j];! for(int depth=0; depth<maxDepth; depth++)! {! Hit hit = intersect( ray );! if( !hit.hasHit() ) break;! ! if( hit.isEmissive() )! {// Implicit Connection! output += coeff * getEmission( hit );! break;! }! ! ray, f, pdf = brdfSample( hit );! coeff *= f * dot( hit.m_n, ray.m_dir ) / pdf;! }! }!   Random  Sampling   Brdf  Importance  Sampling  
  • 12. 12   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   PATH  TRACING  IMPLEMENTATION  #2   for(int i=0; i<nx; i++) for(int j=0; j<ny; j++)! {! Ray ray = genPrimaryRay( i, j );! ! float4 coeff = 1.f;! float4& output = pixel[i,j];! for(int depth=0; depth<maxDepth; depth++)! {! Hit hit = intersect( ray );! if( !hit.hasHit() ) break;! ! if( hit.isEmissive() )! {// Implicit Connection! output += coeff * getEmission( hit );! break;! }! ! ray, f, pdf = randomSample( hit );! coeff *= f * dot( hit.m_n, ray.m_dir ) / pdf;! }! }!   for(int i=0; i<nx; i++) for(int j=0; j<ny; j++)! {! Ray ray = genPrimaryRay( i, j );! ! float4 coeff = 1.f;! float4& output = pixel[i,j];! for(int depth=0; depth<maxDepth; depth++)! {! Hit hit = intersect( ray );! if( !hit.hasHit() ) break;! ! if( hit.isEmissive() )! {// Implicit Connection! output += coeff * getEmission( hit );! break;! }! ! ray, f, pdf = brdfSample( hit );! coeff *= f * dot( hit.m_n, ray.m_dir ) / pdf;! }! }!   Random  Sampling   Brdf  Importance  Sampling  
  • 13. 13   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   INEFFICIENT  CASE   y  Rough  surface  +  Small  light   y  Brdf  sampling  rarely  hits  the  light   y  SoluJon   ‒ We  know  where  the  lights  are   ‒ Why  ignoring??   ‒ Generate  ray  from  lights   ‒ “Importance  sampling”  (Light)   Rough   Reference  Brdf  sampling  
  • 14. 14   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   INEFFICIENT  CASE   y  Rough  surface  +  Small  light   y  Brdf  sampling  rarely  hits  the  light   y  SoluJon   ‒ We  know  where  the  lights  are   ‒ Why  ignoring??   ‒ Generate  ray  from  lights   ‒ “Importance  sampling”  (Light)   Rough   Reference  Brdf  sampling  Light  sampling  
  • 15. 15   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   PATH  TRACING  IMPLEMENTATION  #3   for(int i=0; i<nx; i++) for(int j=0; j<ny; j++)! {! Ray ray = genPrimaryRay( i, j );! ! float4 coeff = 1.f;! float4& output = pixel[i,j];! for(int depth=0; depth<maxDepth; depth++)! {! Hit hit = intersect( ray );! if( !hit.hasHit() ) break;! ! if( hit.isEmissive() )! {// Implicit Connection! output += coeff * getEmission( hit );! break;! }! ! ray, f, pdf = brdfSample( hit );! coeff *= f * dot( hit.m_n, ray.m_dir ) / pdf;! }! }!   for(int i=0; i<nx; i++) for(int j=0; j<ny; j++)! {! Ray ray = genPrimaryRay( i, j );! ! float4 coeff = 1.f;! float4& output = pixel[i,j];! for(int depth=0; depth<maxDepth; depth++)! {! Hit hit = intersect( ray );! if( !hit.hasHit() ) break;! {// Explicit Connection! ray, pdf = lightSample( hit );! Hit hit1 = intersect( ray );! if( !hit1.hasHit() )! {! output+=coeff*getEmission( hit1 )/pdf;! }! }! ray, f, pdf = brdfSample( hit );! coeff *= f * dot( hit.m_n, ray.m_dir ) / pdf;! }! }!   Brdf  Importance  Sampling   Light  Importance  Sampling  
  • 16. 16   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   IMPLICIT  CONNECTION,  EXPLICIT  CONNECTION   y  Implicit  ConnecJon   ‒ A  ray  accidentally  hit  a  light  source   ‒  Ater  primary  rays  are  generated  from  camera   ‒  Ater  bounced  rays  are  sampled  from  BRDF   y  Explicit  ConnecJon   ‒ A  path  is  intenJonally  connected  to  a  light  source   ‒  Direct  illuminaJon  (sample  a  vertex  on  a  light  source)   Camera Light Object Camera Light Object
  • 17. 17   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   PATH  TRACING  IMPLEMENTATION  #3   y  We  should  not  accumulaJng  implicit  hits  for  this  implementaBon   y  Even  if  a  ray  hits  an  emissive  surface,  we  ignore  it   y  Sounds  like  we  are  wasJng  something   NOTE  
  • 18. 18   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   BRDF  SAMPLING  +  LIGHT  SAMPLING   y  Both  generate  image   ‒ Each  technique  has  strong  &  weak  points   ‒ Converges  to  the  same  image  at  the  end   Brdf  sampling  (16spp)   Light  sampling  (16spp)   Brdf  sampling  (inf. spp)   Light  sampling  (inf. spp)   =  
  • 19. 19   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   PATH  TRACING  IMPLEMENTATION  #3   y  We  should  not  accumulaJng  implicit  hits  for  this  implementaBon   y  Even  if  a  ray  hits  an  emissive  surface,  we  ignore  it   y  Sounds  like  we  are  wasJng  something   y  Can  we  use  it  somehow?   NOTE  
  • 20. 20   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   BRDF  SAMPLING  +  LIGHT  SAMPLING   y  Then  simply…  Take  an  average?   ‒ Works   ‒  but  not  the  best   y  We  can  set  any  coefficients  if  they  sum  up  to  1.0   ‒ brdfSampledImage  *  0.2  +  lightSampledImage  *  0.8  ?   ‒ brdfSampledImage  *  0.8  +  lightSampledImage  *  0.2  ?   ‒ Hmm…   x  0.5  +     x  0.5     Brdf  sample   Light  sample   x  0.2  +     x  0.8     Brdf  sample   Light  sample  
  • 21. 21   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   J  L   COMPARING  BRDF  SAMPLING  AND  LIGHT  SAMPLING   y  Light  sampling   ‒ Good  for  rough  surface   ‒ Bad  for  sharp  surface   y  Brdf  sampling   ‒ Bad  for  rough  surface   ‒ Good  for  sharp  surface   L  J  
  • 22. 22   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   BRDF  SAMPLING  +  LIGHT  SAMPLING   y  Then  simply…  Take  an  average?   ‒ Works   ‒  but  not  the  best   y  We  can  set  any  coefficients  if  they  sum  up  to  1.0   ‒ brdfSampledImage  *  0.2  +  lightSampledImage  *  0.8  ?   ‒ brdfSampledImage  *  0.8  +  lightSampledImage  *  0.2  ?   ‒ Hmm   y  We  do  not  have  to  se  the  same  coefficients  for  all  the  pixels  J   ‒ “MulJple  importance  sampling”   ‒ Per  pixel  weight   x  0.5  +     x  0.5     Brdf  sample   Light  sample   x  0.2  +     x  0.8     Brdf  sample   Light  sample   x   +   x   =   Brdf  sample   Light  sample  w_b   w_l   MIS  
  • 23. 23   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   BRDF  SAMPLING  +  LIGHT  SAMPLING   y  Uniform  weighJng  (Average)   y  Per  pixel  weighJng  (MulJple  Importance  Sampling,  MIS)   VISUALIZATION  OF  MIS   x   +   x   =   Brdf  sample   Light  sample  w_b   w_l   MIS   +   =  1.0   w_b   w_l   x   +   x   =   Brdf  sample   Light  sample  w_b   w_l   Average   0.5   0.5   0.5   0.5  +   =  1.0   w_b   w_l  
  • 24. 24   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   MULTIPLE  IMPORTANCE  SAMPLING   y  Light  sampling   y  Brdf  sampling   0.1  0.9   0.9  0.1   0.5   0.5  
  • 25. 25   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   MULTIPLE  IMPORTANCE  SAMPLING  WEIGHT   y  Detailed  look  at  brdf  &  light  sampling  (direct  illuminaJon)   y  Possible  to  sample  the  same  direcJon  using  both  sampling  technique   ‒ Only  difference  is  the  PDF  (probability  density  funcJon)   y  Rough  surface   ‒ PDF  of  Brdf  sampling  is  almost  uniform   ‒  Low  confidence  in  the  sample  =>  Higher  noise   ‒ PDF  of  light  sampling  has  a  strong  spike  at  light  direcJon   ‒  High  confidence  in  the  sample    =>  Lower  noise   Brdf  Sampling   Light  Sampling  
  • 26. 26   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   MULTIPLE  IMPORTANCE  SAMPLING  WEIGHT   y  Detailed  look  at  brdf  &  light  sampling  (direct  illuminaJon)   y  Possible  to  sample  the  same  direcJon  using  both  sampling  technique   ‒ Only  difference  is  the  PDF  (probability  density  funcJon)   y  Sharp  surface   ‒ PDF  of  Brdf  sampling  is  almost  uniform   ‒  Very  high  confidence  in  the  sample  =>  Lower  noise   ‒ PDF  of  light  sampling  has  a  strong  spike  at  light  direcJon   ‒  RelaJvely  lower  confidence  in  the  sample    =>  Higher  noise   Brdf  Sampling   Light  Sampling  
  • 27. 27   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   MULTIPLE  IMPORTANCE  SAMPLING  WEIGHT   y  Use  sampling  PDF  to  compute  weight   y  Weight  for  light  sample  (Explicit  hit)           y  Weight  for  brdf  sample  (Implicit  hit)     y  This  is  very  important  for  an  efficient  BDPT  
  • 28. 28   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   PATH  TRACING  IMPLEMENTATION  #4  (FINAL)   for(int i=0; i<nx; i++) for(int j=0; j<ny; j++)! {! Ray ray = genPrimaryRay( i, j );! ! float4 coeff = 1.f;! float4& output = pixel[i,j];! float pdfb = 0.f;! for(int depth=0; depth<maxDepth; depth++)! {! Hit hit = intersect( ray );! if( !hit.hasHit() ) break;! if( hit.isEmissive() )! {// Implicit Connection! pdfl = lightPdf( hit );! w = pdfb / (pdfb + pdfl);! output += coeff * getEmission( hit ) * w;! break;! }! {// Explicit Connection! ray, pdfl = lightSample( hit );! Hit hit1 = intersect( ray );! if( !hit1.hasHit() )! {! w = pdfl / (pdfb + pdfl);! output += coeff * getEmission( hit1 ) * w / pdfl;! }! }! ray, f, pdfb = brdfSample( hit );! coeff *= f * dot( hit.m_n, nextRay.m_dir ) / pdfb;! }! }!  
  • 30. 30   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   OUTDOOR  
  • 31. 31   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   INDOOR/OUTDOOR  
  • 32. 32   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   INDOOR  
  • 33. 33   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   PATH  TRACING  IS  NOT  PERFECT   y  Path  tracing  is  really  good  at  an out  door  scene   y  But  not  for  a  scene  mostly  lit  by  indirect  illuminaJon  (indoor,  day  Jme)  
  • 34. 34   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   PATH  TRACING  IS  NOT  PERFECT   64  spp   256  spp   1024  spp   x  4   x  4  Indoor  Indoor/outdoor  Outdoor   Good   Ok   Bad   Path  Tracing  is..  
  • 35. 35   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   BAD  CONVERGENCE  FOR  INDOOR  SCENE   y  Ray  needs  to  be  bounced  more  than  once   before  connecJng  to  the  light  source   y  As  we  bounce,  we  get  less  &  less  confident   about  the  path   ‒ Lower  probability  =>  More  noise  
  • 36. 36   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   LIGHT  TRACING   y  If  traced  from  the  light,  it  is  beeer  (more  confident)   y  Path  Tracing   y  Light  Tracing   Camera Light Object Camera Light Object Path  Tracing   BDPT  
  • 37. 37   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   PATH  TRACING  +  1  LIGHT  PATH   y  Can  we  mix  path  tracing  &  light  tracing   ‒ Trace  1  light  path   ‒ Connect  to  camera  path   Camera Light Object
  • 38. 38   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   PATH  TRACING  +  1  LIGHT  PATH   y  Can  we  mix  path  tracing  &  light  tracing   ‒ Trace  1  light  path   ‒ Connect  to  camera  path   y  Improves  some  situaJons  (not  all)   ‒ Example.  A  room  is  lit  by  bounced  light   y  Can  we  trace  more  than  1  light  path,  and  combine?   ‒ =>  BidirecJonal  Path  Tracing   Camera Light Object Path  Tracing   Path  Trace  +  1  light  path   64  spp  
  • 40. Bi-Directional Path Tracing (BDPT) Camera path Light path Connection Camera Light Object •  BDPT traces paths from the camera and the light source
 •  BDPT combines various path sampling strategies
  • 41. Bi-Directional Path Tracing (BDPT) Camera path Light path Connection Camera Light Object •  BDPT traces paths from the camera and the light source
 •  BDPT combines various path sampling strategies
  • 42. Bi-Directional Path Tracing (BDPT) Camera path Light path Connection Camera Light Object •  BDPT traces paths from the camera and the light source
 •  BDPT combines various path sampling strategies
  • 43. Bi-Directional Path Tracing (BDPT) Camera path Light path Connection Camera Light Object •  BDPT traces paths from the camera and the light source
 •  BDPT combines various path sampling strategies
  • 44. BDPT I = w0 w1 + + … wk · · · x0 xk •  The contributions of the sampling strategies are weighted
  • 45. BDPT + Multiple Importance Sampling (MIS) Xs = x0, · · · xs + xs+1, · · · xk x0 xk xs xs+1 •  MIS weight computation ws(X) = ps(X) Pk i=0 pi(X)
  • 46. x0 xk xs xs+1 Xs = x0, · · · xs + xs+1, · · · xk ps(X) = !p 0 · !p 1 · · · !p s · p s+1 · · · p k 1 · p k BDPT + Multiple Importance Sampling (MIS) (2 The product of the pdfs of the path sampling
  • 47. The problem of BDPT on GPU implementation 0 1 2 3Global Memory 0 1 2 •  BDPT stores all the vertices on the camera and light paths
 •  The global memory consumption is high
  • 48. 0 1 2 3Global Memory 0 1 2 •  BDPT stores all the vertices on the camera and light paths
 •  The global memory consumption is high The problem of BDPT on GPU implementation
  • 49. 0 1 2 3Global Memory 0 1 2 •  BDPT stores all the vertices on the camera and light paths
 •  The global memory consumption is high The problem of BDPT on GPU implementation
  • 50. 0 1 2 3Global Memory 0 1 2 •  BDPT stores all the vertices on the camera and light paths
 •  The global memory consumption is high The problem of BDPT on GPU implementation
  • 51. p  Instant BDPT
 p  Lvc BDPT BDPT algorithm with low memory consumption
  • 52. Instant BDPT Implicit view ( ) path Explicit view ( ) path Implicit light ( ) path Explicit light ( ) path VI VE LE LI •  Path sampling strategies are limited to 4 (PT and LT)
 •  Low memory consumption
 •  If the camera has no collision detection, 3 sampling strategies
  • 53. Instant BDPT + MIS Explicit view ( ) path VE wVE (X) = pVE (X) pVE (X) + pVI (X) + pLE (X) 1 wVE (X) = 1 + pVI (X) pVE (X) + pLE (X) pVE (X)
  • 54. Instant BDPT + MIS (2 1 wVE (X) = 1 + pVI (X) pVE (X) + pLE (X) pVE (X) pVI (X) pVE (X) = !p k 1 p k+1 !p k 1 p k+1
  • 55. Instant BDPT + MIS (3 1 wVE (X) = 1 + pVI (X) pVE (X) + pLE (X) pVE (X) x0 xk s0 = 1 P(x 1 ! x0 ! x1) pLE (X) pVE (X) = s0s1 · · · sk x1
  • 56. Instant BDPT + MIS (3 1 wVE (X) = 1 + pVI (X) pVE (X) + pLE (X) pVE (X) x0 xk s1 = 1 P(x0 ! x1 ! x2)G(x0 $ x1) pLE (X) pVE (X) = s0s1 · · · sk x1
  • 57. Instant BDPT + MIS (3 1 wVE (X) = 1 + pVI (X) pVE (X) + pLE (X) pVE (X) x0 xk pLE (X) pVE (X) = s0s1 · · · sk sk = P(xk 1 xk xk+1)G(xk 1 $ xk) x1
  • 58. Instant BDPT OpenCL implementation
  • 59. Instant BDPT : Bad case1 x0 xk
  • 60. x0 xk Instant BDPT : Bad case1
  • 61. x0 xk Instant BDPT : Bad case1
  • 62. x0 xk Instant BDPT : Bad case1
  • 67. p  Instant BDPT
 p  Lvc BDPT BDPT algorithm with low memory consumption
  • 68. Lvc BDPT light vertex cache 0 1 2 3Light Vertex Cache •  Light vertex cache •  Recursive MIS
  • 69. Lvc BDPT light vertex cache 0 1 2 3Light Vertex Cache •  Light vertex cache •  Recursive MIS
  • 70. Lvc BDPT light vertex cache 0 1 2 3Light Vertex Cache •  Light vertex cache •  Recursive MIS
  • 71. Lvc BDPT light vertex cache 0 1 2 3Light Vertex Cache •  Light vertex cache •  Recursive MIS
 •  LvcBDPT doesn’t have the global memory for the camera path
  • 72. Recursive MIS x0 xk xs ws(X) = ps(X) Pk i=0 pi(X) 1 ws(X) = Pk i=0 pi(X) ps(X) p s+1 · dE s + 1 + !p s · dL s+1=
  • 73. 1 ws(X) = p s+1 · dE s + 1 + !p s · dL s+1 dE 1 = 1 !p 0 dE s = 1 + p sdE s 1 !p s 1 dL k = 1 p k+1 Recursive MIS x0 xk xs dL s+1 = 1 + !p s+1 · dL s+2 p s+2
  • 74. 1 ws(X) = p s+1 · dE s + 1 + !p s · dL s+1 Lvc BDPT + Recursive MIS x0 xk xs dE 1 = 1 !p 0
  • 75. 1 ws(X) = p s+1 · dE s + 1 + !p s · dL s+1 x0 xk xs dE s = 1 + p sdE s 1 !p s 1 Lvc BDPT + Recursive MIS
  • 76. 1 ws(X) = p s+1 · dE s + 1 + !p s · dL s+1 x0 xk xs dE s = 1 + p sdE s 1 !p s 1 dL k = 1 p k+1 Lvc BDPT + Recursive MIS
  • 77. 1 ws(X) = p s+1 · dE s + 1 + !p s · dL s+1 x0 xk xs dE s = 1 + p sdE s 1 !p s 1 dL k 1 = 1 + !p k 1 · dL k p k Lvc BDPT + Recursive MIS
  • 78. 1 ws(X) = p s+1 · dE s + 1 + !p s · dL s+1 x0 xk xs dE s = 1 + p sdE s 1 !p s 1 dL s+1 = 1 + !p s+1 · dL s+2 p s+2 Lvc BDPT + Recursive MIS
  • 79. Lvc BDPT OpenCL implementation
  • 83. INTEGRATION  TO  THE   ENGINE  
  • 84. 84   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   Back  End   World  GPU  (OCL)   -­‐  Path  Tracing   -­‐  Light  Tracing   -­‐      -­‐      World  CPU   -­‐  Path  Tracing  (OpJmized)   Front  End   ENGINE  ARCHITECTURE  OVERVIEW   Data  Loader   -­‐  Obj   -­‐  Eson   -­‐  Fbx   Data  Manager   -­‐  Texture   -­‐  Material   -­‐  Mesh   Tahoe  API   Texture  Loader   -­‐  Png   -­‐  Hdr   -­‐  OpenExr   -­‐  …   Factory  (CPU)   Camera   -­‐  PerspecJve   -­‐  Parallel   -­‐  Bake   -­‐  VR   Material  System   -­‐  Default   -­‐  Graph   -­‐  OSL   Light  Sampler   -­‐  Uniform   -­‐  Group   -­‐  StochasJc   Factory  (OCL)  
  • 85. 85   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   Back  End   World  GPU  (OCL)   -­‐  Path  Tracing   -­‐  Light  Tracing   -­‐  BidirecJonal  Path  Tracing  (LvcBDPT)   -­‐  BidirecJonal  Path  Tracing  (InstantBDPT)   World  CPU   -­‐  Path  Tracing  (OpJmized)   Front  End   ENGINE  ARCHITECTURE  OVERVIEW   Data  Loader   -­‐  Obj   -­‐  Eson   -­‐  Fbx   Data  Manager   -­‐  Texture   -­‐  Material   -­‐  Mesh   Tahoe  API   Texture  Loader   -­‐  Png   -­‐  Hdr   -­‐  OpenExr   -­‐  …   Factory  (CPU)   Camera   -­‐  PerspecJve   -­‐  Parallel   -­‐  Bake   -­‐  VR   Material  System   -­‐  Default   -­‐  Graph   -­‐  OSL   Light  Sampler   -­‐  Uniform   -­‐  Group   -­‐  StochasJc   Factory  (OCL)  
  • 86. 86   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   PATH  TRACING  CODE   y  Not  employing  a  mega  kernel  implementaJon   y  There  are  many  small  kernels  for  path  tracing   ‒ Easier  to  debug   ‒ Performance   ‒ Extendibility  =>  Key  to  add  BDPT   y  (See  my  slides  @  CEDEC  2014)  
  • 87. 87   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   PATH  TRACING  KERNELS   y  Prepare   ‒ Camera  ray  set  up   y  Loop   ‒ Ray  cast   ‒ Implicit  hit  accumulaJon   ‒ Material  prepare   ‒ Shadow  ray  set  up   ‒ Material  evaluaJon   ‒ Ray  cast   ‒ Explicit  hit  accumulaJon   ‒ Sample  next  ray   Path  Tracing   Each  line  is  one  or  more  OCL  kernels  
  • 88. 88   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   INSTANT  BDPT   y  Prepare   ‒ Set  up  camera  ray   ‒ Sample  light  point   y  Loop   ‒ Ray  cast   ‒ Material  prepare  (sampleBrdf)   ‒ Implicit  connecJon   ‒ Explicit  connecJon  to  light   ‒  Make  shadow  ray   ‒  Ray  cast   ‒  Connect  to  light   ‒ Sample  next  ray   ‒ Update  MIS  weight  term   Trace  Light  Path   Trace  Camera  Path   Orange:  New  kernels  wrieen  for  BDPT   White    :  Using  path  tracing  kernels  
  • 89. 89   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   INSTANT  BDPT   y  Prepare   ‒ Set  up  light  ray   ‒ Sample  lens  point   ‒ Explicit  connecJon  light  to  camera   y  Loop   ‒ Ray  cast   ‒ Material  prepare  (sampleBrdf)   ‒ Explicit  connecJon  to  camera   ‒  Make  shadow  ray   ‒  Ray  cast   ‒  Set  pixel  index   ‒  Connect  to  camera   ‒ Sample  next  ray   ‒ Update  MIS  weight  term   y  Prepare   ‒ Set  up  camera  ray   ‒ Sample  light  point   y  Loop   ‒ Ray  cast   ‒ Material  prepare  (sampleBrdf)   ‒ Implicit  connecJon   ‒ Explicit  connecJon  to  light   ‒  Make  shadow  ray   ‒  Ray  cast   ‒  Connect  to  light   ‒ Sample  next  ray   ‒ Update  MIS  weight  term   Trace  Light  Path   Trace  Camera  Path   Orange:  New  kernels  wrieen  for  BDPT   White    :  Using  path  tracing  kernels  
  • 90. 90   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   LVCBDPT   y  More  complicated  than  Instant  BDPT   y  ImplementaJon  is  not  that  far  from  Instant  BDPT  
  • 92. 92   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   BDPT   PT  
  • 93. 93   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   BDPT   PT  
  • 94. 94   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   BDPT   PT  
  • 95. 95   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   CLOSING   y  References   ‒ AddiJonal  note   ‒  To  be  published  in  CEDEC  library   ‒  Detailed  explanaJon  of  Instant  BDPT,  Lvc  BDPT   ‒ CEDEC  2013   ‒  hep://www.slideshare.net/takahiroharada/introducJon-­‐to-­‐monte-­‐carlo-­‐ray-­‐tracing-­‐cedec2013   ‒ CEDEC  2014   ‒  hep://www.slideshare.net/takahiroharada/introducJon-­‐to-­‐monte-­‐carlo-­‐ray-­‐tracing-­‐opencl-­‐implementaJon-­‐cedec-­‐2014   y  Feedback  is  welcome   ‒ For  next  years  presentaJon  
  • 96. 96   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   NON  SYMMETRIC  BRDF   Without  Fix   With  Fix  
  • 97. 97   |      OPENCL  BDPT    |    AUGUST  28,  2015    |      HARADA,  IKEDA,  FUJITA   NON  SYMMETRIC  BRDF   With  Fix   With  Fix