[Radiance-general] setting RAYPATH (was: Upgrading to R4: "There
were some errors.")
Lars O. Grobe
grobe at gmx.net
Wed May 12 18:46:14 PDT 2010
Hi!
Cramer Silkworth wrote:
> echo $RAYPATH currently yields nothing, so maybe that's the problem
> (but PATH does include usr/local/bin). My problem is, i'm not really a
> linux guy, and googling how to set it returns no fewer than a
> gazillion different places that PATHs are set. Can you tell me where
> the best place would be, and what exactly the line is (in Ubuntu
> 9.10)? Sorry, I know it's a newbie question, but there doesn't seem to
> consensus on the internet (not that there ever really is) on how to do
> this.
This is required ONLY for those not using an installer or package
manager. Typically these are developers or advanced Radiance users who
do not need this advice. I however add this to complete the thread on
installing Radiance.
The RAYPATH variable contains directories that are searched by Radiance
at runtime for all scene-related files. This can be geometry, octrees,
procedural cal-files, textures,... It is NOT used to search for binaries
- the system's standard PATH variable is used for that.
1) To do anything useful with Radiance, one should have the directory
containing the cal-files coming with Radiance included in RAYPATH. This
is the lib-directory in the installation target - the default makeall
script would probably use /usr/local/ray/lib (you are asked for the
library location when running makeall). So this is the first.
2) Many of us will maintain their own library for textures, cal-files,
octrees to be used as instances. This one should be the second directory
included, say, /usr/share/radiance/objlib
3) There may be a directory containing a similar library, but only for
use with one project. This may be a subdirectory of the project, say,
/home/cramer/project/theater1/lib
4) Many of us like to have the current directory in their RAYPATH as a
default. May lead to messing up the system, but is comfortable while
developing e.g. a cal-file that is not ready to go into the library yet.
So - the RAYPATH should always include 1, 2, and 4, but 3 on a
per-project base. If you are using the Bash as a shell (probably you do
on Linux), add the RAYPATH to your Bash-configuration in your home
directory:
--
cd
gedit ,bashrc
--
(if you do not want the Gnome-GUI use nano instead of gedit) and add the
following line to the end
--
export RAYPATH=$RAYPATH:/usr/local/ray/lib:/usr/share/radiance/objlib:.
--
This APPENDS the directories to the RAYPATH instead of overwriting it.
For point 3, you can just include it before starting a simulation by typing
--
export RAYPATH=$RAYPATH:/home/cramer/project/theater1/lib
--
at the command line before starting a simulation, or you add it to the
beginning of a small script that you may use for calling the necessary
commands for your simulation.
I hope this helps. It should at least explain why you found many
different RAYPATH-setting in the archives - it really depends on where
people keep their stuff.
Cheers,
Lars.
More information about the Radiance-general
mailing list