By JDHill
#265626
Hello all,

Version 1.6.6 of the Maxwell for SolidWorks plugin is now available, following is an overview of a few of the changes and new features, and how they affect the usage of the plugin.

Cheers,

JD


Cameras

Though it may not appear so (hopefully), the 1.6.6 has a completely new Camera model. By default, a Camera is always created using the 'Viewport' resolution mode - this means that as the size and shape of the viewport is changed, the Camera updates the relevant parameters in order to always keep a match (note: this is in reference to when there is an actual SolidWorks camera defined - otherwise any results are hard to predict). But how to proceed when you wish to render something other than the actual size of the viewport?

In the plugin's toolbar (menu too), there is a new item: Camera Heads-Up Display. When this is activated, and the Camera in question uses custom film sizes or Lens Shift, here is an example of what you should see:

Image

This particular Camera is using a film size of 22.5 x 14.4mm (for a viewport like this, the perspective is generated by SolidWorks as if the film was regular 35mm - that is, 24mm high by the necessary width). It also has 25% lens shift in X and 24.6% shift in Y. These parameters, in addition to being available in the Scene Manager > Camera Settings page, are also now available in the plugin's new 'Camera LCD' window:

Image

Values in this window may be adjusted either by rolling the mouse-wheel over the appropriate decimal-place, or by holding down the left mouse button and dragging up and down. By defining the film size this way, rather than using the 'Viewport' resolution mode, the plugin is able now to disconnect the pixel-size of the render, and deal only with aspect ratio. In the LCD, you can see the small 'lock' icon next to the film-size inputs; toggling this will lock the film's aspect ratio. When the film aspect ratio is locked, any adjustment to either the image (output image) width or height will be made in such a way as to remain at the same ratio as the film - this is only logical, unless one is going to blank-out part of the output image, as seen when using region render. The ultimate effect of this is that you may render the region defined by the film size and offset at any resolution you wish. So, as the LCD above is showing, this Camera is going to render a 500 x 320 pixel image, and here it is:

Image

Now this may not look like much more than basically a region render without the surrounding blackness, since 500 x 320 just happens to be a similar size to what the actual rectangle on the viewport was drawn as. But in reality, there is no connection between the two. To demonstrate, let's resize the viewport drastically:

Image

This makes it much easier to see what is happening. Although rectangle shown by the heads-up-display is much smaller, and the viewport is an entirely different aspect ratio, this viewport, which still has the exact same parameters showing in Camera Settings and on the LCD, will render out the exact same image as the first one. And, here it is:

Image

If one was to leave the film ratio locked (Lock Ratio in Camera Settings, the little 'lock' button on the LCD) it would work just as fine to set the output pixel-size to 5000 x 3200 - the image would still be exactly the same, besides for being ten times as large. There are some caveats: already mentioned above, this is only available for viewport which have an actual SolidWorks camera defined - the standard 'perspective' views (isometric, trimetric, dimetric) simply do not have enough information to generate the necessary relationships. Also, I have seen times where the plugin gets faulty information regarding the actual size of the viewport - of course if the input is bad, it is impossible to figure an accurate output. I have seen this when dealing with the feature manager or task pane obscuring part of a viewport - sometimes the size is reported as if those windows were not there. But I think these cases are the exception, not the rule.


Show Sun in Viewport

In the Location Settings page of the Scene Manager, there is a button in the toolbar which activates and de-activates a new feature: Show Sun in Viewport. When activated, here is what you should see:

Image

This indicator is drawn directly in the scene using OpenGL, and it is updated in real time whenever any parameters which affect the Sun's position are adjusted. These parameters include:

- latitude
- longitude
- time of day
- date
- scene rotation

Keep in mind that in SolidWorks, the Y-axis is up.


Material Assignment and Selection

Plugin version 1.6.0 attempted to emulate a SolidWorks way of working by a) manipulating built-in SolidWorks Selection Filters, and b) synthesizing a couple of its own. In creating a good workflow, I do not think this was a successful strategy. Therefore, one of the most fundamental changes in 1.6.6 is in the area of Material assignment and object-selection behavior.

Rather than creating the 'Select Component' and 'Select Feature' pseudo-selection-filters, the plugin now just leaves it up to you to have whichever filters activated that you wish to use. Whereas before you could not assign a Material to a given entity unless its type of filter was active, the new plugin will just assign to whatever you may have selected at the time. The default is to assign at the body-level; i.e. if you have nothing selected, and you drag a Material over an object, it will not be applied to the nearest face, but to the whole body. If, however there was a face pre-selected, then the Material will be assigned to that. So it is all controlled by the standard SolidWorks selection methods.

This does raise one issue though: if there is no Selection Filter active, how is it possible to find the Material assigned to anything but a face (i.e. when a face is selected)?

To accomodate the need to find and to know where Materials are assigned, and from where any given entity will be getting its render-time Material, the new plugin provides two new tools, and both of them reside in the upper-portion of the Object Properties window:

Image

In the above image, notice two features: the green 'Up' arrow in the toolbar, and the fact that in the 'Info' item, the word 'Body' has been made into a hyperlink, where it is reported that the selected face derives its Material from its parent body. If you were to click the green arrow (its tooltip reads 'Select this Entity's Parent', the feature which this face belongs to would become selected. If you were then to click it again, that feature's parent body would be selected. If this is in the context of an assembly, clicking the green arrow again would select this body's parent component, and so on until the highest-level component had been reached. Turning attention again to the image, if you were to click the 'Body' hyperlink, that body would become selected.

So, it is therefore possible to reach any given entity without the need to enable and disable many different Selection Filters, and this is a much more clear and efficient way of doing things.


Textures:

In 1.6.0, the Maxwell Texture Editor was a standalone floating window. It was made so to enable some extra flexibility, but after using it that way for a given amount of time, I decided that it would be better to include it as a slide-out of the Material Editor, as it is done in the Rhino plugin. So, that is where it now resides. Opening it is still done using the same method of right-clicking a Texture's button, or it can also be shown by either clicking the small arrrow-button at the Material Editor's top-right corner, or by simply grabbing the right side of the Material Editor and dragging the window to a larger size.

Besides for this user-interface change, there is now a new capability which was not available in the 1.6.0 plugin: translation of the SolidWorks texture 'Rotation' parameter (i.e. select entity > right-click > Appearance > Texture > Texture Properties > Rotation slider). This is fairly straightforward to use, though not completely so, since really, Maxwell has no 'rotation' parameter for textures. As this is the case, what happens here is that during export, the plugin finds out the value of this parameter for each object; it then does an in-place transformation of the un-rotated UV coordinates supplied by SolidWorks, to accomplish this rotation. So it is actually baked into the mesh UV coordinates during export. Note: though it is necessary and correct to use the rotation slider in the SolidWorks texture UI to adjust the rotation for any given object, the same does not apply to SolidWorks' texture-scale slider, which is located just above it. Maxwell does have the notion of texture-scale, and in order for the plugin to maintain the one-to-many relationship of textures-to-entities, it must logically require that changes to a texture's scale be done by way of the plugin's texture editor (which, again, is now located directly in the Material Editor) - when this is done, the plugin will adjust the SW scale for all entities which would be affected.


New Plugin Options

In the Scene Manager's Plugin Options page, you will find a few new items. Some are minor conveniences, and some are more important. First the minor ones:

- Show Browser ToolTips: enables or disables the information tooltips shown when browsing MXM files in the MXM Browser
- MXS Auto-Naming: when enabled, the plugin will scan the target output directory and automatically rename the MXS output path, if necessary to prevent overwriting an existing file. It uses an incremental-numbering system to generate new filenames
- Image Auto-Naming: identical to MXS Auto-Naming, except it is concerned with the rendere image output, rather than the MXS file
- Use Last Preset as Default: when enabled, this basically provides a way for you to customize how new 'default' Scenes are created by remembering the last preset you used and substituting that for the normal Scene defaults
- Emitter Material Threshold: the 1.6.0 plugin always considered an emissivity value of greater than 0.20 to mean that it should generate a Maxwell Emitter, when it was auto-generating Materials during export of native SolidWorks materials. This parameter allows you to set this threshold, in case your models commonly use emissivity levels greater than 0.20, but you do not wish to export Maxwell Emitters for them

And, now the important ones:

Export Absolute Coords:

There are some known issues that can occur between the point where a plugin writes an MXS file, and where MXST is used to read it. These issues concern the transformation methods used to describe where in space (in a SolidWorks assembly, all parts are relative to their .sldprt's 0, 0, 0, with any assembly-level rotation/scale/translation applied using a transformation matrix) meshes exist. These can occur more frequently in SolidWorks when many mates (or constraints) are used to position parts in an assembly, and the result is that upon opening the MXS in MXST, the parts are not at the locations they were in when exported by the plugin.

To alleviate this problem, the new plugin offers this option (Export Absolute Coords) which takes the transformation given by SolidWorks, and manually moves all of the mesh triangles to the locations in world-space that they should be - prior to putting them into the MXS. So when you open an MXS which was written with this option enabled, the meshes will all have base-points of world 0,0,0, and all location information will be contained in the actual mesh triangles' vertices. Note, that it does take a certain amount of extra time for the plugin to do all of the transformation math, so unless you are having a problem with a Scene, it is still fine and good to leave this option disabled.

Export SW Multi-Materials:

The 1.6.0 plugin would only consider native SolidWorks materials at the body and component levels when exporting meshes which had no explicit Maxwell Material applied. This is no longer the case, though it is the default behavior. By enabling this option, the plugin will also scan all entities at the face and feature levels during export, in order to generate any necessary Materials. Be aware that, depending on the actual model involved, this may take a very long time to do - there may be thousands of individual faces on a model, any of which may have a noticeably-different appearance, and the plugin must inspect each one of them, generate a new Material, then compare that Material with all those which have already been generated during the export, so that it can either choose to keep this Material, or discard it and use one which already exists. If it did not do this, there would end up being one generated Material for each face in the model - definitely no fun if you decide to open the MXS in Studio to do some extra tweaking. So, to reiterate: only enable this option if you know that it is what you really want.
hardware question :)

I can easily create an usable render in 15/20 mi[…]

Maxwell for Rhino on Max missing Toolbar

Hello, For some reason, the Mac version of Rhino[…]

Let's talk about Maxwell 5.2

Price for sure matter a loot. Speed is the core i[…]

Materials translucent with V5.1

Well, the problems can be in the chair, the monito[…]