3
$\begingroup$

Currently I got interested in implementation of Precomputed Radiance Transfer.

I decided that occlusion representation (which is not trivial to compute) would be precomputed as CPU raytracing and stored as vertex buffer in addition to usual vertices. This representation would be stored as SH coefficients because I need to have information about occluded and unoccluded directions (probably 4 so additional vec4 buffer). So these would store only unoccluded directions. I don't know yet how that would behave but using this foreach vertex should make it quite accurate despite being low frequency.

And as for color representation, computing it is quite trivial (transforming image representing skymap scattering and normals into SH set) and I want it to be dynamic so it would be done every frame. These would be 9 coefficients because why not.

So in reconstruction step I would have two sets of coefficients: precomputed occlusion (4 coefficients) and real time color (9 coefficients for RGB so in sum 27 coefficients).

Can I (and how) multiply them (as in the picture below from this paper) so in the result I would get representation with occluded color filtered out?

enter image description here

$\endgroup$
  • $\begingroup$ I am not too sure to understand your question. SH coefficients assuming you rendered them in a pre-pass already encode visibility information (assuming you are talking about the SH coefficients computed at the vertex of your objects, not the SH coefficients of your env map for example). So are you asking how to convolve the SH coeffs from the env map with the SH coeffs from the vertices? $\endgroup$ – user18490 Feb 5 '17 at 10:33
  • $\begingroup$ @user18490 Yeah convolve two sets but nevermind, why would I need that actually, reconstruction and multiplication will work. $\endgroup$ – narthex Feb 5 '17 at 10:49
0
$\begingroup$

I was overthinking it. The usual reconstruction for given direction and then multiplication will work fine probably.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.