Maxwell Render integration for Blender (different one)

Hello,
A little while ago I decided to complete what started as a simple mesh exporter into a fully featured addon. Works on Mac OS X, Windows and Linux. Please read installation instructions.

List of features (almost everything i think):

  • Works on Mac OS X, Linux and Windows
  • Compatible with Maxwell Render 3.2 and Blender 2.77
  • UI as close to Maxwell Studio as possible
  • All renderable geometry (except Metaballs)
  • Object hierarchy (not renderable objects are removed unless they have renderable child objects)
  • Mesh objects using the same mesh data (and renderable Curves) are exported as instances (optional)
  • MXS references with viewport preview
  • Dupli verts, faces and group
  • Multiple UV channels
  • Custom Material creation and editing with inside Blender or with Mxed
  • Save/Load custom materials from/into Blender material editor (extension materials support will be added)
  • Material assignment (including backface materials) and multiple materials per object
  • Extension Materials creation and editing inside Blender
  • Maxwell procedural textures
  • Material preview rendering
  • Viewport rendering (not interactive)
  • Cameras
  • Render parameters
  • All render channels including Custom Alphas
  • Environment parameters (Sun can be optionally set by Sun lamp)
  • Object parameters
  • Export objects and cameras for movement and deformation blur
  • Maxwell Extensions: Particles, Grass, Hair, Scatter, Subdivision, Sea, Cloner, Volumetrics
  • Export Subdivision modifiers if their type is Catmull-Clark and they are at the end of modifier stack on regular mesh objects (optional)
  • Scene import (objects, emitters, cameras and sun selectively)

changelog:

  • 0.4.5 support for vertex-per-face normals, mesh auto-smooth, split normals etc., added text overlay, disabled subdivision modifier until fixed
  • 0.4.4 material preview and viewport (not interactive) rendering, mxs import with mxs references
  • 0.4.3 critical fix: smooth faces export, experimental feature: material preview rendering (currently Mac OS X only)
  • 0.4.2 movement and deformation blur, faster mesh export
  • 0.4.1 procedural textures, faster reading of mxs references
  • 0.4.0 heavy refactoring, added mxs reference viewport preview
  • 0.3.9 colors exported in 32 bits and as shown in blender (gamma correction), added grass modifier presets, added displacement in extension materials, added stereo cameras (maxwell 3.2), added realflow particles bin export operator (file > export menu), updated material presets (maxwell 3.2.1.0), fixed cleaning of mesh datablocks created during export, fixed exporting of fake user materials, fixed export of particles on meshes without polygons (and a lot of small fixes and ui tweaks)
  • 0.3.8 custom alphas for objects and materials, many ui improvements, particle object/group instances now exports correctly when base objects are hidden, addon preferences for automatic type selection for new material, environment and particles, changed preset location, setting camera to ortho now changes viewport to ortho
  • 0.3.7 custom material editor, custom material import/export
  • 0.3.6 added: export particle uvs, camera lock exposure, choosing external materials with mxed in browser mode, choose scene for auto preview in mxed, fixed: import mxs: object transformation
  • 0.3.5 particle object/group instances, quick setting object properties/object id to multiple objects, blocked emitters, many fixes (reading/drawing material previews, missing cloner objects, hair uvs, …)
  • 0.3.4 hair with children particles root uvs (requires blender 2.76), wire export faster and with smaller files, fixes here and there
  • 0.3.3 simplified installation procedure on Mac OS X, pymaxwell is now imported directly from /Applications/Maxwell 3, also fixed some bugs…
  • 0.3.2 Maxwell 3.2 update, includes majority of new features: material priority, saving to psd, reflection and refraction channels, reflectance channel, scatter and grass updates. also wireframe and auto-subdivision export is restored, added basic progress reporting, hair uvs, hair extension material and many more small fixes and tweaks
  • 0.3.1 last version working with Maxwell 3.1: ddbad692a25c6e6e72d11092d8f063f6ed1d048e
  • 0.3.0 refactored exporter part, added: hair uvs, curves instancing, material global properties, fixed: object transformations when opened and saved in Studio
  • 0.2.4 added: automatic subdivision modifiers export to speed things up
  • 0.2.3 added: mxs export menu operator, quad export when using subdivision modifier, 2.75 compatibility
  • 0.2.2 added: mxs import (objects, emitters, cameras and sun selectively), save extension materials to mxm, embed particles in mxs (saving of external .bin files is now optional)
  • 0.2.1 added: extension materials creation and editing inside blender
  • 0.2.0 added: much faster large mesh export on Mac OS X, Extra Sampling panel, Volumetrics extension (constant and noise 3d), external particle bin works with animation export
  • 0.1.9 added: MXS References, Windows installation simplified
  • 0.1.8 added: Linux and Windows support, cloner extension, lots of refactoring
  • 0.1.7 added: presets, texture panel, basic material preview, RFBin export with size per particle, lots of refactoring, Linux and Windows ports are working without extensions
  • 0.1.6 added: maxwell hair, subdivision, scatter and particles export as realflow bin, fixed: render shortcuts, ui spaceing
  • 0.1.5 added: maxwell grass modifier, incremental export, minor ui tweaks and additions, launch multiple instances of maxwell and studio, fixed: material placeholders on triangle groups, maxwell particles transformation, error reporting
  • 0.1.4 added: render layers panel, fixed: path handling, instance bases on hidden layers and many more
  • 0.1.3 first release

known issues:

  • Due to changes in Blender’s triangulation operator, Maxwell Subdivision modifier is disabled.

And now, without any further delays, here it is:
https://github.com/uhlik/blendmaxwell

j.

This is a great addon but it is not working for me! I followed your installation instructions, downloaded and installed Python 3.4.1 - copied maxwell.py files but when I choose the Maxwell Render from the pulldown menu inside Blender 2.74 render button disappears and export doesn’t do anything. Material creation opens Mxed, if this is of any help.
I have MacosX 10.7.5

hi, can you do some debugging? open terminal window (/Applications/Utilities/Terminal.app) drag and drop blender application to it, then delete extra space at the end of the line and write after right after “/Contents/MacOS/blender”. it should look like this

/Applications/Blender/blender-2.74-rc1-OSX_10.6-x86_64/blender-2.74-rc1.app/Contents/MacOS/blender

but it depends where you have blender installed. hit enter and blender should start. then try to export some scene and paste me output from terminal… maybe i forgot something from my setup…
j.

Hi carbon2,

I repost here what I previously reported on the B-Maxwell thread:

«Well, I installed this new addon and it doesn’t work (OSX 10.9.5), it seems to make a mess with paths (note how it searches for Application into Library and Support into user home):
(EDIT: for not Mac users, it should search for ‘/Users/Pi/Library/Application\Support/Blender/2.74/scripts/addons/render_maxwell/log.txt’)

usage: maxwell_new_addon_prova-4e5f1442-d160-11e4-be9b-0023dfff773a.py
       [-h] [-a] [-w] [-i] log_file scene_data_path result_path
maxwell_new_addon_prova-4e5f1442-d160-11e4-be9b-0023dfff773a.py: error: unrecognized arguments:
/Users/Pi/Desktop/RENDERINGS/maxwell_new_addon_prova.mxs
The files /Users/Pi/Library/Application and /Users/Pi/Support/Blender/2.74/scripts/addons/render_maxwell/log.txt do not exist. The file /Users/Pi/Desktop/RENDERINGS/maxwell_new_addon_prova.mxs does not exist.

As for the current state of implementation, it lacks of Render Layers (I don’t know how it should work), no embedded Material editor, nor Texture editor (and this breaks also textures setting for displace modifier, particles, etc.), it has no blender particles (only imported .bin) and no Hair. »

(The underlined text is to your attention).

paolo

hi paolo, path error should be fixed now (forgot to handle spaces in paths, in my setup i have a symbolic link somewhere else thus no spaces), just reinstall addon from repository.
for it breaking displace and particles, can you send me a blend example?

Thank you carbon2, I’m going to reinstall it.

Maybe I was not clear about textures (sorry for my English), what I was meaning is that when the addon is active the Texture panel is empty, without the possibility to add any texture for using on modifiers or particles, or other.

paolo

ah ok, so i was too enthusiastic in removing default panels, this should be an easy fix :slight_smile:

New version now exports without errors! But veeery slowly… maybe 5~6 times slower than B-Maxwell.

Just this error persists:

The files /Users/Pi/Library/Application and /Users/Pi/Support/Blender/2.74/scripts/addons/render_maxwell-master/log.txt do not exist.

Sadly for further testing I have to redo all materials in my scenes because so far I have created almost all materials in the scenes themselves with B-M (no mxm), so I need a little free time for testing deeper.

Thank you,
paolo

if you reinstall once more, this error will be gone as well… i bet you have checked “Open Log”
and yes, it is slow, i know…
later i will have a look at the texture buttons, but it will be only usable for everything else but actual texturing :slight_smile:
until that, you can switch back to blender internal, do your displacement and then switch back…
j.

This is what Terminal writes:
ioannas-Mac-Pro-4:~ ioannapa$ /Applications/Blender_274/blender.app/Contents/MacOS/blender
ndof: 3Dx driver not found
Read new prefs: /Users/ioannapa/Library/Application Support/Blender/2.74/config/userpref.blend
found bundled python: /Applications/Blender_274/blender.app/Contents/MacOS/…/Resources/2.74/python
read blend: /Volumes/NEWFILES/CLIPTESTS/testParticle/testmax.blend
Traceback (most recent call last):
File “/Users/ioannapa/Library/Application Support/Blender/2.74/scripts/addons/render_maxwell-master/engine.py”, line 42, in render
self.render_scene(scene)
File “/Users/ioannapa/Library/Application Support/Blender/2.74/scripts/addons/render_maxwell-master/engine.py”, line 110, in render_scene
app.open_mxs_in_studio(ex.mxs_path)
AttributeError: ‘MXSExport’ object has no attribute ‘mxs_path’

location: /Applications/Blender_274/blender.app/Contents/MacOS/…/Resources/2.74/scripts/modules/bpy/ops.py:189

location: /Applications/Blender_274/blender.app/Contents/MacOS/…/Resources/2.74/scripts/modules/bpy/ops.py:189

The only way for me to help is by reporting issues, so here I am.

I am not able to export anything but the Layer 1, the Render Layers panel lacks of the proper settings and whichever layer is visible in the viewport doesn’t matter.

Overwrite Existing Scene on the Render panel doesn’t work, even if disabled previous scenes are overwritten (the same is with B-Maxwell, I had to change the code myself to make it work).

paolo

hi panosz, if you download addon again and reinstall (only addon itself), this should be already fixed…

hi sourvinos, thanks for testing, different people have different habits, i never came into issues like this… please continue, it is very appreciated

what you mean is, managing what is rendered using render layers and not by turning on and off of layer visibility right? i always use the latter. but this can be implemented. what is not visible in viewport, is not exported, this works for me… can you send me some simple scene to demonstrate the issue?

regarding overwrite, yes, clicking button conforms setting, hitting F12 does not. will fix that
j.

Not sure to understand what you mean with ‘turning on and off of layer visibility’, I can say that visible layers in the viewport doesn’t render, only layer 1 every time, and checking ‘Limit selection to visible’ in the viewport header maxwell freezes after ‘DEBUG: - Preprocessing geometry.’

Here is a simple scene with 3 object on 3 different layers, only layer1 is exported.
untitled.blend (341 KB)

EDIT: I also noticed that exporting unsaved scene via F12 (or menu render command) it raises error in Terminal: “open_mxs_in_studio: file_path must end with .mxs”

If you instead use the button in the Render panel it correctly warns: ‘Save file first’.

paolo

oh, i was quite confused until you edited post :slight_smile:
now i understand it. partly… this button must be active:


then it works as expected, visible layers are exported, hidden not. other question is, what the hell is the button good for… must read manual…

what i am missing is what ‘Limit selection to visible’ has to do with addon and why maxwell is freezing on you… Studio opens it just fine, even with Fire (i mean the broken scene)

meanwhile i fixed F12 issue…

enough for today, time to sleep
j.

To me it is quite counterintuitive and useless, I would rely on Render Layers anyway.

with ‘Limit selection to visible’ I was mistakenly referring just to that button (lock_camera_and_layers) sorry, if I set it active then maxwell freezes… but not every scene actually, I’ll try and investigate.

Too late to say this, anyway, have a good sleep,
paolo

Emitter meshes fail: "ERROR: - object Plane.001 is not an emitter but it has triangles with emitter material "
Simple 4 vertices plane, just an emitter material, as usual; maybe the culprit is that Backface MXM thing?

paolo

this is strange, opening directly in maxwell i can replicate this, open in studio is just fine, fire and render viewport works, resaving scene in studio fixes the error in maxwell… bug in pymaxwell i guess, but first i need to find time to investigate

So no support for Mx 2.7?!

no, sorry, blender 2.74 and maxwell 3.1.0.0