From: Marcin Romaszewicz (marcin++at++asmodean.engr.sgi.com)
Date: 11/14/2001 11:33:12
The multipass algorithm in pfLightSource builds up a greyscale lightmap in
the framebuffer. When building this lightmap, the contribution of each
lightsource is additively combined with the rest of the scene. After all
the lighting, we multiply the lightmap by the scene rendered normally
(colors, textures, but no lights). So, anything black in your scene will
multiply the lightmap by 0 and it does not get illuminated. This is
correct behavior for diffuse lighting - a black object will not reflect
any light. There isn't any way to light black objects with projective
pfLightSources.
For headlights, which do not move with respect to the eye, you could just
create a texture that contains your desired headlight shape and in the
draw callback, add it to the scene. The faster approach is to blend a
texture containing the light lobe shape on top of the scene after
rendering. The nicer approach is to project a texture onto the scene. In
either case, you only need two passes. This approach will light black
objects, but "adding" light to a scene does not look very realistic unless
the light does not contribute much.
-- Marcin
On Tue, 13 Nov 2001, Devrim Erdem wrote:
> Hi,
>
> I have an headlight simulated using pfLightSource in projtex mode. I use
> a headlight texture which is a greyscale image containing the light
> projection map. When enabled certain parts of the scene are darken'ed
> and some parts are lighten'ed. So far so good.
>
> However when the scene is fully dark ( i.e when the surfaces have 0,0,0
> rgb black texture ), the texture has no effect. I expected to see the
> surfaces lightened due to additive blend mentioned in the man page.
>
> How can I have the black-textured polygons lightened with projtex ?
>
> Devrim.
>
> Thanks.
>
> -----------------------------------------------------------------------
> List Archives, Info, FAQ: http://www.sgi.com/software/performer/
> Open Development Project: http://oss.sgi.com/projects/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com
> -----------------------------------------------------------------------
>
This archive was generated by hypermail 2b29 : Wed Nov 14 2001 - 11:33:16 PST