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:
...
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:
...
The material editor's Options menu contains commands for creating materials, and importing or exporting MXM files.
Command | Function |
---|---|
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, while New Emitter creates a 40W white emitter materialdefault emitter material, and New Extension creates a material that uses one of Maxwell's Material Assistants. |
Import MXM | This 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 MXM | This 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 MXM | This 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 Textures | These 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. |
...
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 pre-defined predefined components.
Material Editor Pages
...
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.
...
Dispersion | This 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. |
Matte | Materials 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. |
Shadow | Materials 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 Color | This is the color which will be used for this material when the Material ID channel is rendered. |
Layer Page
...
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. Note that while MXED allows a separate Displacement layer to be added to each Layer, the plugin does not, instead placing Displacement at the Material-level. Functionality is similar, because in MXED, one of the several possible Displacement layers must be chosen – in other words, only one Displacement may be specified for the material. The plugin therefore chooses to display this relationship as it is in the layers tree.
Emitter Page
The operation of this page is similar to that of the Emitter page in MXED. The contents of the page change based on which Input type is currently selected. When Color and Luminance is selected, the page will appear as shown above. When Temperature of Emission is selected the interface will show a single slider used to set the emitter output in Kelvins:
When Image Emission Texture is selected, a path/texture button will be shown; as with other textures, this texture may shown in the viewport by left-clicking the texture button, and it may be edited using the Material Editor’s texture-editing pane.
Texture Editor Panel
To open the Material Editor’s texture-editing panel, click the arrow button at the Material Editor’s top-right corner, or 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 panel, showing this texture and its parameters:
The texture editor has four main elements:
Preview Toolbar
The preview toolbar shows the location of the current texture, and provides buttons to fit the texture into the available preview area, and to open the texture in your system’s default editor for the texture’s file type (an error may occur if there is no default editor for this file type).
Texture Preview
The texture preview shows the selected texture, including the effects of tile, offset, RGB-inversion, and the plugin’s saturation/contrast/brightness/RGB clamp controls. You can zoom & pan around the image using the mouse-wheel and left-mouse button.
Toolbar
The texture toolbar contains toggles for several texture options:
Parameter | Function |
---|---|
Interpolation | Enables Maxwell’s cubic pixel-interpolation in the render. |
Invert | Inverts the RGB values of the specified bitmap in the render. |
Real Scale | Changes the meaning of the Tile X/Y parameters so that they refer to absolute meter-based size. |
Imaging Controls | Provides a drop-down which contains saturation/contrast/brightness/RGB clamp controls. |
In addition, when the selected texture is a bump map, another toggle appears which enables you to indicate that the specified map is a normal-map. When using a normal-map, three toggles are supplied: Flip X, Flip Y, and Wide Z. These are used to change how Maxwell interprets the color values encoded in the normal map, since different software uses different conventions regarding direction and bit-depth.
...
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 basicallyroughly, ‘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’.Offset X & Y simply translate the texture along the x & y axes by either the given percentage, or by the absolute meter-size when Real Scale is enabled.
The Channel parameter allows you to associate different textures with the different texture-projections which may have been defined for the objects to which this texture is assigned. For example, some textures may use a cubic projector on channel 0, and a planar projection on channel 1. Each texture mapping, channel 1 & channel 2, represents a different set of UV coordinates. Setting the Channel parameter in each texture individually allows each texture to use whichever mapping is appropriate. If an object has fewer texture-mappings assigned than are specified in the various textures its material has, then copies of the channel 0 mapping will be created during export in order to accommodate those textures. This takes extra processing power, so it is always best to make sure that textures only specify as many different Channels as texture-mappings exist for objects which use them.
As a convenience, holding down the CTRL and/or SHIFT keys while adjusting texture parameters will affect where the changes take effect:
Modifier | Function |
---|---|
CTRL | Changes will be applied to all textures in this texture’s parent layer. |
CTRL+SHIFT | Changes will be applied to all textures in this texture’s parent material. |
To adjust numeric inputs, you can either:
- Type in a new value and move focus to another input.
- Click the small +up/down-arrow buttons next to the input box to adjust the value.
- Click in the desired input box and roll the mouse-wheel up or down to adjust the value.
- Click down on the desired input box and move the mouse forward & backward to adjust the value.
...