shadowpoint	- Point light shader with shadow map capability


Light "shadowpoint" "intensity" n "lightcolor" c "from" p "sfpx" s "sfnx" s "sfpy" s "sfny" s "sfpz" s "sfnz" s "samples" n "width" n


float intensity=1.0
color lightcolor=[1 1 1]
point from=[0 0 0]
string sfpx="", sfnx="", sfpy="", sfny="", sfpz="", sfnz=""
float samples=16, width=1


This is a point light source that can cast shadows in all directions. To do this, you must supply 6 shadow maps sfpx, sfnx, sfpy, sfny, sfpz, and sfnz for the positive and negative x, y, and z directions respectively. This is very similar to the idea of creating an environment map from 6 cube-face images, a process described in The RenderMan Companion in chapter 12. If any of the cube faces are not passed in, the shader will behave as a normal point light in those directions. For best results, the field of view for shadow images should be greater than 90° (95° recommended).

The parameter samples controls the sampling rate for filtering the shadow map, as shown in Table 15.1 of the RenderMan Interface Specification, Version 3.1. Higher values will produce less noisy-looking shadows, but will take significantly longer. You can produce a (very noisy) test shadow very rapidly by setting samples to 1.

The width parameter controls “overfiltering” in the s and t directions, as is also shown in Table 15.1 of the Interface Specification. Higher values will give shadows more blurry edges, which can be used either as an effect or to hide the jagged edges of a low-resolution shadow map.

The intensity of the light varies from 0 (off) to any positive value (usually 1) representing the light at full intensity. The lightcolor parameter is an RGB triple representing the color of light emitted by the source.

The from parameter represents the position of the light source in space.


The pointlight shader in the RenderMan Interface Specification.



Pixar Animation Studios
(510) 752-3000 (voice)   (510) 752-3151 (fax)
Copyright © 1996- Pixar. All rights reserved.
RenderMan® is a registered trademark of Pixar.