Maxwell Render integration for Blender (different one)

Hey, so this is from exporting the shell, same as before:


Last login: Fri Feb 10 19:12:17 on ttys000
Matthews-iMac:~ Quaggers$ /Applications/blender.app/Contents/MacOS/blender ; exit;
Read new prefs: /Users/Quaggers/Library/Application Support/Blender/2.78/config/userpref.blend
found bundled python: /Applications/blender.app/Contents/MacOS/…/Resources/2.78/python
ndof: using SpaceNavigator
read blend: /Users/Quaggers/Documents/Blender/shell.blend
------------------------------ MXSExport ------------------------------
> pymaxwell version >= (3, 2, 0, 0)
> exporting mxs: ‘/Users/Quaggers/Desktop/shell.mxs’
> using temp directory at ‘/Users/Quaggers/Documents/Blender/shell-tmp-export_scene-b6c409be-efc6-11e6-a30c-28f07641ad60’
> collecting objects…
> writing materials:
> ‘Material’ > ‘OPAQUE’
> writing cameras:
> ‘Camera’
> writing empties:
> writing meshes:
> ‘Circle’
> writing instance bases:
> writing instances:
> writing duplicates:
> writing mxs references:
> writing particles:
> writing volumetrics:
> writing object modifiers:
> writing environment…
> using Sun lamp object: ‘Sun’
> writing custom alphas:
> writing scene properties…
/Users/Quaggers/Desktop/.mxi export:2239
> writing serialized scene data…
> running pymaxwell…
> command:
/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5 /Users/Quaggers/Documents/Blender/shell-tmp-export_scene-b6c409be-efc6-11e6-a30c-28f07641ad60/shell-b6c409be-efc6-11e6-a30c-28f07641ad60.py ‘/Applications/Maxwell 3/Libs/pymaxwell/python3.5’ ‘/Users/Quaggers/Library/Application Support/Blender/2.78/scripts/addons/blendmaxwell/log.txt’ /Users/Quaggers/Documents/Blender/shell-tmp-export_scene-b6c409be-efc6-11e6-a30c-28f07641ad60/shell-b6c409be-efc6-11e6-a30c-28f07641ad60.json /Users/Quaggers/Desktop/shell.mxs
> loading data…
> creating new scene…
> creating objects:
> 80%/Users/Quaggers/Desktop/.mxi write_mxs:1660
/Users/Quaggers/Desktop/.mxi write_mxs:1748
> 100%
> setting object hierarchy…
> saving scene…
> done.
> removing intermediates…
> mxs saved in: /Users/Quaggers/Desktop/shell.mxs

Blender quit
logout
Saving session…
…copying shared history…
…saving history…truncating history files…
…completed.

[Process completed]


You may be interested to know that with the image and mxi output set to my desktop, nothing appears, only the mxs. Let me know if you want more testing done…

Matt

eh, can you use the older file? i meant the file which was throwing errors. also, no mxi is ok, it need to rendered first :slight_smile:
EDIT: mxi path is for maxwell where save rendered image as mxi, so you can resume render later, and it is 32bit image, which is quite useful

Yeah sorry I mean AFTER rendering, there is no mxi or png anywhere, maybe this is a setting for Maxwell I can’t remember, but I thought it might be relevant…

So here’s the one with errors, sorry bout that:


Last login: Fri Feb 10 19:40:54 on ttys000
Matthews-iMac:~ Quaggers$ /Applications/blender.app/Contents/MacOS/blender ; exit;
Read new prefs: /Users/Quaggers/Library/Application Support/Blender/2.78/config/userpref.blend
found bundled python: /Applications/blender.app/Contents/MacOS/…/Resources/2.78/python
ndof: using SpaceNavigator
read blend: /Users/Quaggers/Documents/Blender/shell.blend
------------------------------ MXSExport ------------------------------
> pymaxwell version >= (3, 2, 0, 0)
> exporting mxs: ‘/Users/Quaggers/Desktop/shell.mxs’
> using temp directory at ‘/Users/Quaggers/Documents/Blender/shell-tmp-export_scene-fd8fbcdc-f041-11e6-8cbc-28f07641ad60’
> collecting objects…
> writing materials:
> ‘Material’ > ‘OPAQUE’
> writing cameras:
> ‘Camera’
> writing empties:
> writing meshes:
> ‘Circle’
> writing instance bases:
> writing instances:
> writing duplicates:
> writing mxs references:
> writing particles:
> writing volumetrics:
> writing object modifiers:
> writing environment…
> using Sun lamp object: ‘Sun’
> writing custom alphas:
> writing scene properties…
> writing serialized scene data…
> running pymaxwell…
> command:
/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5 /Users/Quaggers/Documents/Blender/shell-tmp-export_scene-fd8fbcdc-f041-11e6-8cbc-28f07641ad60/shell-fd8fbcdc-f041-11e6-8cbc-28f07641ad60.py ‘/Applications/Maxwell 3/Libs/pymaxwell/python3.5’ ‘/Users/Quaggers/Library/Application Support/Blender/2.78/scripts/addons/blendmaxwell/log.txt’ /Users/Quaggers/Documents/Blender/shell-tmp-export_scene-fd8fbcdc-f041-11e6-8cbc-28f07641ad60/shell-fd8fbcdc-f041-11e6-8cbc-28f07641ad60.json /Users/Quaggers/Desktop/shell.mxs
> loading data…
> creating new scene…
> creating objects:
> 80%> Traceback (most recent call last):
File “/Users/Quaggers/Documents/Blender/shell-tmp-export_scene-fd8fbcdc-f041-11e6-8cbc-28f07641ad60/shell-fd8fbcdc-f041-11e6-8cbc-28f07641ad60.py”, line 2702, in <module>
main(args)
File “/Users/Quaggers/Documents/Blender/shell-tmp-export_scene-fd8fbcdc-f041-11e6-8cbc-28f07641ad60/shell-fd8fbcdc-f041-11e6-8cbc-28f07641ad60.py”, line 2561, in main
scene(d, mxs)
File “/Users/Quaggers/Documents/Blender/shell-tmp-export_scene-fd8fbcdc-f041-11e6-8cbc-28f07641ad60/shell-fd8fbcdc-f041-11e6-8cbc-28f07641ad60.py”, line 1660, in scene
h, t = os.path.split(d[“output_mxi”]); print(d[“output_mxi”], ‘write_mxs:1660’)
KeyError: ‘output_mxi’

ERROR: > error in /Users/Quaggers/Documents/Blender/shell-tmp-export_scene-fd8fbcdc-f041-11e6-8cbc-28f07641ad60/shell-fd8fbcdc-f041-11e6-8cbc-28f07641ad60.py
Traceback (most recent call last):
File “/Users/Quaggers/Library/Application Support/Blender/2.78/scripts/addons/blendmaxwell/ops.py”, line 128, in execute
ex = export.MXSExport(mxs_path=p, )
File “/Users/Quaggers/Library/Application Support/Blender/2.78/scripts/addons/blendmaxwell/export.py”, line 212, in init
self._finish()
File “/Users/Quaggers/Library/Application Support/Blender/2.78/scripts/addons/blendmaxwell/export.py”, line 1894, in _finish
self._pymaxwell()
File “/Users/Quaggers/Library/Application Support/Blender/2.78/scripts/addons/blendmaxwell/export.py”, line 1939, in _pymaxwell
system.python34_run_script_helper(self.script_path, self.scene_data_path, self.mxs_path, append, self.use_wireframe, )
File “/Users/Quaggers/Library/Application Support/Blender/2.78/scripts/addons/blendmaxwell/system.py”, line 466, in python34_run_script_helper
raise Exception(“error in {0}”.format(script_path))
Exception: error in /Users/Quaggers/Documents/Blender/shell-tmp-export_scene-fd8fbcdc-f041-11e6-8cbc-28f07641ad60/shell-fd8fbcdc-f041-11e6-8cbc-28f07641ad60.py

location: <unknown location>:-1

location: <unknown location>:-1


No mention of sketchup any more, it is still installed though :confused:

Hello
Log in to the site and answer five weekly polls
Collect 5,000 points to win 50 dollars
Trusted Sitehttps ://mena.yougov.com/ar/refer/To73isiF26DRmC_ig5qKkw/

hi, i think i’ve found the problem (and was able to replicate your errors), you are using File>Export>Maxwell Render Scene, am i right? because that way no paths are set automatically. i never tested that option much, i always hit F12 to export mxs, and seems like everybody else is doing it too and nobody noticed the bug. anyway, it is fixed now and on github. just download and reinstall blendmaxwell.

also, i noticed that in first log (the one in which export was successful), there is no filename in your path, ie ‘/Users/Quaggers/Desktop/.mxi’ that way (if maxwell allows this) the mxi is saved, but with name ‘.mxi’ which by default is hidden file for Finder (all files beginning with dot are hidden in Finder), you have to write some filename like ‘render.mxi’ or so

Yeah that would make complete sense about the hidden MXI, because if I restarted a render it would ask if I wanted to overwrite it… And I had no idea about the F12 button, good to know :yes:

Well if we’re all done debugging I’m gonna attempt a clean reinstall of my mac just for good measure…

Thanks for all your work carbon I’m getting some great results now with Maxwell…

I am getting this error if i try to active the addon in the user settings:


Traceback (most recent call last):
  File "D:\Programme\blender-2.78c-windows64\2.78\scripts\modules\addon_utils.py", line 330, in enable
    mod = __import__(module_name)
  File "C:\Users\Dan\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\blendmaxwell-master\__init__.py", line 48, in &lt;module&gt;
    from . import system
  File "C:\Users\Dan\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\blendmaxwell-master\system.py", line 30, in &lt;module&gt;
    from . import mxs
  File "C:\Users\Dan\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\blendmaxwell-master\mxs.py", line 56, in &lt;module&gt;
    pp = os.path.abspath(os.path.join(mp, 'python', 'pymaxwell', 'python3.5'))
  File "D:\Programme\blender-2.78c-windows64\2.78\python\lib
tpath.py", line 113, in join
    genericpath._check_arg_types('join', path, *paths)
  File "D:\Programme\blender-2.78c-windows64\2.78\python\lib\genericpath.py", line 143, in _check_arg_types
    (funcname, s.__class__.__name__)) from None
TypeError: join() argument must be str or bytes, not 'NoneType'

looks like pymaxwell is not wehre it is expected, would you hit winkey+R, type ‘cmd’ (without quotes) and then type

echo %MAXWELL3_ROOT%

and enter, note the output and find the path in explorer, shoudl be something like program files/nextlimit/maxwell 3 (not sure, now, sitting on mac) and when you find the directory go ‘python/pymaxwell/python3.5’ and inside should be some files, some dll (not sure) and pymaxwell.py, if something alog is missing, like python3.5 directory, or no output in cmd you should reinstall maxwell 3, preferably latest version.
hope this is all ok, i am no regular windows user and i am writing from top of my head

I am using Maxwell 4.0.18, is that a problem? The pymaxwell4 folder is located at:

…\Maxwell Studio 4\python\pymaxwell4\python3.5\pymaxwell4.py

that’s the problem, blendmaxwell is maxwell 3 only, compatible with 3.2.1.3 and later

Hi Carbon2,

I just wanted to know if you have any plans to update your great plugin to make it work with V4.
Also if you need anything from Next Limit, just let me know.

Best regards,
Fernando

Hi Carbon
i modify the path in your script and i copy pymaxwell folder from maxwell v3 to v4 folder and it work fine with blender 2.79 and maxwell 4.1
except extensions : hair ; grass …etc
always i get this message about ‘getExtensionData’:

Traceback (most recent call last):
File “C:\Users\arch\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\blendmaxwell-master\engine.py”, line 820, in _update
self._render_scene(scene)
File “C:\Users\arch\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\blendmaxwell-master\engine.py”, line 894, in _render_scene
ex = export.MXSExport(mxs_path=p, engine=self, )
File “C:\Users\arch\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\blendmaxwell-master\export.py”, line 211, in init
self._export()
File “C:\Users\arch\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\blendmaxwell-master\export.py”, line 1375, in _export
self._write(o)
File “C:\Users\arch\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\blendmaxwell-master\export.py”, line 1853, in _write
self.mxs.mod_grass(o.m_object, properties, o.m_material, o.m_backface_material, )
File “C:\Users\arch\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\blendmaxwell-master\mxs.py”, line 2556, in mod_grass
p = e.getExtensionData()
AttributeError: ‘NoneType’ object has no attribute ‘getExtensionData’

it work now fine : windows 10 64bits / maxwell 4.1 / blender 2.79
(i don’t install Maxwell 3 ; files copied from other disk where windows 7 installed)

  • replace MAXWELL3 by MAXWELL4 in all scripts.
  • copy pymaxwell path from ‘Maxwell 3/python’ to ‘Maxwell Render 4/python’.
  • copy ’ mxcommon_64.dll ’ from ‘Maxwell 3’ to ‘Maxwell Render 4’.
  • create folder …/Next Limit/Maxwell 3 ; and inside it add the folder extensions from original Maxwell 3 folder.
  • add this new folder ’ Maxwell 3’ to environment variables
    if you have maxwell 3 installed you don’t need this last two steps.
    and it work fine ; except of course the new V4 features

is the plugin export vdb file ?

hi Tella
unfortunately no at the moment. i almost stopped all 3d commercial work and focusing on 2d retouching/grading. that’s why i didn’t upgrade to v4… it might change, but i can’t promiseanything…

so v4 is compatible with v3 files, good news. on osx it won’t be that easy…
and viewport rendering works as well?

no, only Constant and Noise 3d volumes. add an empty to scene (the best is cube shaped), scale as you want, turn on in object buttons, result box will be as large as empty

yes sadly vdb don’t work .
yes V4 open v3 files ; and the plugin export mxs file but viewport rendering inside blender don’t work or i miss something.
is there anyway to make the scripts detect pymaxwell4 ?

viewport render has its settings in 3d view properties (N panel) where you also enable it, then switch viewport to Rendered. it might work, because it exports scene a call maxwell to render in background in the same way you do it manually, the difference is it only renders viewport resolution and then draw result on screen

swapping to pymaxwell4 module would be easy, but i am sure it won’t be compatible. pymaxwell api changed a bit also between minor versions and this is major version change…

thanks i find it and it work fine ; sometimes blender closed if i create a material and render viewport. or after two minutes but it is not very important.
i don’t know about plugins development but i create an app and it work when i switch from pymaxwell4 to pymaxwell3; i just remove the new features like denoiser .
when i replace pymaxwell(3) by (4) in python folder the plugin don’t work with error message : no module named pymaxwell ; i just try to see if it work or not.