According to the RenderMan specs:
P: The surface position
PS: The position being illuminated
In Pixie, in a light source, these two are equal, that is why distance(P,Ps) is returning 0.
Maybe I am not understanding the correct behavior, WhiteRabbit, can you tell me what behavior you were expecting?
Thanks
Okan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2009-09-13
Well according to the RiSpec 3.2 under light shader page 120...
"It computes the amount of light cast along the direction L which arrives at some point in space Ps."
"The geometric parameters described above (P, du, N, etc.) are available in light source shaders; however, they are the parameters of the light emitting surface (e.g., the surface of an area light source)–not the parameters of any primitive being illuminated."
According to the above statements Ps is the point being illuminated and P is the point emitting (light or area light), therefore distance(Ps, P) is the distance between the two. Actually originally I was using length(L) but this does not properly return the distance between the surface and light for solar() in most renderers :(
After a little digging the distance() approach seems to be more common in solar(), or at least it seems to work with 3Delight, Air, and Aqsis (don't have PrMan so can't test it).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
According to the RenderMan specs:
P: The surface position
PS: The position being illuminated
In Pixie, in a light source, these two are equal, that is why distance(P,Ps) is returning 0.
Maybe I am not understanding the correct behavior, WhiteRabbit, can you tell me what behavior you were expecting?
Thanks
Okan
Well according to the RiSpec 3.2 under light shader page 120...
"It computes the amount of light cast along the direction L which arrives at some point in space Ps."
"The geometric parameters described above (P, du, N, etc.) are available in light source shaders; however, they are the parameters of the light emitting surface (e.g., the surface of an area light source)–not the parameters of any primitive being illuminated."
According to the above statements Ps is the point being illuminated and P is the point emitting (light or area light), therefore distance(Ps, P) is the distance between the two. Actually originally I was using length(L) but this does not properly return the distance between the surface and light for solar() in most renderers :(
After a little digging the distance() approach seems to be more common in solar(), or at least it seems to work with 3Delight, Air, and Aqsis (don't have PrMan so can't test it).