Plugin for 3D Studio Max
From RandomControl Wiki
Contents |
3D Studio MAX plugin
fryrender plugin for 3DS tudio MAX (fry_max from here on) connects both softwares allowing the user to export 3DSM AX scenes to fryrender. It works on 3DSM AX from release 6.0 to 2009, and it has been designed to be as unintrusive as possible in the artist’s workflow, trying to make scenes portability straightforward.
fry_max deals with the scene basic components: geometry, materials, cameras and render and environment settings. Each one of these components is modeled in the plugin, providing explicit control over the way they are exported to fryrender.
Plugin installation
To install the plugin just close any existing instance of 3DSMAX and then copy the fry_max.dlr file into its plugins folder, usually located under C:\Program Files\Autodesk\3dsMax\plugins or a similar route.
Materials
fryrender works with realistic physically-based materials. These materials can be either built from scratch using fryrender’s material editor, or obtained from their 3DSMAX equivalents.
There exists a new “FRY Material” type available in the Material / Mab browser. These materials display a button used for opening the fryrender material editor. Ideally those materials would be used exclusively in the scene in order to achieve better-looking results in fryrender. However, a simple material converter has been included in the plugin, allowing the user to convert Standard and Architectural materials into similar physically-based fryrender materials.
The material converter is located under the Quad Menu’s “Transform” group, which can be invoked by right-clicking on any viewport. This operation will convert each material used in the scene into a rough equivalent fryrender-type version of it. Next, material references in the scene objects are updated to point to the newly created material.
The converted materials keep their original name to make their identification easier. Their thumbnail won’t be shown until it has been rendered from fryrender‘s material editor though, since they take time to calculate.
It is convenient to be aware of which renderer is being used to generate the thumbnails in 3DSMAX Material Editor. By default it is the same renderer as the one used in production, which should be fryrender but, in case the scanline renderer is being used instead, “FRY materials” will only be able to show their diffuse color, as shown in the picture below.
This conversion process involves interpreting each meaningful material’s channel in order to produce a similar result using fryrender’s material layers and properties. This way, the channel color and image textures, whenever present, are translated to layer properties in fryrender as so are specularity or index of refraction. Please note that this automatic conversion process is limited, and in most cases better results will be achieved by handtunning the materials.
Geometry and object properties
In order to be exported to fryrender, each object must be built from polygonal meshes. Internally, fry_max triangulates every object in the scene before flushing them. This comprises almost every renderable item, including every primitive, boolean objects or nurbs. Notice that objects with no volume, like splines are not exported since they can’t be treated as polygons.
An additional set of properties can be added to the objects in the scene, providing a higher level of customization in the way they will be exported to fryrender. These properties are accessible by adding a new type of “FRYRENDER Object Properties” modifier. When applied, this modifier displays a button on its properties panel which makes the standard fryrender editor accessible.
The ability to share modifiers among several objects in 3DSMAX makes it possible to apply a single modifier to a group of objects. This can be really useful, for instance, to separate a whole group of emitters in a different rendering layer for layer blending.
Cameras
3DSMAX provides a basic camera model commonly used in 3D packages named “pinhole camera”. In order to use these cameras with fryrender, this basic model must be extended to incorporate the additional parameters considered in true camera optics.
To do that, fry_max incorporates a new type of “FRYRENDER Camera”, both free and targeted. This camera behaves basically in the same way standard cameras do in 3DSM AX but it also incorporates the parameters needed to simulate true camera optics in fryrender.
In their properties both “FRY Target” and “FRY Free” cameras display a single button that gives access to the fryrender camera dialog used to configure the camera optics.
In order to be able to render a scene, at least one camera must be present in the scene. During the export, besides the cameras previously mentioned, fry_max will convert every standard camera left by adding a default camera properties set to them.
Object instancing
The use of fryrender’s object instancing feature from the host application is as simple as adding a “FRYRENDER Object Properties” modifier for each one of the instances, and then enabling the “Instance” checkbox. Next, the name of the source object is entered on the text field located on the right.
When an object modifier has the instancing property activated, the plugin will export its geometry as-is. Nonetheless fryrender will substitute the instance with the source object when the render starts, and orient it according to the instance pivot. Note that this implies that only objects which can eventually be exported are suitable to be referenced as instance sources. Complex object hierarchies, helper objects and non geometrical entities in general are not suitable to be instanced.
The actual geometry of the instance objects should therefore be as simple as possible in order to not to take too much unnecessary time to export. Because of the fact that it won’t be used in the rendering itself, but just as a visual reference of how the substituted geometry will be placed, a plain box should suffice in most cases.
A proxy object can be easily constructed by rightclicking over a given source object, and selecting “FRYRENDER Instancing Proxy” on the quad menu.
Then a dialog will be shown prompting about the desired mesh density, which should be kept as low as possible while maintaining the object recognizable. The lighter the proxy object is, the smoother they will be displayed on the host application viewport when they are massively replicated.
Daylight system
The Sun Object is a helper tool which provides an interactive and visual way for setting up the sunlight in the physical sky. The object is synchronized with the sky settings, which can be accessed from the fryrender environment pane. The synchronization works both ways, so changes in the environment pane are reflected in the object, and vice versa. Mostly, you will not need to access the environment pane to set the sunlight, unless you need accurate geo-location or time/date settings.
In 3DStudio MAX, the sun object is provided as a new kind of light (not because it has to do with a regular 3dsmax light, but for the sake of a clearer classification). When you drop it to the scene, the sunlight will automatically be synchronized with its direction each time the physical sky is used in the scene.
The sun object is composed of a target and the sun itself, the sun light flows along the line traced from the sun object to the sun target. Note that not every single sun direction is possible for a given geographic position, so fryrender will set the time/date/location is closest to your current sun direction in the physical sky settings dialog.
The sun object behaves as a light for the 3dsmax viewport, providing some feedback about how the objects will be shaded.
The sun object can be handled in two modes: Manual and Locked:
manual mode will allow you to set the light direction by placing the sun and the target objects freely in the scene. However, the geographical location and time and date settings will be automatically set by fryrender with the closest possible values for your specified sun light direction. This configuration is suited for those users who just want to setup the sun light in the scene, without caring about the parameters that lead to it.
Locked mode on the other hand is suited for those users who have specific restrictions about the environmental settings (i.e. a given geographical location, date, or time) to use in their illumination. The locked mode will force the sun object to match the settings on the fryrender sky dialog. Hence, you’ll be able to move the sun in the scene, but its direction will always be fixed.
Environment Settings
The first step to set up fry_max is to make 3DSMAX use fryrender instead of the default scanline renderer. To do that, go to Rendering > Render panel, or hit F10 alternatively. Under “Assign Renderer” choose “RandomControl FRYRENDER” for the Production renderer.
Rendering and Environment settings can be modified within the new “RandomControl FRYRENDER” tab emerged next to the “Common” one. Hitting the so-called buttons will open the standard fryrender render and environment settings dialogs, which are the same as those used in fryrender standalone.
Notice, however, that some of the parameters which can be found on fryrender’s render settings dialog are already present in the “Common parameters” group in 3DSMAX. Since the user may have previously configured Time Output and Output Size for the scene, fry_max will use them instead.