3D Studio Max Unrobotic Unreal Engine toolset: 7. Utility scripts

Alonside the three new helper objects provided, the toolset also includes a collection of scripts to help speed up getting your art from Max to Unreal, and vice versa. The macroscripts can all be assigned to the Menu, Toolbar, Keyboard shortcuts or Quads as required.

Thumbnail

Let's take a look through each one in detail below with a use-case example:

Export all (or selected) Export Nodes in the scene

This macroscript will go through each Export Node and Export Anims helper in the scene and export them to an FBX file. You will only be asked to provide a file path and name for the first export, with each subsequent helper being exported using the same destination.

If nothing in the scene is selected, all Exporter Nodes and Export Anims will export. If you select specific nodes (or any meshes and nodes that belong to them), only the selected Export Nodes/Anims will be exported.

To use, simply run the macroscript, select your destination filename and press Save.

Re-export nodes...

The same as above but without prompting for a filename (unless you have not yet specified one). This lets you quickly iterate updates to your meshes. To use, simply run the macroscript.It also uses the same object selection as your last export. Note that any exporters that exporter's renderable property will still be respected.

Create export node at center

Create a new Export Node at the centre of the selection of max objects. Note that the pivot point's z coordinate will be used rather than the centre. To use, select some objects in the scene and run the macroscript. The newly created node will be selected.

Create object node at center

The same as above, but creates a new UE4 Object helper at the centre of the selection of max objects. To use, select some objects in the scene and run the macroscript. The newly created node will be selected.

Pick xref for selected

Pick the xRef scene that should visually represent the selected UE4 Object nodes. This will replace any existing xRefs and also try to update the Path property of each UE4 Object if a UE4 World helper exists and is configured correctly. To use, select the UE4 Objects you wish to assign an xref scene to and run the macroscript. Select the max scene that should be used and hit Open. Note that if no selection is made when the script is run, all UE4 Objects will be set.

Refresh object xref scenes

Refresh the xref scenes for the selected UE4 Objects. This will only apply to objects that have been assigned an xref scene. This will also try to update the Path property if a UE4 World exists with a correctly configured Content value. To use select the UE4 Object helpers to refresh and run the macroscript. Note that if no UE4 Object is selected all objects are updated.

Refresh world xref scenes

Similar to above but updates all UE4 Object xrefs that belong to the currently selected UE4 World. To use, select the UE4 Worlds you wish to update and run the macroscript. Note that if no selection is made when the script is run, all UE4 Worlds will be processed.

Paste UE4 world objects

Paste objects into the scene that have been copied to the clipboard from the Unreal Engine. This is basically the same as pressing the Paste button in the UE4 World objects. Note that this will automatically use the first found UE4 World helper. If you want to paste into a specific UE4 World it's recommended that you use the Paste button in the world's properties.

Copy UE4 world objects

Copy objects from the scene to the clipboard so that they can be pasted into the Unreal Engine. This is basically the same as pressing the Copy button in the UE4 World objects. Note that this will automatically use the first found UE4 World helper. If you want to copy from a specific UE4 World it's recommended that you use the Copy button in the world's properties. To use, run the macroscript.

Note that if you have a collection of UE4 Objects selected only those objects will be copied to the clipboard.

Batch export folder of scenes

Batch-export a folder of .max files. This is an automated process that will open each .max file and run the Export all Export Nodes in the scene utility. The save dialog will only appear once and will be used for all .max scenes processed. To use, run the macroscript and select the folder you wish to export then select the destination path and filename you wish to export to.

Note that this may take some time and the max instance will appear to flicker while it's batch processing. The script will try to hold and fetch your current scene, but it's recommended that you save your current work before running this utility.

Batch export selection of scenes

Similar to above, but allows you to select a collection of .max files rather than a folder, and processes each of those. To use, run the macroscript and select the .max scenes you wish to export then select the destination path and filename you wish to export to.

Batch import FBX

Batch import a folder of FBX files. This allows you to quickly re-import meshes you've exported to Unreal Engine. To use, run the macroscript and select the folder you wish to import, then select the destination path and filename you wish to save the .max files.

Note that this feature is recursive and all FBX in the folder and all subfolders will be imported.

Split scene exporters

This will take a .max file that contains mulitple Export Node helpers/layers, and export individual .max files for each one. This is useful if you want to separate your meshes that may be unrelated or are resource-heavy. To use, open the scene that you wish to split, run the maxscript and then select the destination folder you wish to split to. Hit Save.

Note that this may take some time and the max instance will appear to flicker while it's batch processing. The script will try to hold and fetch your current scene, but it's recommended that you save your current work before running this utility.

Merge individual exporters

The opposite to the above utility. This will take multiple .max files and merge them into a single scene. Each max file will be given it's own layer in the scene and offset to the right. To use, create a new scene and run the maxscript. Select the folder of .max scenes you wish to merge and press Open.

Note that this may take some time and the max instance will appear to flicker while it's batch processing. The script will try to hold and fetch your current scene, but it's recommended that you save your current work before running this utility.

This will also quiely import. Duplicate materials will automatically use the existing scene materials and duplicate nodes will be merged with the same names.

Convert selection to external export object

This utility does the following on the selected objects:

  1. Export the selection as a separate .max file,
  2. Insert a new Export Node into this new .max file,
  3. Remove the selection from the current scene,
  4. Insert a new UE4 Object object into the scene,
  5. Set the UE4 Object's xRef to point to the newly separated .max file

It's basically a quick way to go through objects in the scene and create individual exportable assets from them, keeping them in-place to later copy/paste into UE4.

To use, select your objects, run the maxscript and choose a filename to save the new .max to. Press Save.

Convert selection to export object

This is similar to the previous utility, but keeps the Export Node and objects/meshes in the current scene (without creating a new xrefed UE4 Object). This lets you similarly create individual exportable meshes, but keep them contained in the same scene.

To use, select your objects and run the maxscript.

← 6. Export Anims 8. Troubleshooting →

3D Studio Max Unrobotic Unreal Engine toolset


Part of the '3D Studio Max Unrobotic Unreal Engine toolset' series. A release of the internal tools that I've developed over the years for working with Unreal Engine and 3D Studio Max

Who I am

I'm Blake and I like to tinker with things and make stuff. When I'm not programming or developing random systems, I'm playing with electronics, doodling bits of art, 3D modelling or sculpting and painting things or nerding out watching sci-fi or horror TV.

From 2001 I worked in the games industry, eventually specialising in tools to aid in the development of video games and their engines. In 2011 I left the industry and teamed up with a few other talented composers to utilise my knowledge to help build the company 'Spitfire Audio'.

I also periodically compose soundtracks for video-games and have worked on titles such as The Stanley Parable and Portal Knights. You've probably also heard my music in random TV commercials at some point.

What I'm using to make games

Nowadays I tend to utilise Unreal Engine 5. I use a mixture of (mostly) C++ (Visual Studio 2019, Rider) and Blueprints.

I work with Autodesk's 3D Studio Max to generate the art required, and Adobe Photoshop or Paintshop Pro 6 for texturing. I also dabble with Allegorithmic's Substance Designer/Painter for more realistic texturing work.

I tend to generate tools in Python, C++ or NodeJS depending on what's needed.

Audio-wise, I still use Cool Edit Pro and FL Studio to generate sounds and music respectively.