Menu

#115 distance() not working in solar()

open
nobody
None
5
2009-09-07
2009-09-07
No

The distance(P,Ps) function does not return valid depths when used in a solar(){} loop in a light shader.

Discussion

  • Anonymous

    Anonymous - 2009-09-10
     
  • Okan Arikan

    Okan Arikan - 2009-09-12

    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

     
  • Anonymous

    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).

     

Log in to post a comment.