Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.
We are trying to install Pixie on a multi-user Linux machine.
We thought it would be easiest to let each user have their own personal shaders directory, rather than give everyone permission to access the /pixie/shaders/ directory. How can I define a folder locally for rndr to look in when I run pixie? Currently, in ~/.bashrc I have the following entries:
Is there a special SHADER_LIBRARY parameter that I can define? Thanks.
Here are all the relevant environment variables:
PIXIEHOME Pixie installation path
SHADERS Shader search path
RIBS RIB search path
PROCEDURALS DSO search path
TEXTURES Texture search path
DISPLAYS Framebuffer displays search path
MODULES Modules search path
Setting SHADERS to a local directory like ~/Pixie/shaders or similar should work.
The users can also specify a search path in their RIBs as
Options "searchpath" "shader" ["&:~/Pixie/shaders"]
Thanks for the help! I got the RIB file command "searchpath" to work:
Option "searchpath" "shader" "/home/user/PixieShaders"
However, I cannot get the environment variables method to work. Here is what I have so far:
# Pixie stuff
The last line is the one for SHADERS. Not sure what I'm doing wrong. Thanks again.
Are you using bash? You might need to use 'export' to have spawned processes access to the environment variables. E.g.
Yes, I am busing BASH, but the export command does not work either. I am able to launch pixie from the command-line by entering "rndr" so that local path variable is working out just fine, so that's a relief. However, it tries to use the shaders located in /opt/pixie/shaders/. I guess Pixie needs write permission for some reason since it hits and error using these shaders:
./test.rib (17): Error in shader "/opt/pixie/shaders/ambientlight.sdr" (0) ("syntax error") (v2.2.6)
./test.rib (17): Failed to find shader "ambientlight"
That's an example of the type of output we get. It goes ahead and renders without the use of any shaders. But we get the same error every time it tries to access a shader. The permissions for the shaders are as follows:
-rw-r--r-- 1 root root 525 Jun 9 12:09 /opt/pixie/shaders/ambientindirect.sdr
-rw-r--r-- 1 root root 280 Jun 9 12:09 /opt/pixie/shaders/ambientindirect.sl
-rw-r--r-- 1 root root 433 Jun 9 12:09 /opt/pixie/shaders/ambientlight.sdr
-rw-r--r-- 1 root root 248 Jun 9 12:09 /opt/pixie/shaders/ambientlight.sl
So only root has full access, and root can render. Regular users only have read access.
Anyways, to sum up, I just can't seem to be able to define Pixie's SHADERS variable correctly. However, the "searchpath" option worked very well. I'll use that in the mean time. Thanks again.
As you've realized, recompiling the shaders will make it work.
The "syntax error" is a little misleading when it's really just an old version and needs to be recompiled. I'll see if I can give it a better error message.
Pixie first searches the current directory, then $SHADERS, then $PIXIEHOME/shaders for shaders. Setting SHADERS still doesn't work for you?
AFAICT a 2.2.5 compiled shader should work with Pixie 2.2.6, since the last number is just a 'bugfix' number. Today Pixie requires an exact match.
Any comment Okan, shouldn't a 2.2.x compiled shader work with Pixie 2.2.y?
Actually, I don't think the shaders in questions had ever been compiled on our system. We had installed Pixie from source, and compiled shaders had been included. They must have been compiled for a different system.
However, you are right, the SHADERS environmental variable didn't seem to avoid this issue. Perhaps pixie saw the old/bad compiled shaders in its initial path search of /opt/pixie/shaders/ and then ran into the syntax error when using those, so it never got around to looking in my SHADERS directory.
I think our users will be using the /opt/pixie/shaders/ directory for the standard stuff (plastic.sl, matte.sl, ambientlight.sl, etc) and then use the Option "searchpath"... for their custom shaders.
I do really appreciate your quick replies. Thanks!
Writing that last post made me realize that I had never told our system administrator to compile the shaders after installing Pixie. He just did it and it works. Compiling the shaders was the key! Thanks for the help guys! I'll be using that "searchpath" option for custom shaders.