Re: [Algorithms] PRT equations confussion.
Brought to you by:
vexxed72
From: Vlad S. <vla...@ho...> - 2005-09-27 08:32:27
|
Hi, first thanks to all who asnwered my questions. I think I understand much better now. Yes, I am doing diffuse PRT. The integral part of the equation (the transfer matrix) is understood and calculated now. I have a recursive formula that calculates Y(s) (based on associated Legendre polynomials). I also have Vp and Hnp(s). The term s is obtained by "shooting" rays (the s in the integral) for points p distributed equaly around the normal. Using these rays and the normal to the point p I can calculate all the terms of the Intergral Int( Yi(s) Vp(s) Hnp(s))ds. The way I calculate the Integral is by doing a sum of discreet sampled values, using a Monte-Carlo like algorithm. Is that correct? Now the results I see are still wrong but in a more satisfacatory way. The "wrong" part comes from the fact that when I do the dot product between the 2set of coefficients (the L' which contains my light environment projection and the Tp, which is the PRT vector for the point p - calculated as I said above) my whole object is lit as if light will only come from above (positive Y - in terms of OpenGL coordinate systems or pozitive Z in terms of spherical coordinate systems). I am not sure what I am doing wrong but when I calculate the dot product between: L' . Int( Yi(s) Vp(s) Hnp(s))ds at runtime nowhere do I have directionality information. IE, for the normal SH Irradiance Environment map technique I reconstruct the light (illumination) values using the normal at the current vertex and the SH coefficients precomputed in advance. But in the equation above nowhere the current normal is empoyed. (the term Hnp(s) is just a cosine factor between the normal and the ray s, not an absolute normal value). Am I missing something? Thanks in advance, Vlad. >From: Aras Pranckevicius <ne...@gm...> >Reply-To: gda...@li... >To: gda...@li... >Subject: Re: [Algorithms] PRT equations confussion. >Date: Fri, 23 Sep 2005 17:24:47 +0200 > > > L is an N x 3 matrix, where N is the order of the SH used and 3 because >we > > have RGB triplets. Components of the L matrix are all the l terms. (is >this > > correct?) > >A assume you're doing diffuse PRT because of what you state above (in >glossy case, there's an extra step in the middle to get transferred >incident radiance). Yes, you're correct, vector L is just lighting >environment projection (the coefficients) onto your (SH) basis. If >lighting is colored, you project RGB separately so you have 3 vectors, >or a matrix of Nx3. > > > But what is the dimensionality of the T matrix? > >It's a vector of size N (again, diffuse case). For each basis >function, there's an element of Int( Yi(s) Vp(s) Hnp(s))ds in the >vector. > > > but what is Y(s)? > > > > Is this a associated Legendre polynomial for the point in the sphere s? >So > > in other words Y(s) is just a value, the value of the Legendre >polynomial on > > the point p on the sphere. > >It's the value of the current (i-th) basis function, evaluated in >direction s. It doesn't have anything to do with the point p. > > >-- >Aras 'NeARAZ' Pranckevicius >http://nesnausk.org/nearaz | http://nearaz.blogspot.com > > >------------------------------------------------------- >SF.Net email is sponsored by: >Tame your development challenges with Apache's Geronimo App Server. >Download it for free - -and be entered to win a 42" plasma tv or your very >own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php >_______________________________________________ >GDAlgorithms-list mailing list >GDA...@li... >https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list >Archives: >http://sourceforge.net/mailarchive/forum.php?forum_ida88 |