Mac OSX: can't set paths to 3Delight renderer

Discussion
2007-01-23
2013-04-05
  • Chris Taylor
    Chris Taylor
    2007-01-23

    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.

    [Undo:none/Redo:none].../>parray env
    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(SHADERS)                 =
    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
    /Applications/Graphics/3Delight-6.0.4/bin/renderdl:
    [Undo:none/Redo:none].../Documents>

     
    • Chris Taylor
      Chris Taylor
      2007-01-23

      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?

       
    • Hi Chris,

      unfortunately, this is a peculiar topic that is
      currently without nice solution on Mac OS X.
      Apple says
      http://developer.apple.com/qa/qa2001/qa1067.html
      (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.

      best regards,
      Randolf

       
    • 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...

      best regards,
      Randolf

       
    • Chris Taylor
      Chris Taylor
      2007-01-28

      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...

      best regards,
      Randolf

       
    • Paul Boots
      Paul Boots
      2007-08-03

      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.

      Paul

       
    • Paul Boots
      Paul Boots
      2007-08-03

      To be more specific:

      OSX 10.4.10
      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!

      Paul

       
    • Paul,

      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.

      best regards,
      Randolf

       
      • Paul Boots
        Paul Boots
        2007-08-04

        Thanks - I will check INSTALL and Makefile

         
    • Paul Boots
      Paul Boots
      2007-08-15

      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
      -snip-
      set ::env(DELIGHT) "/path/to/3delight"
      -snap-
      before the "io_lc" command or just at the beginning of the file.

      best regards,
      Randolf