rayinit.cal problem

Hi all,

I am new to radiance. i have installed cygwin and radiance version "cygwin-radiance_dist-3R9" and i have started learning through tutorials.

this is regarding the tutorial - Scene 0
I was using rpict command to render into HDR image ( Whicg i used to view later in HDRshop) and able to render the first part of the tutorial.
later part which is about " adding window"

i made sky.rad, outside.rad, window.rad and room.rad

now i run
% oconv sky.rad outside.rad window.rad room.rad > test1.oct

but when i use rpict

rpict -vp 2.25 .375 1 -vd -.25 .125 -.125 -av .5 .5 .5 test1.oct > image1.hdr
it gives me error
rpict : fatal - cannot find fucntion file "rayinit.cal"
rpict : 19929 rays, 18.75% after 0.000u 0.000s 0.000r hours on hp

my .bash_profile was

# System-wide .bashrc file
# change the directories if necessary
PATH=.:/opt/radiance/bin:$PATH
RAYPATH=.:/opt/radiance/lib
MANPATH=/opt/radiance/doc/man:$MANPATH
export PATH RAYPATH MANPATH

later i found the "rayinit.cal" file path (C:\cygwin\home\abc\opt\radiance\cygwin-radiance_dist-3R9\lib)

then i changed the RAYPATH

# System-wide .bashrc file
# change the directories if necessary
PATH=.:/opt/radiance/bin:$PATH
#RAYPATH=.:/opt/radiance/lib
RAYPATH=.:/opt/radiance/cygwin-radiance_dist-3R9/lib
MANPATH=/opt/radiance/doc/man:$MANPATH
export PATH RAYPATH MANPATH

still i am getting the same error. How do i fix it to view the rendered image ?

And how do i use rview - for viewing the image ? any other software is required ?

Best Regards,
Brajesh Lal

Hi,

I have never used radiance on windows and do not know about windows neither. Still there is something strange in what you describe:

now i run
% oconv sky.rad outside.rad window.rad room.rad > test1.oct
(...)
my .bash_profile was

# System-wide .bashrc file
# change the directories if necessary
PATH=.:/opt/radiance/bin:$PATH
RAYPATH=.:/opt/radiance/lib
MANPATH=/opt/radiance/doc/man:$MANPATH
export PATH RAYPATH MANPATH

(...)

later i found the "rayinit.cal" file path (C:\cygwin\home\abc\opt\radiance\cygwin-radiance_dist-3R9\lib)

You found rayinit.cal in a subdirectory called cygwin-radiance_dist-3R9\lib, so I guess your binaries are in cygwin-radiance_dist-3R9\bin, right? Still your PATH points to /opt/radiance/bin, and you are able to call oconv. So something is wrong. Is it possible that the settings in this .bash_profile are overwritten somewhere?

CU Lars.

# System-wide .bashrc file
# change the directories if necessary
PATH=.:/opt/radiance/bin:$PATH
#RAYPATH=.:/opt/radiance/lib
RAYPATH=.:/opt/radiance/cygwin-radiance_dist-3R9/lib

MANPATH=/opt/radiance/doc/man:$MANPATH

export PATH RAYPATH MANPATH

still i am getting the same error. How do i fix it to view the rendered image ?

Did you reload ('.' aka 'source') the config file after
you made the changes?

As an immediate help copy the rayinit.cal file into your
project directory (where you execute the rpict command).

Long term fix: As Lars wrote, there is something unclear with
your PATH. First you need to find out whether your settings
take effect or if they are taken from somewhere else. I'm
always puzzled by the variety of bash configuration files
and need to consult the man page to work out what .bash_profile
.bash_login and .bashrc are doing exactly.

To find out if your settings are effective, you should 'log off'
from the cygwin environment and start a new session. This will
reinitialise your environment. Then type

echo $PATH
echo $RAYPATH

at the command prompt and see if the output is what you expect.

If you don't get your settings read the bash man page regarding
the startup sequence and the Cygwin documentation about the
location of configuration files and the environment paths.

That should give you an idea how the path should look like
and where it should go.

And how do i use rview - for viewing the image ? any other software is required ?

For image viewing you use 'ximage'.

The 'rview' program has been renamed to 'rvu' (the tutorial
does not reflect that). It provides an interactive preview of
a scene, not an image. You can use it to control your view
settings before you start a long running rpict calculation
with high quality settings.

I don't know if ximage or rvu work on cygwin but you will need
a running X server if you want to use either. Again, check the
Cygwin documentation on this topic (eg. http://x.cygwin.com).

Regards,
Thomas

···

On 20 Jan 2009, at 10:47, Brajesh Lal wrote:

Thanks Lars and Thomas,

It is working !!
I copied the rayinit.cal and skybright.cal into project folder. Now "rpict: command is working. Image is rendered and i am able to see in HDR shop.

Well i am not a expert unix guy.... just started with cygwin..... to install radiance ....i refered " install.txt"
Radiance 3R9 for Cygwin 2005-08-03
HOW TO INSTALL IT QUICKLY ...
1. Launch the Cygwin console (double-click on the Cygwin desktop icon) 2. Change to root directory (don't type the dollar sign): $ cd /
3. Create the "opt" directory: $ mkdir /opt 4. Create the "radiance" directory inside /opt: $ cd /opt , $ mkdir radiance
5. Copy the radiance_cygwin_3R9.tar.gz inside C:\cygwin\opt\radiance 6. Extract the archive: $ cd radiance ..... used win rar instead of ..$ tar zxvf radiance_cygwin_3R9.tar.gz 7. Copy the bash_profile file to your home directory: $ cp bash_profile >> ~/.bash_profile ( Instead i did copy paste in windows) 8. Close the Cygwin console. 9. Re-launch the Cygwin console. 10. Enjoy!

Now i really want to fix the problem of PATH for future. Therefore i am explaining my directory structure.
Under cygwin\home\abc directory ..... i have folder "opt" and files .bashrc , .inputrc, bash_profile, BASH_HISTORY

bash_profile changed content is given below

# System-wide .bashrc file
# change the directories if necessary
PATH=.:/opt/radiance/cygwin-radiance_dist-3R9/bin:$PATH
RAYPATH=.:/opt/radiance/cygwin-radiance_dist-3R9/lib:$RAYPATH
MANPATH=/opt/radiance/cygwin-radiance_dist-3R9/doc/man:$MANPATH
export PATH RAYPATH MANPATH

then under cygwin\home\abc\opt\radiance\cygwin-radiance_dist-3R9
i have "bin", "doc", "lib" and "obj" folders. and my source files ( now it includes rayinit.cal and skybright.cal) are also into - "cygwin\home\abc\opt\radiance\cygwin-radiance_dist-3R9"

When i relaunch the cygwin console and execute $PATH .... i get the following info on the console
bash: usr/local/bin: /usr/bin: /bin : /usr/X11R6/bin : /cygdrive/c/Program: No such file or directory.

and when i do $RAYPATH then no message or info comes on the console.

for execution of source file - once i am inside the "cygwin\home\abc\opt\radiance\cygwin-radiance_dist-3R9" ditectory
I do
1. export PATH=$HOME/opt/radiance/cygwin-radiance_dist-3R9/bin/:$PATH ( Without this command i am "oconv" commoand is not executed)
2. oconv command.........
3. rpict command ............

I suppose my path is set to bin and it does not point on lib folder? How i can set the path(s) such that i do not use export command

Best Regards,
Brajesh Lal

···

________________________________
From: Thomas Bleicher <[email protected]>
To: Radiance general discussion <[email protected]>
Sent: Tuesday, January 20, 2009 1:15:15 PM
Subject: Re: [Radiance-general] rayinit.cal problem

On 20 Jan 2009, at 10:47, Brajesh Lal wrote:

# System-wide .bashrc file
# change the directories if necessary
PATH=.:/opt/radiance/bin:$PATH
#RAYPATH=.:/opt/radiance/lib
RAYPATH=.:/opt/radiance/cygwin-radiance_dist-3R9/lib
MANPATH=/opt/radiance/doc/man:$MANPATH
export PATH RAYPATH MANPATH
still i am getting the same error. How do i fix it to view the rendered image ?
Did you reload ('.' aka 'source') the config file after
you made the changes?

As an immediate help copy the rayinit.cal file into your
project directory (where you execute the rpict command).

Long term fix: As Lars wrote, there is something unclear with
your PATH. First you need to find out whether your settings
take effect or if they are taken from somewhere else. I'm
always puzzled by the variety of bash configuration files
and need to consult the man page to work out what .bash_profile
.bash_login and .bashrc are doing exactly.

To find out if your settings are effective, you should 'log off'
from the cygwin environment and start a new session. This will
reinitialise your environment. Then type

echo $PATH
echo $RAYPATH

at the command prompt and see if the output is what you expect.

If you don't get your settings read the bash man page regarding
the startup sequence and the Cygwin documentation about the
location of configuration files and the environment paths.

That should give you an idea how the path should look like
and where it should go.

And how do i use rview - for viewing the image ? any other software is required ?

For image viewing you use 'ximage'.

The 'rview' program has been renamed to 'rvu' (the tutorial
does not reflect that). It provides an interactive preview of
a scene, not an image. You can use it to control your view
settings before you start a long running rpict calculation
with high quality settings.

I don't know if ximage or rvu work on cygwin but you will need
a running X server if you want to use either. Again, check the
Cygwin documentation on this topic (eg. http://x.cygwin.com).

Regards,
Thomas

Thanks Lars and Thomas,

It is working !!
I copied the rayinit.cal and skybright.cal into project folder. Now "rpict: command is working. Image is rendered and i am able to see in HDR shop.

Definitively a PATH problem, then.

Well i am not a expert unix guy.... just started with cygwin.....

Be told that you will suffer more than necessary for using cygwin. If you have the resources I recommend installing Linux on an old computer or setting up a virtual machine with Linux. It will make it easier for you to understand Unix.

Now i really want to fix the problem of PATH for future. Therefore i am explaining my directory structure.
Under cygwin\home\abc directory ..... i have folder "opt" and files .bashrc , .inputrc, bash_profile, BASH_HISTORY

First: According to this you are user 'abc' on your Windows machine. Is this correct or did you set this up intentionally? You can verify by typing

whoami
pwd

in the console window. The first should give you 'abc' the second '/home/abc'

Second: This 'opt' is not were it is intended to be. That might be the problem.

Cygwin creates its own file system 'root' in its installation directory (typically "C:\cygwin"). Every command you enter in a Cygwin shell will use this as the start for the file system tree. An absolute file path in Unix starts with '/' (no dot!). So if you see a Unix path '/home/abc' this translates to "C:\cygwin\home\abc".

Following this logic '/opt/radiance/cygwin-radiance_dist-3R9/bin' should be found as
"C:\cygwin\opt\radiance\cygwin-radiance_dist-3R9\bin". Just keep the files as they are and move the cygwin-radiance_dist-3R9 folder to the right location.

You should not mix your project files with files in the distribution. You might accidentally destroy essential files.

bash_profile changed content is given below

Note that there should be a '.' in front of the file name: '.bash_profile'. The '.' hides the name for the user so this file is somewhat protected. It is still part of the file name and without it the file will not be recognised. This may be why you don't have the $RAYPATH set correctly.

# System-wide .bashrc file
# change the directories if necessary
PATH=.:/opt/radiance/cygwin-radiance_dist-3R9/bin:$PATH
RAYPATH=.:/opt/radiance/cygwin-radiance_dist-3R9/lib:$RAYPATH
MANPATH=/opt/radiance/cygwin-radiance_dist-3R9/doc/man:$MANPATH
export PATH RAYPATH MANPATH

If you follow the renaming as above these settings should work now.

then under cygwin\home\abc\opt\radiance\cygwin-radiance_dist-3R9
i have "bin", "doc", "lib" and "obj" folders. and my source files ( now it includes rayinit.cal and skybright.cal) are also into - "cygwin\home\abc\opt\radiance\cygwin-radiance_dist-3R9"

Move your source files to a folder in your HOME directory ('/home/abc/project1' for example). Keep your Radiance installation clear!

When i relaunch the cygwin console and execute $PATH .... i get the following info on the console
bash: usr/local/bin: /usr/bin: /bin : /usr/X11R6/bin : /cygdrive/c/Program: No such file or directory.

and when i do $RAYPATH then no message or info comes on the console.

See above. IF you are user 'abc' AND the file is called '.bash_profile' it should work.

for execution of source file - once i am inside the "cygwin\home\abc\opt\radiance\cygwin-radiance_dist-3R9" ditectory
I do
1. export PATH=$HOME/opt/radiance/cygwin-radiance_dist-3R9/bin/:$PATH

What you do here is what should happen in the config file. You only did change the PATH setting, but did not create a RAYPATH. Therefore you could use oconv and rpict but the search for 'rayinit.cal' failed.

One last thing: If you copy-and-past from Windows to Linux you should change the line end characters. Windows will create a '\r\n' at the end of a text file while Unix only uses '\n'. The bash configuration files should not be affected, but other programs might have problems with that.

Regards,
Thomas

···

On 20 Jan 2009, at 13:32, Brajesh Lal wrote: