Another Softimage to Mitsuba exporter

Plugins linking to this thread: (hide)

Mitsuba ExporterAuthor: Shekn @si-community
v0.7.2 updated Apr 4th 2015. This plugin is called Mitsuba and Softimage synchronizer (shortly MaSs). I start to develop it for understanding how the Mitsuba renderer works. So, some tool for export scenes needed. Of course, there are some other exporters from Softimage to Mitsuba. One of them here. I try to understand how it works, but then decide to create my one exporter with Python and GUI.

The latest update includes the abilty to render volumes. For that purpose, the package includes ICE compounds that create 3D-grids which can be manipulated further in ICE, exported with the 'Store VOL' compound, then rendered using Mitsuba. Supports rendering of OpenVDB volumes through Oleg Bliznuk's OpenVDB ICE package. More in the si-community thread.

Slava Shumikhin made a fork of an older version of Shekn's plugin available here on github.

local backup: MaSs plugin 0.7.2 package.zip Mitsuba 0.5.0 x64 Win.zip (compatible version of Mitsuba)

Angel 07
Posts: 30
Joined: 16 Jan 2011, 13:59

Re: Another Softimage to Mitsuba exporter

Post by Angel 07 » 02 May 2014, 21:47

Some little small update:

https://dl.dropboxusercontent.com/u/114 ... 00.1.5.zip

What's new:

1. There are no any additional module for Python needed. So, for install sufficiently to move files to \Application\Plugins folder in any workgroup, and it will work.

2. Add parameter "Default integrator" for exporter. This parameter set the integrator (rendering algorithm) to corresponding value. By default in Mitsuba this integrator is equal to Direct Illumination. So, for obtain reflections in the test renders we had change the algorithm every time. Now it not necessary.
Image

3. Add new property for every object. If "Is subdivide" is on, then before export object to ply format it will be subdivided to the specified level (of course with preserving UV maps). If "Is solid" is on, the object will be export with ignoring UV maps and information of smooth groups (in fact each normal of vertex will be the average of incident polygons). Resulting ply-file has smaller weight and load to render faster.
Image

The main subject - test of the exporter and render in real scene. So, I take some scene from Evermotion (Archinteriors vol. 24) and try render it in Mitsuba. The result:
Image

What I can note:

1. Of course, this is not VRay, Mental or Arnold. But it works and very stable. Export of all geometry spend nearly 3 hours. Total weight is 600 Mb. Scene loaded to render nearly 1-2 minutes. This is not convenient for test renders.

2. All scene lighted by one HDR-map. So, many small bright dots appear. Increasing samples count theoretical solve this problem, but in this case render time tends to infinity. More or less this problem was solved with the help of "Photon mapper" algorithm. But anyway, the render time of presented image is nearly 1-2 hours.

3. I used one of the main advantage (as I think) of Mitsuba - it is very easy to increase calculating power. I have another computer in network (i7 with 8 threads), and by specifying the network address of this computer in properties of render, my computer render the picture together with this second computer. So, the total number of threads is 16. This is very convenient.

Newcomer (<20 posts) alert: please use the URL tags - HB

Bullit
Moderator
Posts: 2621
Joined: 24 May 2012, 09:44

Re: Another Softimage to Mitsuba exporter

Post by Bullit » 03 May 2014, 00:22

Yeah that image seems to miss some light.

Angel 07
Posts: 30
Joined: 16 Jan 2011, 13:59

Re: Another Softimage to Mitsuba exporter

Post by Angel 07 » 10 May 2014, 12:30

Next small update.

https://dl.dropboxusercontent.com/u/114 ... %200.2.zip

What's new:

1. Now it's possible to export not only ascii ply-format, but also binary ply-format and serialized mesh.

2. Hight field object

3. Irawan shader for cloth. There are no any generator of template files for this shader, but it is possible to use 6 example files.

4. Homogeneous shader. This allow to obtain more accurate sss effect and also translucent liquid.

Try to render some example:
Image

Newcomer (<20 posts) alert: please use the URL tags - HB

User avatar
Tekano
Posts: 488
Joined: 09 Jun 2009, 14:49
Location: London, UK

Re: Another Softimage to Mitsuba exporter

Post by Tekano » 12 May 2014, 19:26

I got it to work after putting the path into regedit pointing to 2013 SP! etc. yay!

not sure how to connnect the shaders up properly yet am sure here is homogonous shader set to skin
render_xsi_mitsuba_test.jpg
by the way .PLY export set to binary is orders of magnitude quicker than sequential. many thanks for adding this!
Gossip is what no one claims to like, but everybody enjoys.

Angel 07
Posts: 30
Joined: 16 Jan 2011, 13:59

Re: Another Softimage to Mitsuba exporter

Post by Angel 07 » 12 May 2014, 20:17

The shader setup is simple. Use mHomogeneous for presets or mHomogeneousSigmaAS or mHomogeneousSigmaTAlbedo for specifying parameters by hand. But this add only sss effect. For adding some specular add mDielectric shader (or mRoughDielectric) to bsdf port. You can also pass throw mBumpMap for adding bump effect. The phase node is not necessary (at default it has isotropic type).
Attachments
ShaderSetup01.jpg

Angel 07
Posts: 30
Joined: 16 Jan 2011, 13:59

Re: Another Softimage to Mitsuba exporter

Post by Angel 07 » 30 Sep 2014, 06:28

Ok, next version of the plugin is MaSs 0.5.0.

Download: https://dl.dropboxusercontent.com/u/114 ... ackage.zip
Compatible version of Mitsuba: https://dl.dropboxusercontent.com/u/114 ... %20Win.zip

What improved: now the plugin not only generate xml-file, but render it in separate Qt-window. Initially I would like to do something like integrated render (like Arnold, for example), but it was harder than expected. So, some compromise is to use Mitsuba Python API. It allows to render pictures by using Python commands. As plugin used Qt interface, PyQtForSoftimage is needed. All necessary files are in archive.

Also I rewrite some functions for export geometry in C++. Now the export process is more faster.

Some videos (from the channel http://www.youtube.com/channel/UC9gBf1mPED7yIOemBp-XUlQ):

1. Example of animation, rendered with the help of the plugin:



2. Installation process:



3. Description of details of rendering process:



4. Properties of rendering window:



5. General workflow:



6. Mitsuba primitives:



7. Mitsuba lights:



8. Shaders setup:



9. Setup of the Irawan shader for fabric:



10. Rendering point clouds (but not volumetrics):



11. Workflow for rendering animation:



Known bugs:

1. The button "Stop" on rendering window should stop the render process. It happens, but then XSI is crushed. I don't know why.
2. If the scene contains strands (for hairs, for example) then render in window does not start, but all works correctly throw command line.

Also for render should be used the version of Mitsuba from the top of the post. The old official build have some differences in Python API.
Attachments
post-14-14115832621_01.jpg
post-14-14115832620.jpg

Angel 07
Posts: 30
Joined: 16 Jan 2011, 13:59

Re: Another Softimage to Mitsuba exporter

Post by Angel 07 » 01 Mar 2015, 16:51

Next version MaSs 0.7

Download link: https://dl.dropboxusercontent.com/u/114 ... ackage.zip
References for new ICE Nodes: https://dl.dropboxusercontent.com/u/114 ... rences.pdf

As in previous version of the plugin, PyQtForSoftimage is required. All necessary packages are in the archive. Process of the installation is the same. You should change the path to Mitsuba folder in the file MaSsPlugin.py.

Two videos:

1. Create point cloud and render it in Mitsuba



2. By using the plugin OpenVDB we load vdb-data and render it in Mitsuba. Link to this plugin: http://www.si-community.com/community/v ... =27&t=4707



One remark about generation of vol-files during the export. Bug of the render is that if it renders some vol-object, the file becomes locked, and we should close the host application (Softimage, for example) to unlock it. So we can not just rewrite it, we should generate new vol-file each time. And if point cloud contains a lot of points, then the file is large, and the size of the project folder can grow quickly. Therefore, after generating this file, and further customize the rendering, you should switch off the parameter "Should render volume" in the options. Then the render use the old vol-file.

Newcomer (<20 posts) alert: please use the URL tags - HB
Attachments
ImportVDB.jpg
SimplePC.jpg

User avatar
nDman
Posts: 55
Joined: 11 Jan 2013, 10:48

Re: Another Softimage to Mitsuba exporter

Post by nDman » 02 Mar 2015, 04:13

Is this compatible with SI2013? I get this errors:

Code: Select all

# ERROR : Traceback (most recent call last):
#   File "<Script Block 2>", line 2, in <module>
#     import sip
# ImportError: DLL load failed: The specified module could not be found.
#  - [line 2 in C:\Users\Saeed\Autodesk\Softimage_2013_SP1\Addons\PyQtForSoftimage\Application\Plugins\pyqt_example.py]
# ERROR : Traceback (most recent call last):
#   File "<Script Block 2>", line 1, in <module>
#     from PyQt4.QtCore import Qt
# ImportError: DLL load failed: The specified module could not be found.
#  - [line 1 in C:\Users\Saeed\Autodesk\Softimage_2013_SP1\Addons\PyQtForSoftimage\Application\Plugins\qtevents.py]

Angel 07
Posts: 30
Joined: 16 Jan 2011, 13:59

Re: Another Softimage to Mitsuba exporter

Post by Angel 07 » 02 Mar 2015, 04:35

This is error of PyQtForSoftimage plugin. Check, is you install all necessary items. You should:

1. Copy PyQt folder to \python\Lib\site-packages folder of Softimage installed folder
2. Install PyQtForSoftimage as xsiaddon.

The complete guide about installation in the video in one of the previous post.

Angel 07
Posts: 30
Joined: 16 Jan 2011, 13:59

Re: Another Softimage to Mitsuba exporter

Post by Angel 07 » 02 Mar 2015, 07:58

Also, as written here: https://github.com/caron/PyQtForSoftimage Plugin PyQtForSoftimage works correctly with Python 2.7. Build-in version of Python on Softimage 2013 is 2.6.4. May be this is the reason of the error. But anyway, it is possible to use external Python distributive, but it needs additional tweaks for installation.

User avatar
nDman
Posts: 55
Joined: 11 Jan 2013, 10:48

Re: Another Softimage to Mitsuba exporter

Post by nDman » 01 Apr 2015, 16:07

Ok, i did second try to install it. PyQt installed perfectly and it works well (On SI-2013). But now there is a problem at export mesh for render!

Code: Select all

# ERROR : Traceback (most recent call last):
#   File "<Script Block 2>", line 1944, in MaSs_Render_OnClicked
#     ActOneFrame(int(frame))
#   File "<Script Block 2>", line 1948, in ActOneFrame
#     scenePath = ExportXML(f, oProp)
#   File "<Script Block 2>", line 2046, in ExportXML
#     oProp.Parameters("clamping").Value, oProp.Parameters("useColorAttribute").Value, frameNumber, oProp.Parameters("lastTime").Value))
#   File "C:\Users\Saeed\Autodesk\Softimage_2013_SP1\Addons\MaSs\Application\Plugins\MaSsXML.py", line 234, in GenerateXMLScene
#     root.append(GenerateMeshSegment(mesh, shouldExport, exportPath, exportType))
#   File "C:\Users\Saeed\Autodesk\Softimage_2013_SP1\Addons\MaSs\Application\Plugins\MaSsXML.py", line 2854, in GenerateMeshSegment
#     MeshShouldExport(mesh, exportPath, exportType)
#   File "C:\Users\Saeed\Autodesk\Softimage_2013_SP1\Addons\MaSs\Application\Plugins\MaSsXML.py", line 2734, in MeshShouldExport
#     ap.ExportPly(True, mesh, exportPath, mesh.FullName + ".ply")
#   File "C:\Python27\lib\site-packages\win32com\client\dynamic.py", line 516, in __getattr__
#     raise AttributeError("%s.%s" % (self._username_, attr))
# AttributeError: <unknown>.ExportPly
#  - [line 2045 in C:\Users\Saeed\Autodesk\Softimage_2013_SP1\Addons\MaSs\Application\Plugins\MaSsPlugin.py]
# ERROR : Property Page Script Logic Error (Python ActiveX Scripting Engine)
# ERROR :    [2043] oProp.Parameters("maxPasses").Value, oProp.Parameters("bidirectional").Value, oProp.Parameters("luminanceSamples").Value, oProp.Parameters("twoStage").Value, oProp.Parameters("pLarge").Value,
# ERROR :    [2044] oProp.Parameters("bidirectionalMutation").Value, oProp.Parameters("lensPerturbation").Value, oProp.Parameters("multiChainPerturbation").Value, oProp.Parameters("causticPerturbation").Value, oProp.Parameters("manifoldPerturbation").Value, oProp.Parameters("lambda").Value,
# ERROR :   >[2045] oProp.Parameters("numChains").Value, oProp.Parameters("maxChains").Value, oProp.Parameters("chainLength").Value, oProp.Parameters("bruteForce").Value, oProp.Parameters("granularityP").Value, oProp.Parameters("shadowMapResolution").Value,
# ERROR :    [2046] oProp.Parameters("clamping").Value, oProp.Parameters("useColorAttribute").Value, frameNumber, oProp.Parameters("lastTime").Value))
# ERROR :    [2047] 	file.close()
# ERROR :    [2048] 
# ERROR : 	Traceback (most recent call last):
#   File "<Script Block 2>", line 1944, in MaSs_Render_OnClicked
#     ActOneFrame(int(frame))
#   File "<Script Block 2>", line 1948, in ActOneFrame
#     scenePath = ExportXML(f, oProp)
#   File "<Script Block 2>", line 2046, in ExportXML
#     oProp.Parameters("clamping").Value, oProp.Parameters("useColorAttribute").Value, frameNumber, oProp.Parameters("lastTime").Value))
#   File "C:\Users\Saeed\Autodesk\Softimage_2013_SP1\Addons\MaSs\Application\Plugins\MaSsXML.py", line 234, in GenerateXMLScene
#     root.append(GenerateMeshSegment(mesh, shouldExport, exportPath, exportType))
#   File "C:\Users\Saeed\Autodesk\Softimage_2013_SP1\Addons\MaSs\Application\Plugins\MaSsXML.py", line 2854, in GenerateMeshSegment
#     MeshShouldExport(mesh, exportPath, exportType)
#   File "C:\Users\Saeed\Autodesk\Softimage_2013_SP1\Addons\MaSs\Application\Plugins\MaSsXML.py", line 2734, in MeshShouldExport
#     ap.ExportPly(True, mesh, exportPath, mesh.FullName + ".ply")
#   File "C:\Python27\lib\site-packages\win32com\client\dynamic.py", line 516, in __getattr__
#     raise AttributeError("%s.%s" % (self._username_, attr))
# AttributeError: <unknown>.ExportPly
# 

It seems export dll file compiled for higher version.
si.png
si.png (7.93 KiB) Viewed 2426 times

Angel 07
Posts: 30
Joined: 16 Jan 2011, 13:59

Re: Another Softimage to Mitsuba exporter

Post by Angel 07 » 04 Apr 2015, 15:38

This version should work: https://dl.dropboxusercontent.com/u/114 ... 2.xsiaddon

There are some errors and XSI crushes (because of some differences in API), when I tried to use the plugin in SI 2013. But this version works correctly.

User avatar
nDman
Posts: 55
Joined: 11 Jan 2013, 10:48

Re: Another Softimage to Mitsuba exporter

Post by nDman » 05 Apr 2015, 15:52

Angel 07 wrote:This version should work: https://dl.dropboxusercontent.com/u/114 ... 2.xsiaddon

There are some errors and XSI crushes (because of some differences in API), when I tried to use the plugin in SI 2013. But this version works correctly.
Cool, thanks for this. It works partially. It exports correctly and i can open and render the scene file by Mitsuba GUI program.
But inside SI it won't render and it stays in Rendering... state.

Sorry, i just reporting problems. If it's time consuming to make it work on SI-2013, forget about it ;) I will use Mitsuba GUI to render :)
s1.png

Angel 07
Posts: 30
Joined: 16 Jan 2011, 13:59

Re: Another Softimage to Mitsuba exporter

Post by Angel 07 » 09 Apr 2015, 16:24

I did some tests, and it seems that the problem in external Python. I have Python 2.7 in my system, and when I tried to use it in SI2013 some errors appear during the export process. But with built-in SI2013 Python export works perfect. When I tried to use Python from SI2015 as external Python for SI2013 all works correct. So, you can try to use the Python distributive from this link: https://dl.dropboxusercontent.com/u/114 ... SI2015.zip

This is not default Python folder from SI2015, but additionally it contains only PyQt4 and Gear modules.

Post Reply

Who is online

Users browsing this forum: No registered users and 46 guests