[PLUGIN]MITSUBA Render Exporter v1.5.0(20141109)
-
@driven said:
Hi,
think I found the problem, but not the solution...
2014-03-18 11:44:26 INFO main [converter.cpp:127] Creating directory "textures" .. Caught a critical exception: boost::filesystem::create_directory: Permission denied: "textures"
john
Hi,john.
Ummm...I guess the problem is delay of writing file.
Please search "mitsuba_main.dae" in "/applications/su_render" folder.
Tell me that file size.
And Start Mitsuba and import "mitsuba_main.dae" file.Is there anything displayed on mitsuba window.
Now "mitsuba_main.serialized" is created in that folder.and it is not zero byte.
Seriarized file is binary mesh file of mitsuba render.
Please send me your "mtsuba_main.dae" If "mitsuba_main.serialized" is zero byte.
I will analyze it.
Thanks.
-
When I import that file, I get the attached popup dialog and the log contains the attached messages. The serialized file is then not empty and mitsuba generates a rendered scene! So the problem definitely involves getting from the dae to the serialized file. However, the rendering contains only one instance each of Components that have multiple instances in the SketchUp file. The handling of my original textured material also is weird (looks like a grainy mass of dots instead of the original wood image).
Steve
-
hi
dae is 54kb, fails to make texture folder...
mitsuba_main.serialized is empty...if I import the dae into mitsuba, texture folder gets made on import, but is empty...
mitsuba_main.serialized is 12kb
john -
Here are the folders and contents after importing the dae. As John reported, the textures folder exists but is empty, as is the output folder.
steves-macbook:su_render steve$ ls -lR ./*
-rw-r--r-- 1 steve admin 6673 Mar 17 21:23 ./Mitsuba_geometries.xml
-rw-r--r-- 1 steve admin 1365 Mar 17 21:23 ./Mitsuba_scene.xml
-rw-r--r-- 1 steve admin 5867 Mar 17 21:23 ./mitsuba_geom.txt
-rw-r--r-- 1 steve admin 30488 Mar 17 21:23 ./mitsuba_main.dae
-rw-r--r-- 1 steve admin 903109 Mar 18 09:04 ./mitsuba_main.exr
-rw-r--r-- 1 steve admin 3582 Mar 18 08:55 ./mitsuba_main.serialized
-rw-r--r-- 1 steve admin 1620 Mar 18 08:55 ./mitsuba_main.xml./output:
./preview_cash:
total 80
-rw-r--r-- 1 steve admin 39202 Mar 17 17:31 su2objmtl_default_material.png./textures:
./tx_default:
total 8
-rw-r--r-- 1 steve admin 3645 Mar 17 21:23 dark_mahogany.jpg -
the other thing I tried was exporting a dae directly from SU...
filesize 202 KB
texture folder empty
serialised 11 KBSophie is facedown on the ground [I don't think she's partially happy about it...]
-
here are all the files for both...
this is after the Misuba.app import so it has a textures folder...
still empty after untitled was run...
su_render.zip -
Hi
Here is the Flow of exporting to mitsuba in my plugin.1.Create collada mesh without materials and transformation.(for instancing)
2.Convert the collada mesh to serialized mesh by mtsimport tool.
3.Export scene information iclude materials and instancing and transformation for serialized mesh.Please open "mitsuba_scene.xml" in mitsuba render ,if there is correct serialized mesh "mitsuba_main.serialized" created from "mitsuba_main.dae".
That will be shown all correctly.
Mtsimport work fine?
Collada file created fine?
Seriarize file is not zero byte? -
I can trap the create_directory error by appending at line 269 in mitsuba_main.rb
the serialisation never occurs from the plugin...system(commandline, ;out => ['/tmp/log.txt', 'a'], ;err => ['/tmp/log.txt', 'a'])
-
@driven said:
I can trap the create_directory error by appending at line 269 in mitsuba_main.rb
the serialisation never occurs from the plugin...system(commandline, ;out => ['/tmp/log.txt', 'a'], ;err => ['/tmp/log.txt', 'a'])
In my mac that occurs.
Here is log.txt.2014-03-18 23;21;32.391 mtsimport[308;507] ApplePersistenceIgnoreState; Existing state will not be touched. New state will be written to /var/folders/v2/nc5st2054wvghywgtfrszpf00000gn/T/org.mitsuba.Mitsuba.savedState 2014-03-18 23;21;32 INFO main [converter.cpp;137] Beginning conversion .. 2014-03-18 23;21;32 INFO main [collada.cpp;1596] Loading "mitsuba_main.dae" .. 2014-03-18 23;21;32 INFO main [collada.cpp;1642] Importing materials .. 2014-03-18 23;21;32 INFO main [collada.cpp;1669] Importing scene .. 2014-03-18 23;21;32 WARN main [collada.cpp;1288] instance_geometry does not contain a <bind_material> element! 2014-03-18 23;21;32 WARN main [collada.cpp;615] Referenced material could not be found, substituting a diffuse BRDF. 2014-03-18 23;21;32 WARN main [collada.cpp;1288] instance_geometry does not contain a <bind_material> element! 2014-03-18 23;21;32 WARN main [collada.cpp;615] Referenced material could not be found, substituting a diffuse BRDF. 2014-03-18 23;21;32 WARN main [collada.cpp;1288] instance_geometry does not contain a <bind_material> element! 2014-03-18 23;21;32 WARN main [collada.cpp;615] Referenced material could not be found, substituting a diffuse BRDF. 2014-03-18 23;21;32 WARN main [collada.cpp;1288] instance_geometry does not contain a <bind_material> element! 2014-03-18 23;21;32 WARN main [collada.cpp;615] Referenced material could not be found, substituting a diffuse BRDF. 2014-03-18 23;21;32 WARN main [collada.cpp;1288] instance_geometry does not contain a <bind_material> element! 2014-03-18 23;21;32 WARN main [collada.cpp;615] Referenced material could not be found, substituting a diffuse BRDF. 2014-03-18 23;21;32 WARN main [collada.cpp;1288] instance_geometry does not contain a <bind_material> element! 2014-03-18 23;21;32 WARN main [collada.cpp;615] Referenced material could not be found, substituting a diffuse BRDF. 2014-03-18 23;21;32 WARN main [collada.cpp;1288] instance_geometry does not contain a <bind_material> element! 2014-03-18 23;21;32 WARN main [collada.cpp;615] Referenced material could not be found, substituting a diffuse BRDF. 2014-03-18 23;21;32 INFO main [collada.cpp;1680] Done, took 0.0s 2014-03-18 23;21;32 INFO main [mtsimport.cpp;156] Encountered 14 warnings -- please check the messages above for details. Finished conversion (took 60 ms)
In Sketchup Ruby Console
system(%Q{'/Applications/Mitsuba.app/Contents/MacOS/mtsimport' '/Applications/su_render/mitsuba_main.dae' '/Applications/su_render/mitsuba_main.xml'})
this return False? -
Here is my log.txt. after 2 attempts
2014-03-18 13;58;36 INFO main [converter.cpp;127] Creating directory "textures" .. Caught a critical exception; boost;;filesystem;;create_directory; Permission denied; "textures" 2014-03-18 14;22;09 INFO main [converter.cpp;127] Creating directory "textures" .. Caught a critical exception; boost;;filesystem;;create_directory; Permission denied; "textures"
@tak2hata said:
In Sketchup Ruby Console
system(%Q{'/Applications/Mitsuba.app/Contents/MacOS/mtsimport' '/Applications/su_render/mitsuba_main.dae' '/Applications/su_render/mitsuba_main.xml'})
this return False?
YES it returns falseand if you use this version, you get the same error as the log file in Ruby Console...
%x(/Applications/Mitsuba.app/Contents/MacOS/mtsimport /Applications/su_render/mitsuba_main.dae /Applications/su_render/mitsuba_main.xml 2>&1)
2014-03-18 14:42:03 INFO main [converter.cpp:127] Creating directory "textures" .. Caught a critical exception: boost::filesystem::create_directory: Permission denied: "textures"
-
@driven said:
and if you use this version, you get the same error as the log file in Ruby Console...
%x(/Applications/Mitsuba.app/Contents/MacOS/mtsimport /Applications/su_render/mitsuba_main.dae /Applications/su_render/mitsuba_main.xml 2>&1)
2014-03-18 14:42:03 INFO main [converter.cpp:127] Creating directory "textures" .. Caught a critical exception: boost::filesystem::create_directory: Permission denied: "textures"
I get this return.
> %x(/Applications/Mitsuba.app/Contents/MacOS/mtsimport /Applications/su_render/mitsuba_main.dae /Applications/su_render/mitsuba_main.xml 2>&1) 2014-03-18 23;58;34.268 mtsimport[472;507] ApplePersistenceIgnoreState; Existing state will not be touched. New state will be written to /var/folders/v2/nc5st2054wvghywgtfrszpf00000gn/T/org.mitsuba.Mitsuba.savedState 2014-03-18 23;58;34 INFO main [converter.cpp;137] Beginning conversion .. 2014-03-18 23;58;34 INFO main [collada.cpp;1596] Loading "mitsuba_main.dae" .. 2014-03-18 23;58;34 INFO main [collada.cpp;1642] Importing materials .. 2014-03-18 23;58;34 INFO main [collada.cpp;1669] Importing scene .. 2014-03-18 23;58;34 WARN main [collada.cpp;1288] instance_geometry does not contain a <bind_material> element! 2014-03-18 23;58;34 WARN main [collada.cpp;615] Referenced material could not be found, substituting a diffuse BRDF. 2014-03-18 23;58;34 WARN main [collada.cpp;1288] instance_geometry does not contain a <bind_material> element! 2014-03-18 23;58;34 WARN main [collada.cpp;615] Referenced material could not be found, substituting a diffuse BRDF. 2014-03-18 23;58;34 WARN main [collada.cpp;1288] instance_geometry does not contain a <bind_material> element! 2014-03-18 23;58;34 WARN main [collada.cpp;615] Referenced material could not be found, substituting a diffuse BRDF. 2014-03-18 23;58;34 WARN main [collada.cpp;1288] instance_geometry does not contain a <bind_material> element! 2014-03-18 23;58;34 WARN main [collada.cpp;615] Referenced material could not be found, substituting a diffuse BRDF. 2014-03-18 23;58;34 WARN main [collada.cpp;1288] instance_geometry does not contain a <bind_material> element! 2014-03-18 23;58;34 WARN main [collada.cpp;615] Referenced material could not be found, substituting a diffuse BRDF. 2014-03-18 23;58;34 WARN main [collada.cpp;1288] instance_geometry does not contain a <bind_material> element! 2014-03-18 23;58;34 WARN main [collada.cpp;615] Referenced material could not be found, substituting a diffuse BRDF. 2014-03-18 23;58;34 WARN main [collada.cpp;1288] instance_geometry does not contain a <bind_material> element! 2014-03-18 23;58;34 WARN main [collada.cpp;615] Referenced material could not be found, substituting a diffuse BRDF. 2014-03-18 23;58;34 WARN main [collada.cpp;1288] instance_geometry does not contain a <bind_material> element! 2014-03-18 23;58;34 WARN main [collada.cpp;615] Referenced material could not be found, substituting a diffuse BRDF. 2014-03-18 23;58;34 INFO main [collada.cpp;1680] Done, took 0.0s 2014-03-18 23;58;34 INFO main [mtsimport.cpp;156] Encountered 16 warnings -- please check the messages above for details. Finished conversion (took 42 ms)
Is this problem security permission?
-
the problem seems to be the path from boost to the file not having the correct permissions, if that makes sense...
As the folder is in the HD/Applications/ I have tried it at /tmp/, ~/Desktop, ~/Documents and in Plugins, all fail...
my copy of boost lives in /usr/local/bin/include, but it's a symlink to homebrew/cellar so that my be the issue...
not following symlink from ruby, I'll check it again from terminal...
-
that returns
dyld; Symbol not found; __cg_jpeg_resync_to_restart Referenced from; /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO Expected in; /usr/local/lib/libJPEG.dylib in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO Trace/BPT trap; 5
-
@driven said:
that returns
dyld; Symbol not found; __cg_jpeg_resync_to_restart > Referenced from; /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO > Expected in; /usr/local/lib/libJPEG.dylib > in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO > Trace/BPT trap; 5
Avoiding this problem,
I will write the code for serialized mesh exporter in ruby.
Thanks.
-
Good idea, it's probably the best long term solution...
you can PM me if you want anything tested...
john
-
I just had a thought and did some tests...
commandline tool need to modify .bashrc to point to python...
I don't use a .bashrc file, i use .bashprofile, so I created one under User/me/.bashrc and it's not written to...
where is your .bashrc located, and exactly what does it contain??
john
-
@driven said:
I just had a thought and did some tests...
commandline tool need to modify .bashrc to point to python...
I don't use a .bashrc file, i use .bashprofile, so I created one under User/me/.bashrc and it's not written to...
where is your .bashrc located, and exactly what does it contain??
john
I search in my mac.
I found "bashrc" in "/private/etc"
it contains this.# System-wide .bashrc file for interactive bash(1) shells. if [ -z "$PS1" ]; then return fi PS1='Ā„h;Ā„W Ā„uĀ„$ ' # Make bash check its window size after a process completes shopt -s checkwinsize # Tell the terminal about the working directory at each prompt. if [ "$TERM_PROGRAM" == "Apple_Terminal" ] && [ -z "$INSIDE_EMACS" ]; then update_terminal_cwd() { # Identify the directory using a "file;" scheme URL, # including the host name to disambiguate local vs. # remote connections. Percent-escape spaces. local SEARCH=' ' local REPLACE='%20' local PWD_URL="file;//$HOSTNAME${PWD//$SEARCH/$REPLACE}" printf 'Ā„e]7;%sĀ„a' "$PWD_URL" } PROMPT_COMMAND="update_terminal_cwd; $PROMPT_COMMAND" fi
-
thanks for that,
I found a note in the 'Mitsuba' source repository that the .bashrc file was no longer written to, so their message-box needs updating.
It does seem to be a simple path issue, that halts the process...
I just can't find it.
I have a separate instal of 'boost', so it may be a version/path conflict when Mitsuba calls it from shell...Mitsuba works with other .dae files when imported, and I have older scene files from a previous instal, that run after they are auto updated on loading...
I'll remove my copy of boost and see if that makes a difference...
john
-
hi
got it working...
will need tidying...
line 264commandline = %Q{cd /Applications && Mitsuba.app/Contents/MacOS/mtsimport #{objfile.gsub(/\\/,'/')} #{xmlfile.gsub(/\\/,'/')}}
OSX 10.9.2 must be stricter about the context...
john
-
@driven said:
hi
got it working...
will need tidying...
line 264commandline = %Q{cd /Applications && Mitsuba.app/Contents/MacOS/mtsimport #{objfile.gsub(/\\/,'/')} #{xmlfile.gsub(/\\/,'/')}} >
OSX 10.9.2 must be stricter about the context...
john
Hi,john.
Thanks!!!I change that line.and I update this to v1.2.1.
I am very Happy.
Thank you very much!
Advertisement