Hi community
I want to make a file named scene.oct. So I create geometries : room.rad, chair.rad, table.rad. In the end of the file room.rad, I wrote:
!xform -t 1 1.5 0 chair.rad
!xform -t 1.5 1.5 0 table.rad
to put the chair and the table in desired place in the room
So When I wrote : objline objects/room.rad |x11meta, I saw the room with chair and table in desired place but when i wrote :
oconv materials/course.mat skies/sky.rad objects/room.rad > scene.oct
I get this message :
xform: cannot find file "chair.rad"
oconv: warning - (| xform -t 1 1.5 0 chair.rad): empty file
xform : cannot find file "table.rad"
oconv: warning - (| xform -t 1.5 1.5 0 table.rad) : empty file
I don't understand why did i have this message? knowing that I put all geometries (chair.rad, table.rad and room.rad) in the same file named objects. when the room is without furnitre, i can make easily a sene.oct but when i have furniture like chair and table, i can't make this
Please can someone explain me how to resolve this problem?
Thank you
Imène
···
___________________________________________________________
Cuisine, salon, chambre enfant… Les promos pour changer votre mobilier sont sur Voila.fr http://shopping.voila.fr/vitrine/meubles
Hi Imène!
I want to make a file named scene.oct. So I create geometries : room.rad, chair.rad, table.rad. In the end of the file room.rad, I wrote:
!xform -t 1 1.5 0 chair.rad
!xform -t 1.5 1.5 0 table.rad
(...)
xform: cannot find file "chair.rad"
oconv: warning - (| xform -t 1 1.5 0 chair.rad): empty file
xform : cannot find file "table.rad"
oconv: warning - (| xform -t 1.5 1.5 0 table.rad) : empty file
Radiance is using an environment variable called RAYPATH to know which directories to use when searching for files. This allows to use library folders. If you want to make sure that the current directory is searched for files, add a dot (which represents the current directory) to your RAYPATH:
export RAYPATH=$RAYPATH:.
This is the syntax for the bash shell, other environments may have different ways to set an environment variable.
Once you have a complex scene, adding some directories may help. I usually have e.g. subdirectories called mat, sky, scene, objects, and would add all of them to the RAYPATH.
Cheers, Lars.
Hi Lars,
I'm a beginner about radiance software. Can you please tell me more how can I add for example subdirectory called objects to RAYPATH and when should i do this? in which step of my work?
Cheers
Imène
···
Message du 19/07/12 à 10h58
De : "Lars O. Grobe"
A : "Radiance general discussion"
Copie à :
Objet : Re: [Radiance-general] Problem whith file.oct
Hi Imène!
> I want to make a file named scene.oct. So I create geometries : room.rad, chair.rad, table.rad. In the end of the file room.rad, I wrote:
> !xform -t 1 1.5 0 chair.rad
> !xform -t 1.5 1.5 0 table.rad
> (...)
> xform: cannot find file "chair.rad"
> oconv: warning - (| xform -t 1 1.5 0 chair.rad): empty file
> xform : cannot find file "table.rad"
> oconv: warning - (| xform -t 1.5 1.5 0 table.rad) : empty file
Radiance is using an environment variable called RAYPATH to know which
directories to use when searching for files. This allows to use library
folders. If you want to make sure that the current directory is searched
for files, add a dot (which represents the current directory) to your
RAYPATH:
export RAYPATH=$RAYPATH:.
This is the syntax for the bash shell, other environments may have
different ways to set an environment variable.
Once you have a complex scene, adding some directories may help. I
usually have e.g. subdirectories called mat, sky, scene, objects, and
would add all of them to the RAYPATH.
Cheers, Lars.
_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general
___________________________________________________________
Cuisine, salon, chambre enfant… Les promos pour changer votre mobilier sont sur Voila.fr http://shopping.voila.fr/vitrine/meubles
Hi Imène,
I would propose to have a look at Axel's unix tutorial for Radiance users. You can append directories to the PATH (or RAYPATH) variable using colons, in bash, the syntax would be:
export RAYPATH=$RAYPATH:newsubdir:anothersubdir:currentdir
What happens is that the variable RAYPATH (left hand) is set to the string on the right hand. That string is consisting of the current content of RAYPATH (that is why you place the $ at its beginning) plus the remaining line. The colon is used as a separator for directories.
The syntax is the same as for other environment variables. The most popular example would be the PATH variable, which is the search directory for executable (program) files.
Environment variables are kept while you keep a session, e.g. a terminal window, open. If you want the changes to be permament, you can use your shell's configuration file. For bash, that would be e.g. .bashrc (a hidden file in your home directory). I tend to set the RAYPATH at the beginning of a simple script, which than calls rad. There are many options, again Axel's tutorial is probably a good starting point.
Cheers, Lars.
···
Hi Lars,
I'm a beginner about radiance software. Can you please tell me more how can I add for example subdirectory called objects to RAYPATH and when should i do this? in which step of my work?
Cheers
Imène
Hi Imene
The RAYPATH environment variable tells the Radiance binaries where to
search for files if they can't be found in the current directory. In your
case with the command
!xform -t 1 1.5 0 chair.rad
Radiance expects the file "chair.rad" in the current directory, that is the
directory where you issue the "oconv" command. Since you have the chair.rad
and table.rad files in a subdirectory called "objects" you should use the
following line to place your scene elements:
!xform -t 1 1.5 0 objects/chair.rad
Try this first before you start to fiddle with the RAYPATH variable.
BTW: A common way to organize your scene files is to keep all your geometry
in a "objects" directory (and optionally a "skies" directory for sky files
and so on). Then you create a single file "scene.rad" that only references
the files in the "objects" directory via "!xform" commands:
!xform materials.rad
!xform skies/sunny_sky.rad
!xform objects/room.rad
!xform -t 1 1.5 0 objects/chair.rad
!xform -t 1.5 1.5 0 objects/table.rad
Then you only need the command
oconv scene.rad > scene.oct
to create the octree file. If you want a differente scene you just copy the
scene.rad file and add or remove whichever geometry you want to change.
Regards
Thomas