I'm using "Ayam: 1.12 (shared) on: Unix/Darwin(8.8.2)" on Mac OSX 10.4.8 and 3Delight, and in the shell I can run the 'renderdl' command no problem. It's in my $PATH, as well as the $DYLD_LIBRARY_PATH. I changed the .ayamrc to fully qualify the path to the renderdl executable because it could never find it. Now, I get this error. What am I doing wrong- where does Ayam get it's $PATH from? It's not the same as what the shell is set to. I tried modifying the .MacOSX/environment.plist with a PATH child object variable yadda yadda but Ayam didn't pick it up.
env(AYNOSPLASH) = 0
env(BWIDGET_LIBRARY) = /Applications/Ayam.app/Contents/Resources/Scripts/tcl/BWidget-1.2.1
env(HOME) = /Users/cht
env(PATH) = /usr/bin:/bin:/usr/sbin:/sbin
env(SECURITYSESSIONID) = 622df80
env(SHELL) = /bin/bash
env(USER) = cht
env(__CF_USER_TEXT_ENCODING) = 0x1F5:0:0
Here I try to render from the view menu...
/Applications/Graphics/3Delight-6.0.4/bin/renderdl: Error! dyld: Library not loaded: lib3delight.dylib
/Applications/Graphics/3Delight-6.0.4/bin/renderdl: Error! Referenced from: /Applications/Graphics/3Delight-6.0.4/bin/renderdl
/Applications/Graphics/3Delight-6.0.4/bin/renderdl: Error! Reason: image not found
Now I see that if I run it from the shell command line like "/Applications/Ayam.app/Contents/MacOS/Ayam" it does pick up the shell variables. How do I set it so launching from the Finder makes it set my env?
unfortunately, this is a peculiar topic that is
currently without nice solution on Mac OS X.
(create or edit "~/.MacOSX/environment.plist").
But it is unclear whether you can or should set
vital variables like PATH through "environment.plist".
You may also be able to set the path using the
"Info.plist" file in the Ayam application bundle.
Open it in property list editor and look for the
LSEnvironment key. Note that, since there is no
way getting the current value of the path while
setting it in a property list file, you should copy
the _complete_ path (gathered e.g. from a shell
in Terminal.app) to the Ayam Info.plist.
As I can see, you already tried to work-around the
PATH issue by specifying fully qualified path
names to the 3Delight executables in .ayamrc. This
will work if you manage to set the DYLD_LIBRARY_PATH
and the additional 3Delight environment variables
that point to the imagers. Upon installation, 3Delight
has set them for you in your shell dot-files.
After a bit of searching on the internet I found out that on Mac OS X you may also directly set the executable search path in the Ayam console like this:
set env(PATH) "$env(PATH):/Applications/Graphics/3delight..."
. One could, of course, also wrap this up in a Tcl script and load this on application startup...
It seems like if I start Ayam from the command line it is setting the PATH and other variables. If I do a 'parray env' it says (among other things):
env(DYLD_LIBRARY_PATH) = /Applications/Graphics/3Delight-6.0.4/lib
But, when I load the 3delight shader plugin and try to scan shaders it still crashes.
The 3Delight shader parsing plugin was compiled with an older version of 3Delight (5 I think) and may simply be incompatible. Just compile the plugin with 3Delight 6...
I have a similar problem and I have looked at the Ayam source in the plugins directory but it is not clear which file is the 3Delight shader parsing plugin.
To be more specific:
3Delight 6.5.0 - installed in regular place /Applications/Graphics/3Delight-6.5.0/
Ayam 1.12 - installed in /Applications/Graphics/Ayam/Ayam.app
I start Ayam from the commandline, the tcl console gives on >parray env
env(DELIGHT) = /Applications/Graphics/3Delight-6.5.0
env(DL_DISPLAYS_PATH) = .:/Applications/Graphics/3Delight-6.5.0/displays
env(DL_SHADERS_PATH) = .:/Applications/Graphics/3Delight-6.5.0/shaders
env(DL_TEXTURES_PATH) = .
env(DYLD_LIBRARY_PATH) = /Applications/Graphics/3Delight-6.5.0/lib
env(SHADERS) = /Applications/Graphics/3Delight-6.5.0/shaders
In the menu 'Special:Select Renderer' I choose 3Delight
The TCL shell prints:
Renderer_Select: Now using 3Delight to render.
Question: does this mean I loaded the 3Delght shader parsing plugin?
Finally I choose 'Special:Scan Shaders'
TCL shell prints:
scanAllShaders: Scanning for .sdl shaders...
scanAllShaders: In "/Applications/Graphics/3Delight-6.5.0/shaders"...
Tcl: Error! invalid command name "shaderScan"
When I try to add a new shader to a material object - say a surface shader - the list of shaders is empty. :-(
If you tell what files to compile I can do so: I know C and can compile on unix and macox-xcode - I know
basic tcl as well. wrote my own shader parser long long ago for the renderman renderer.
But most of all - thanks for this great modeller to work with RIB!
the 3Delight shader parsing plugin is named ayslo3d.
This is because old versions of 3Delight used the
file name extension .slo... The Ayam shader parser
for 3Delight was simply never renamed to aysdl.
Please do read the INSTALL and the Makefile file.
Thanks - I will check INSTALL and Makefile
Combination with 3Delight 6.5.0 works for me after compiling new plugin/dynamic lib: ayslo3d.so
I do have to launch Ayam from the command line for it to pick up the environment variables and
load the plugin manually each run. Is there a way to auto load a plugin?
Will do some research to see if I can get the env. vars to work from the Finder.
Great news Paul; thanks for trying.
To autoload the plugin, just add the script "loadayslo3d.tcl" to the "Scripts" preference setting.
You may even be able to set the environment variables in this script by adding lines like
set ::env(DELIGHT) "/path/to/3delight"
before the "io_lc" command or just at the beginning of the file.