Basic Asset Setup and Export out of Max

Overview

In the following documentation you'll find how to set up the hierarchy, basic shader set-up in 3DS Max and how to export simple game ready assets. Once in the engine this document will explain how to assign the materials, textures and what to look out for.

This document will also include a link for and how to use the Physically Based Shaders. Please read this carefully since the whole game and look will be based on them.

Initial Setup

This section will explain how to set up your materials and get you asset ready for export into CRYENGINE.

This quick section will start for Maya users after they exported the asset from within Maya. Once you finished modeling your asset, laid out the UV's for it export the asset as an .fbx file. Import this .fbx file from Maya into 3DS Max.

The very first thing you need to do in Max is to set it to local pathing. Max has an option to set you path to local, meaning that no matter from which path your loading in your textures, as long as they're in the same folder it will read it from there.

To do that you need first to click on "Customize" and scroll down to "Preferences". A new window opens up, once there click on the "File" tab and click on the box "Convert local file paths to Relative".

Before working with the scene we have to make sure that we have the right set up. For easier work we should have everything set up in layers. It's very easy to set up a layer in 3DS Max and it will help to keep the scene clean and export the right objects from it. It will also help to hide things that we don't want to see (like proxies, test, geometry, etc.)

In 3DS Max click on the upper tab on the icon named "Manage Layers". A new window will open, the Layer Editor. By default you'll have the default layer there. This layer can't be removed so you have to leave it in and add the other layers. To add another layer, click in the Layer Editor on "Create New Layer" icon. To change the name of it, right click on it and scroll to "Rename Layer".

You should have besides the default layer, three more layers in the Layer Editor:

  • lod
  • proxy
  • work

All the assets that are not meant to be exported go into the work layer. The proxies go into the proxy layer and the lod's into the lod layer. We have a tool created that will handle all the files set up, but it's still valuable to know how to set it up in case you have to do it manually.

Material setup in 3DS Max

Open 3DS Max and once the scene with the asset is open, click on the button Material editor on the top shelf. This will open up the Material Editor in 3DS Max.

Once the Material Editor is open click on the button that is labeled "Standard". A new window will open please select the button that says "Multi/Sub-Object". This will create a multi material inside 3DS Max.

It will ask you to replace the material. Click on "OK" to keep the old material as a sub material.

After the sub material is created we need to decide how many materials (or ID's) the asset will have. Please be very careful and think how many materials you will use for the asset.

If you want to add another material, click on the button which says "None". A new window will open; now click on the button labeled "Standard". You see ten slots that are what 3DS Max defaults to, if you need more you can click "Add" or if you use less click on "Delete".

Please make sure that you delete unused slots since it will blow up the file size and also decrease the performance in game since it needs to process more data.

Setting up the material for the Physical Proxy (Collision)

Please remember to create your Physical Proxy to use if always possible primitives and in cases where you can't achieve it with primitives, please use very low geometry and be smart about it (for example if your character won't reach ever come in contact with the top, no proxy is required there, so you shouldn't add it).

Once your Physical Proxy (collision geometry) is created, go into the Material Editor and select the Material with Material ID 1. Material ID 1 should always be the Physical Proxy Material. Since you're in Material ID 1, select from the scroll down menu Crytek Shader. Another box will open beneath it. Please click on the box where it says Physicalize and select from the scroll down menu Physical Proxy (No Draw). Go now into the color settings and set the color to red and the opacity to 50%. That way it's easy to see through the proxy and clearly set it apart from the mesh. Rename the material proxy.

To assign the Multi-Material that is done go into the component mode select the whole Physical Proxy and set the SetID to 1. Rename the object into $physics_proxy01, $physics_proxy01, etc. (depending on how many proxies your asset uses).

Assigning the Multi Material and setting the Material ID's

If you've created your asset with in Maya you'll need to assign a material with one or more ID's to the right places on the asset you need to select first the whole object and then assign a Multi Material, then select the faces or shapes and change them to the corresponding Material ID's.

Creating the dummy node, connecting the right hierarchy and tagging the Proxy Primitives

Now that we have assigned all the shaders to our asset and set up the Physical Proxies we need to set-up the correct hierarchy for a successfully export.

First off we create a Dummy node in 3DS Max. First click on the "Shape" button (the round ball icon) then over to the "Helper" button (the measuring tape icon) and lastly we click where it says the word "Dummy". Now we can drag create a dummy node.

Once that's done click on the "Schematic View" button on the upper shelf. This will open a window there you see all the objects in your scene. To center view on the asset press the Z key on the keyboard and you'll frame the object. Your dummy node should be named how you want the asset to be seen within the editor and should conform to the Ryse naming conventions.

Your geometry should be named (name of the asset)_mesh, Physics Proxy mesh or primitives should be named $physics_proxy and your two LODs with the names $lod1, $lod2, or if you use more LODs, $lod3, etc.

After all this is done, we have to tag the proxies, so the engine knows what kind of primitive it is. This is a very important step.

There are five different kinds of proxy shapes. Four of them are Primitives. Only the Primitives need to be tagged.

They're as followed:

  • Box
  • Sphere
  • Cylinder
  • Capsule
  • Custom low build geometry

Even if you're creating your proxies using primitives, please keep in mind to use low geometry. The engine will load the actual geometry of the proxy even if it's marked as a primitive

To tag a proxy primitive all you need to do is select the primitive and right click on "Object Properties". A new window will open, there you click on the tab "User Defined" and in the empty box below type in the kind of primitive it is.

Remember there are only four types (Box, Sphere, Cylinder and Capsule) and the custom low build geometry has not to be tagged.

Once everything has the right naming conventions and all the proxy primitives have been tagged, the right hierarchy needs to be established for successful exporting it into CRYENGINE.

To do that the main asset geometry ((name of the asset)_mesh) needs to be connected under the dummy node (name of the asset). The Physical Proxy and LODs need to be connected to the main asset geometry.

If you have too many objects in your scene and you open the Schematic View, it can happen that your object is not visible or you can't find it.

To center the view on the object in the Schematic View, select your object in the scene and then go, in the Schematic View window, to the tab "View" and then select from the drop down "Pan to Selected". Now your selected object will be centered in the Schematic View window.

CRYENGINE 3 Manual

Exporting the asset into CRYENGINE

Before exporting the asset to CRYENGINE we need to make sure to save it in the right directory with the right naming convention. As a habit we save all the final textures and cleaned max file into the same folder.

To export the asset we need to select the dummy node (the main node where everything else is connected under), click on the "Utilities" Button (the icon with the hammer) and then finally click on "Cryengine3 Exporter". Under it you will see a new menu expand. Click "Add Selected" and it will add the asset to the export list. To add multiple assets select the respective Dummy nodes and click also on "Add Selected".

Please make sure that the checkbox "Export File per Node" is checked since if not it will export multiple dummy nodes as one file (example if you have different pieces of a building you want to export them separately and not as one object). Lastly insure "Export Nodes" is checked. The exporter will automatically put the .cfg file in the same folder as the scene was saved in (which we want).

After that is done we still need to export the material since the only thing that was exported is the geometry but not the material set up.

To do that we need to scroll down on the menu until you find a box labeled "Material". With the dummy still selected we click on "Create Material". A window will open and we will name the Multi Material. The material should reflect the name of the asset or assets. Conveniently the material will be exported to the same folder the mesh exported to. If you already have created a material before and saved it, and made changes to it you will only have to click on "Sync Material". Down below you will find a whole section dedicated to "Sync Material".

Most common export errors out of 3DS Max

There are a few common export errors that can be fixed. To see which they are and how to fix them see: Common 3ds Max Export Errors

Importing the asset into CRYENGINE, assigning textures and set up of Physically Based Shaders

Before importing the asset into CRYENGINE we need to load into a scene (in this particular case we created an Asset Zoo that is used for previewing assets).

After opening CRYENGINE open a new level or create a new level.

Once the level is opened, click on the "Brush" button in the Rollup Bar. To find our asset we type the name that it was exported as in the white empty dialog box below it or you can navigate though the folders to the asset location. Our item will show in the big box where all exported game assets are listed. If you can't find your exported asset in the browser list, drop down click on the button right next to the box where you typed the name labeled "Reload".

Our last step is to assign the textures in engine and tweak our Lighting Settings for the Physically Based Shaders.

In the Material Editor in CRYENGINE on the upper tab there's a little box with a magnifying glass icon. Type in that the name of the Multi Material you exported out of 3DS Max or you can navigate though the folders to the materials location. If it doesn't show up on the list below click the reload button left of it. Make sure the asset you wish to assign the material to is selected, select the root material and then click on the button on the upper shelf which says assign material to selection (the button with circle and an arrow going into a box). Now your Multi Material is assigned to you asset. Select the corresponding materials and load all the corresponding textures to it.



The last step is setting up the Physically Based Shaders. Physically Based Shaders are based on a certain set of values to make the materials look more realistic. You'll need to put them in the "Lighting Settings".

To get the correct values for each material and also understand the philosophy behind it please see: Creating Textures for Physically Based Shading.

Displaying the proxies in the editor and reviewing them

One thing we have to make sure is that our proxies are on budget and not too. That is not the case for when we're using primitives but when we build our custom proxy.

We also need to make sure that our proxy (-ies) did get exported correctly, to do that we first have to display our proxies in the editor.

In the editor click on the monitor icon in the RollupBar, look for the check box "Display Proxy" and click it. Now all your proxy (-ies) are displaying on top of the geometry in the editor.

You will have some flickering and that's ok, it's the z fighting. You see the primitives as grey solids, the custom build proxy (-ies) is recognizable by the triangulation of it. Too expensive proxy geometry will be displayed red. This tells us that the proxy needs to be reduced in polys.

To hide the proxy (-ies) uncheck the box "Display Proxy". Too expensive proxy geometry will also be displayed in the Asset Zoo, because it is not depended on the level.

Using "Sync Material" and benefits of it

"Sync Material" is a very useful tool that will help you when you're making texture changes in the engine or loose the materials during export.

We will change a texture in the editor as an example and use "Synch Material" to update those changes in 3DS Max.

In the scene a roman pillar has been created, with the material set up and exported into the engine. Now as we're attaching the maps to the materials in the engine.

Once we've done that we switch back to 3DS Max and click on "Sync Material". And as you can see the attached maps appear now in 3DS Max with the correct pathing.