Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The plugin implements a custom material editor, which is very similar in operation to Maxwell's MXED standalone material editor:

 


 


To open the material editor, click Maxwell > Plugin Windows > Material Editor, or the appropriate button in the plugin’s Tools toolbar. The main difference between the two is that while MXED is used to edit Maxwell MXM files, the plugin's material editor is used to edit embedded plugin materials. To create a new material:

  • in the Material Editor’s Options menu, choose New material, New Emitter, or material Wizard.
  • in Scene Manager > materials, right-click and choose New material, New Emitter, Import MXM, or material Wizard.
  • in Database Manager > MXM Browser, choose a folder and drag an MXM file into the scene.

On Materials and Maxwell MXM Files

Firstly, it is important to recognize that there is a difference between an MXM file on your hard disk and a Maxwell material contained in a Rhino file – they are not the same thing, though they are very similar. It is necessary for the plugin to have its own ‘version’ of Maxwell MXM materials, so that it can save them directly inside of Rhino documents. If it did not do so, Maxwell materials could only exist as file paths stored in the document which link to MXM files on your disk. While this is entirely possible to do, and even preferable for some workflows, but it means that in addition to a Rhino file, you also need to bring along any number of physical MXM files with you when you want to transfer a document from one machine to another. Furthermore, it is prone to error, since directory structures most likely will not match from one machine to the next, and this often results in broken MXM links, and material assignments which do not produce any valid Maxwell material during export.

As such, a Maxwell material in the new Maxwell for Rhino plugin may operate in one of two ways: either linking to an MXM file on your machine, or simply embedded in the Rhino document. To control whether a material behaves as Linked or as Embedded, use the MXM Linking section in the material’s top node in the Material Editor:

 


 


In order for a material to use Linked mode, it is necessary that its source MXM path points to a valid MXM file. The border color of the preview image indicates the MXM link state of the material:

Image Modified

Linked (MXM found)

Image Modified

Linked (MXM missing)

Image Modified

Embedded

How does MXM Linking work?

MXM Linking is completely optional; that is, the full definition of the material is always stored (i.e. embedded) in the Rhino document. This ensures that no matter where you open a Rhino document, it will still be able to be rendered in Maxwell the same as it did the last time it was saved. How it works in practice is this:

...

Doing so ensures that all new materials will be created using embedded mode, and that any which were created by importing MXM files will never attempt to update themselves. At any time, it is possible to manually re-load a material’s source MXM file, either by using Material Editor > Options menu > Reload Linked MXM, or by checking the ‘Linked’ checkbox.

Options Menu

The material editor's Options menu contains commands for creating materials, and importing or exporting MXM files. 


CommandFunction
New Material, Emitter, Extension
These simply create a new material and add it to the scene’s material List. New material creates a default grey diffuse material, New Emitter creates a default emitter material, and New Extension creates a material that uses one of Maxwell's Material Assistants.
Import MXMThis prompts you to select an MXM file from your disk. If you do, a new material is created in the scene, and the state of the chosen MXM file is imported into it.
Load MXMThis item will prompt you to choose an MXM file. Once chosen, the file will be loaded into the current material. Any objects this material is assigned to will now be using the newly-loaded MXM data. If Options > material Defaults > MXM Linking is set to Linked, this material will be set to Link the chosen MXM file.
Save As MXMThis item exports the current material as an MXM file for use in Studio or other plugins. If the material currently has no Source MXM path, then it will be set to use the path chosen here (the material will not be set to use Linked MXM mode, but it will be easy to Link the exported MXM later, if desired).
Enable/Disable TexturesThese items are context-sensitive, that is, they will only appear when it makes sense for them to. They simply do what their names imply: enable or disable all textures in the current material.
Reload/Update Linked MXM

These items are also context-sensitive, meaning that they will only appear when the material has a valid linked MXM file. When this is true, that MXM file can either be re-loaded into the material, or the current state of the material can be exported, overwriting the MXM file.

Material Overview Pane

This portion of the Material Editor window is used to control the global state of the material.

ItemDescription
Material NameThis simply shows the name of the current material. When the material’s preview is being refreshed, it shows the current sampling level of the preview-refresh render.
Material PreviewThis shows the preview image for the current material. This may be re-rendered by double-clicking on the image, or by clicking the ‘Refresh Preview’ button in the toolbar below.
Real-time PreviewThis toggles whether or not the material editor automatically refreshes the material preview whenever a parameter changes in the material. It can be desirable to disable this, for example, when Fire is currently rendering; material changes will be instantly viewable in Maxwell Fire, so you may not care so much about seeing them in real-time in the material editor as well, seeing that it will slow down Maxwell Fire to some degree.
Refresh PreviewThis button either starts a preview-refresh, or quits the preview-refresh routine, if it is running in the current material.

Material Snapshots

The material editor's Snapshots feature allows you to store the current state of a material at any time, and to recall that state later on, if desired.

...

It should be noted, the snapshots feature is not designed to be used when a material is using Linked MXM mode. You are not prevented from taking snapshots of such a material, but the feature is rendered somewhat useless, since moving between snapshots causes a re-load of the material, and this in turn causes a re-load of the Source MXM.

Layers Tree

Similar to the tree found in MXED, this control allows you to define the structure of the material. New components are added by right-clicking the desired parent component and choosing what to add (i.e. right-click a Layer to add a BSDF). Child components may be re-ordered under their parent by dragging them from their current position and dropping them on their parent node; this will put them at the top of the list.

...

Additionally, individual components may be dragged back and forth between the Layers tree and the various pages in the Database Manager; this makes it easy to build new materials from predefined components.

Material Editor Pages

Clicking on a node in the layers tree causes the user interface appropriate to the selected node type to be shown in the material editor:

...

For example, it is the 'material' node which is selected in the image above; this will cause the Material Page, described below, to be shown in the right side of the material editor.

Material Page

The parameters in this page apply to the material as a whole. Each material saves its own preview options, so that different MXS preview scenes may be used for different types of materials. The MXS preview scenes listed in the scene drop-down are those found in the Maxwell/preview directory.

...

In addition to specifying individual bump maps in each BSDF layer, it is also possible to supply a bump (or normal) map here which will be used to affect the material as a whole.

  


DispersionThis switch enables the calculation of dispersion. Dispersion is the ‘rainbow’ effect seen when light is split based on its different wavelengths as it passes through refractive materials. Enabling this option can raise render times because of the extra math involved in calculating these wavelength-based refractions.
MatteMaterials which have this switch enabled will cause the background (i.e. Physical Sky, etc.) to show through all geometry where the objects they are assigned to are seen by the camera. This can be useful for creating composite images.
ShadowMaterials which have this switch enabled will have the objects they are assigned to casting shadows when the Shadow channel is rendered (see Output > Render Channels > Shadow).
Material ID ColorThis is the color which will be used for this material when the Material ID channel is rendered.
Custom Alphas
A comma-separated list of Custom Alpha channels, in which objects using this material will be included.

Layer Page

The operation of this page is similar to that of the Layer page in MXED. As a shortcut, the Layer Blending parameter may be set either by using the drop-down list in this page, or by clicking the small A/D toggle in the Material Editor Layers Tree.

BSDF Page

The operation of this page is similar to that of the BSDF page in MXED. When certain parameters in the page are grayed-out, it means that they would have no effect; they will become enabled when other parameters have been changed in such a way as to make them effective.

...

When Reflectance > IOR is set to ‘Measured Data’, all of the parameters in the Reflectance group will be hidden, since they have no effect in this case. Similarly, the min/max Thickness controls in the SubSurface group are only shown when (a) Single Side SSS is enabled, and (b) an SSS Thickness map is assigned and enabled.

Coating Page

The operation of this page is similar to that of the Coating page in MXED. Similar to the BSDF page, the parameters in the Reflectance group will be hidden when Reflectance > IOR is set to ‘Measured Data’, since they have no effect in this case.

Displacement Page

The operation of this page is similar to that of the Displacement page in MXED.

Emitter Page

The operation of this page is similar to that of the Emitter page in MXED.

Texture Editor

To open the Texture Editor, right-click on a texture button:

...

A material has, at most, one texture which is currently selected – which one is selected is changed by left-clicking on the corresponding texture-button (the button will take on a highlighted border). The selected texture will both be shown in the viewport, and in the texture editor. For example, in the material shown above, the first BSDF’s Reflectance 0 texture is the material’s selected texture, and right-clicking its button opens the Texture Editor, showing this texture and its parameters:

Preview

The texture preview shows the selected texture, including the effect of its projection and image properties. You can zoom & pan around the image using the mouse-wheel and left-mouse button.

Projection Properties

Normally, these parameters apply only to the texture currently being edited. However, when "Use Override" is checked, they show (and manipulate) the values of the material's so-called Override Map, instead of those of the current texture. The effect of this is to allow multiple textures in a material to share a common set of projection values.

Image Properties

These parameters are used to alter the image at render time.

General information on Texture parameters

The remaining parameters control how the texture is scaled and translated in texture-space. Tile X & Y can be enabled or disabled using the appropriate checkboxes, and their values are set using the numeric input box. When Real Scale is not enabled (Units box set to Relative), the meaning of Tile X & Y is roughly, ‘squeeze this  many copies of the texture into the given space’. When Real Scale is enabled (Units box set to Meters), the meaning becomes, ‘make each tile x-number of meters wide’.

...

As a convenience, holding down the CTRL and/or SHIFT keys while adjusting texture parameters will affect where the changes take effect:     

 


ModifierFunction
CTRLChanges will be applied to all textures in this texture’s parent layer.
CTRL+SHIFTChanges will be applied to all textures in this texture’s parent material.

...


To adjust numeric inputs, you can either:

...

In the first case, the value will be changed as soon as focus moves elsewhere; this allows you to type in a new value, then hold down CTRL and/or SHIFT to execute the change in multiple textures as described above.

Other Features

In addition to these conveniences, textures may also be drag/dropped from one texture to another. To do this, simply click down on the desired texture button and begin dragging it. This texture may now be dropped on any other texture button in this layer, or in another layer. To select another layer during the drag, drag the texture over the Material Editor’s layers tree to select a different layer; once the desired layer is visible in the Material Editor, drag the texture over and drop it on the desired target. If you simply drop it, only the texture’s path will be copied to the target; if you hold down CTRL while dropping the texture, then all of the parameters will be copied from the source texture to the target.

...