Before I go into too much detail about a scripted solution please
confirm the following:
You have a static scene and want to show this scene under different
lighting conditions; specifically you want to show changes of the
light (sun?) direction.
If you only want one directional light source (sun but no sky) you can
modify a typical sky description as created by gensky. For example,
the following gensky command creates a sun 45 degrees east of south
and 45 degrees zenith elevation:
gensky -ang 45 -45 +s
The corresponding Radiance description looks like this:
# --- begin sky description ----
# gensky -ang 45 -45 +s
# Ground ambient level: 14.8
void light solar
3 6.77e+06 6.77e+06 6.77e+06
solar source sun
4 0.500000 -0.500000 0.707107 0.5
void brightfunc skyfunc
2 skybr skybright.cal
7 1 9.56e+00 2.12e+01 5.71e-01 0.500000 -0.500000 0.707107
# --- end sky description ---
The line "4 0.500000 -0.500000 0.707107 0.5" has as the 2nd, 3rd and
4th argument the sun direction as x,y,z vector.
To create a set of image with changing sun direction you have to
1) replace the (x,y,z) vector in the sky definition with one of your
2) create a new scene octree from the sky definition and the scene geometry
3) render the image
4) give the new image a recognisable name ("img_x_y_z.hdr")
5) rinse and repeat
Depending on your computer environment and your scripting skills you
have a number of choices to accomplish this in detail. If you need
more information please provide more details about your situation,
knowledge and operating system.
Please note that the above modification will not create a complete sky
definition. If you want to simulate the effect of natural light (sun
and sky) then you should not modify the sky description file directly.
This modification will also not take into account the change of
sunlight intensity during the day.
On Thu, Jan 20, 2011 at 3:35 AM, Brajesh Lal <firstname.lastname@example.org> wrote:
I have txt file with light vectors ( x, y and z vectors separated by tabs) .
Same scene has to be rendered (using rpict) with each set of light vector
and saved as different .hdr file.
Instead of doing one by one, i need to automate the process by creating a
some script (may be using rif file and rad command), which can update the
light vectors in the scene file (.rad file).
I am confused
1. How do i declare the variable for light vectors and update the light
vectors in the scene file ?
2. What are the steps to do it ?
( I am still using 3.9 version)
Radiance-general mailing list