[Radiance-general] rendering without shadow

Thomas Bleicher tbleicher at googlemail.com
Thu Jan 20 08:59:14 PST 2011


Thanks for clarifying.

On Thu, Jan 20, 2011 at 10:39 AM, Brajesh Lal <brajeshlal at yahoo.com> wrote:
> Hi Thomas,
> Sorry for ambiguity. I need shadow pixel ids of the scene.
> I am wondering if i can disable or enable the shadow casting feature
> of a particular object or scene ( like any other 3D packages).

Radiance is not like a typical 3D engine where lighting effects and
surface qualities are synthetic. In Radiance you have some "physical"
restrictions for what you can model and render. However, Radiance is
also very flexible so that with some extra effort you may be able to
achieve your desired result.

> Then i can have rendered image with and without shadow.
> Their difference can give me shadow pixels.

You can render one image with only the direct light visible (no
ambient light). Everything that lies in shadow will be black. Try to
render an image with the option "-ab 0" and see if the dark areas are
what you expected your shadows to look like.

You can then render a second image with indirect contribution and
subtract the two images. But the result will not be limited to the
shadows but will also show the difference in the lighting levels of
lit areas. To render the second image use "-ab 1" or "-ab 2".

To calculate the difference of the images use this command:

pcomb -e 'ro=ri(1)-ri(2);go=gi(1)-gi(2);bo=bi(1)-bi(2)' -o
no_shadow.hdr -o shadow.hdr > diff.hdr

You can modify this calculation to introduce a threshold which will
clean up the shadow image a bit. But first you have to see if this is
in principle the right way to go.

> Or
> If i can render the scene with some constant background color, then i can
> read the shadows pixel ids (low pixel value) in matlab.

You can also define a coloured "ambient light" to give the shadow a
red or green tint.

> my scene has only diffuse objects (diffuse reflectance can
> be of any value, no black object) and a single direct light.

Light sources in Radiance are not point lights but need a physical
surface area to attache to. You should use a small object here and set
the rendering parameters right to avoid a subdivision of the surface
during the rendering process which would result in fuzzy shadow edges.

Regards,
Thomas



More information about the Radiance-general mailing list