Maxwell Render integration for Blender (different one)

update 0.4.0

heavy refactoring
- all property groups moved to one single on each object named ‘maxwell_render’, they are no longer scattered around

added mxs reference viewport preview
- extra tab in 3d view > properties panel (N key), tab “Maxwell MXS Reference Object”)
- referenced mxs is loaded and read for vertices. then cached until blender is closed. if you changed the mxs, there is an option to read mxs upon each draw enabling
- it slows blender, it is drawn with python, so better to use it only when needed
- style is taken from user theme, but can be modified by checking “Show Options”

  • one known bug: if you enable drawing, then load different blend file, blender will crash

EDIT: one more thing, it is not backward compatible. extensions and modifers will lost their settings and will be reset to default. i might write some small script to update scenes saved with 0.3.9 if somebody will feel totally desperate… :slight_smile:

EDIT2: there is another bug in mxs reference drawing, don’t enable it when mxs is missing. will fix it soon, but seems like blender error reporting works a bit different that i thought, so it will require large rewrite :frowning:

Thanks a lot carbon2 for this amazing job to Maxwell renderer!
So difficult to code! Impressive work!
Congratulations.

Thanks Carbon!

Wow… wooow! Thanks for all your effort.

fixed, and also another bug when same mxs was used more than once, it was drawn only on one place

and this is also fixed now…

update: 0.4.1

  • procedural textures (but note, there is no preview yet, so better to edit them in mxed, but then you can load it back from mxm and save preset for future use…)
  • faster reading of mxs references (a few optimizations, especially on osx)

cheers
j.

Thanks a lot @carbon2 I am excited to try it…:smiley:

another update:
0.4.2 movement and deformation blur, faster mesh export

some notes: movement/deformation blur can be disabled in globals panel (disabled as default) and there can be set global number of substeps and shutter offset. then per object you can enable/disable movement and/or deformation and set custom number of substeps (one number for both).


the more substeps, the longer export. now it is quite slow. can be optimized to be much faster, but it requires rather large rewrite, which, well, i will get to it in future. currently the time line is moved for each object and each substep, so if you have 100 objects and 10 substeps, timeline will be moved 100*10 times and blender will recalculate scene for each of this steps, this is why it is going to be slow. but if you need motion blur, it is possible now.

also, my work is 100% still images, so i have no experience in this, so if you find anything not correct, please let me know.

thanks
j.

EDIT: ok, there is slight problem with windows/linux, working on it
EDIT2: as per usual, windows version fixed a bit later

and camera panel is changed too…


Thank you so much for your work Carbon!
I know we are boring with it but maybe there is a chance to see FIRE working with your exporter?
I know it was not possible in the past for some reason but maybe one day? :slight_smile:

All the best and thanks Carbon!

it is possible, but there is still much left to do before it… definitely one of first thing after basics are done.

meanwhile, new version:
0.4.3 critical fix: smooth faces export, experimental feature: material preview rendering (currently Mac OS X only)

notes:

  • previous version completely missed smooth faces on meshes
  • material preview rendering is still a bit roughly implemented and osx only, it is disabled by default. if you click too much around and change objects, sometimes more instances of maxwell are launched and for some reason can’t be killed before they finish rendering… with low sl it is not much issue because they finish fast. but they still eat cpu.

Thank you very much for your work. I installed the addon, saved the file and ran the render with the default settings.
After starting I get the error message. How can I fix it?

------------------------------ MXSExport ------------------------------ > pymaxwell version >= (3, 2, 0, 0)
> exporting mxs: ‘C: mp est_maxwell.mxs’
* MXSWriter
* creating new scene…
> collecting objects…
> writing materials:
> ‘Material’ > unused material, skipping…
> ‘Material.001’ > ‘CUSTOM’
> writing cameras:
> ‘Camera’
> writing empties:
> writing meshes:
> ‘Cube’
> writing instance bases:
> writing instances:
> writing duplicates:
> writing mxs references:
> writing particles:
> writing volumetrics:
> writing object modifiers:
> writing environment…
> writing custom alphas:
> writing scene properties…
> Traceback (most recent call last):
File “C:\Users\user\AppData\Roaming\Blender Foundation\Blender\2.76\scripts\addons\blendmaxwell\engine.py”, line 824, in _update
self._render_scene(scene)
File “C:\Users\user\AppData\Roaming\Blender Foundation\Blender\2.76\scripts\addons\blendmaxwell\engine.py”, line 898, in _render_scene
ex = export.MXSExport(mxs_path=p, engine=self, )
File “C:\Users\user\AppData\Roaming\Blender Foundation\Blender\2.76\scripts\addons\blendmaxwell\export.py”, line 96, in init
self._export()
File “C:\Users\user\AppData\Roaming\Blender Foundation\Blender\2.76\scripts\addons\blendmaxwell\export.py”, line 1367, in _export
self._write(o)
File “C:\Users\user\AppData\Roaming\Blender Foundation\Blender\2.76\scripts\addons\blendmaxwell\export.py”, line 1569, in _write
other, )
File “C:\Users\user\AppData\Roaming\Blender Foundation\Blender\2.76\scripts\addons\blendmaxwell\mxs.py”, line 1970, in parameters
if(materials[“materials_default_material”] != “”):
KeyError: ‘materials_default_material’

> export completed in 0:00:00.112006

Blender 2.76b. Maxwell render 3.2.1.0

hello
is the new update work with blender 2.77 rc ?

hi, it was a typo, and it is fixed already. just download it again and update addon.

it should in theory, at least as it is now in repository and on osx. i’ve commited a few fixes related to blender api changes. pymaxwell is not currently available for python 3.5 (will be in next Maxwell release as i was told) so on windows/linux it won’t work i guess…

currently i am working on material preview and viewport render and i will wait for new pymaxwell being available from next limit before any update announcement.

thanks
yes it didn’t work on windows

Hi carbon2,

I have this traceback with new Blender 2.77:

 Traceback (most recent call last):  File "/usr/share/blender/2.77/scripts/modules/addon_utils.py", line 330, in enable
    mod = __import__(module_name)
  File "/home/patrinux/.config/blender/2.77/scripts/addons/blendmaxwell/__init__.py", line 53, in <module>
    from . import engine
  File "/home/patrinux/.config/blender/2.77/scripts/addons/blendmaxwell/engine.py", line 35, in <module>
    import numpy as np
  File "/home/patrinux/.config/blender/2.77/scripts/modules/numpy/__init__.py", line 170, in <module>
    from . import add_newdocs
  File "/home/patrinux/.config/blender/2.77/scripts/modules/numpy/add_newdocs.py", line 13, in <module>
    from numpy.lib import add_newdoc
  File "/home/patrinux/.config/blender/2.77/scripts/modules/numpy/lib/__init__.py", line 8, in <module>
    from .type_check import *
  File "/home/patrinux/.config/blender/2.77/scripts/modules/numpy/lib/type_check.py", line 11, in <module>
    import numpy.core.numeric as _nx
  File "/home/patrinux/.config/blender/2.77/scripts/modules/numpy/core/__init__.py", line 6, in <module>
    from . import multiarray
ImportError: cannot import name 'multiarray'

Take care to you!
Friendly.
Spirou4D

looks like old numpy is present. in blender 2.77 is python 3.5, until now it was 3.4 so if the files are in your .config directory i guess you let blender automatically copy it from 2.76 directory and therefore you get older/compiled with 3.4. blender ships with numpy, so i think you should just remove numpy from .config/modules…
but, i think you won’t be able to get pymaxwell working since there is no python 3.5 version in current maxwell. unless you download beta maxwell (3.2.1.2), linux version should have python 3.5 pymaxwell.
i’ll wait for osx version to test/fix first, i have commited a few changes because in 2.77 there were some api changes, but haven’t tested it much yet…