rendering without shadow

Hi,

I am using rpict command , i need to render the scene without shadows.
How i can do it ?

-Brajesh

Brajesh.

Your problem description is a bit cryptic. Could you please clarify
what your problem exactly is and add a few details about your scene
and the exact command you used to render your picture.

I am using rpict command , i need to render the scene without shadows.
How i can do it ?

Rendering a scene completely without shadow is probably possible but
it would not look good. You need shadows to see the shape of objects.

You seem to be new to Radiance so I am speculating a bit about your
problem: Your rendered an image but everything that is not in direct
(sun)light is totally black?

If this is the case you have to add the option "-ab 2" to your rpict
command line to calculate the light in areas that only receive
reflected light. Depending on your scene you should increase the "-ab
2" to "-ab 5" or "-ab 6" to capture the ambient light more accurately.
However, I assume that you also need to set other parameters to
improve the quality of your rendering/calculation.

Regards,
Thomas

···

On Thu, Jan 20, 2011 at 2:58 AM, Brajesh Lal <[email protected]> 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). Then i can
have rendered image with and without shadow. Their difference can give me shadow
pixels.
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.

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

Best Regards, Brajesh Lal

···

________________________________
From: Thomas Bleicher <[email protected]>
To: Radiance general discussion <[email protected]>
Sent: Thu, January 20, 2011 4:00:00 PM
Subject: Re: [Radiance-general] rendering without shadow

Brajesh.

Your problem description is a bit cryptic. Could you please clarify
what your problem exactly is and add a few details about your scene
and the exact command you used to render your picture.

On Thu, Jan 20, 2011 at 2:58 AM, Brajesh Lal <[email protected]> wrote:

I am using rpict command , i need to render the scene without shadows.
How i can do it ?

Rendering a scene completely without shadow is probably possible but
it would not look good. You need shadows to see the shape of objects.

You seem to be new to Radiance so I am speculating a bit about your
problem: Your rendered an image but everything that is not in direct
(sun)light is totally black?

If this is the case you have to add the option "-ab 2" to your rpict
command line to calculate the light in areas that only receive
reflected light. Depending on your scene you should increase the "-ab
2" to "-ab 5" or "-ab 6" to capture the ambient light more accurately.
However, I assume that you also need to set other parameters to
improve the quality of your rendering/calculation.

Regards,
Thomas

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

Thanks for clarifying.

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

···

On Thu, Jan 20, 2011 at 10:39 AM, Brajesh Lal <[email protected]> wrote:

Another option is to use rtcontrib to separate light source contributions. Something like:

  vwrays -ff -x 1024 -y 1024 -vf view.vf \
    > rtcontrib -ffc `vwrays -x 1024 -y 1024 -vf view.vf -d` -ab 0 -dj 0 -ds 0 -o shad_%s.hdr -m src1mat -m src2mat -m src3mat input.oct

The id's "src1mat," "src2mat" and "src3mat" must correspond to different materials for different sources in the octree. Each will produce a separate output file from rtcontrib, "shad_src1mat.hdr," "shad_src2mat.hdr," and "shad_src3mat.hdr". If you have many sources, you can put the different material names into a single file and use the -M option to load it.

Afterwards, you can use Thomas' trick of thresholding the results to determine what is in shadow from what is not. The "-dj 0 -ds 0" options make all the sources act as points, but if you want penumbras to show up in the output, you can remove these options.

Best,
-Greg

···

From: Thomas Bleicher <[email protected]>
Date: January 20, 2011 8:59:14 AM PST

Thanks for clarifying.

On Thu, Jan 20, 2011 at 10:39 AM, Brajesh Lal <[email protected]> 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