© Abhishek Kumar 2020
A. KumarBeginning PBR Texturinghttps://doi.org/10.1007/978-1-4842-5899-6_16

16. Integrating with Blender, Maya and Marmoset

Abhishek Kumar1 
(1)
Varanasi, Uttar Pradesh, India
 

Exporting files from Maya and Blender for use in Substance Painter is pretty straightforward. Substance can import most major file types including .fbx and .obj, which can be created by all 3D modeling applications. For our purposes, we will use the .fbx type for exporting files for use in Substance Painter.

To export files for use in Substance Painter, you will usually have one high poly model from which you will bake maps into a low poly model. If you are not creating your own mesh for games, then you can directly texture the high poly model.

One important thing that you need to keep in mind while exporting anything for use in Substance Painter is that your mesh needs to be properly UV mapped with no faces overlapping or leaving the 0-1 space. Also, each UV island should have enough texel density to correctly display the textures. UDIM tiles can also be used in supported programs, and Substance will create a new texture set for every UDIM tile it finds.

Low Poly and High Poly Workflow

If you want to export both low poly and high poly models, then you need to keep certain things in mind. First you need to ensure that both low poly and high poly models are in the world origin and are overlapping each other. This means they should be at the same point as Substance Painter casts rays with reference to their position and should bake information from high poly to low poly mesh based on their position. If they are not in the same spot, then there will be errors in the bake (Figure 16-1).
../images/492314_1_En_16_Chapter/492314_1_En_16_Fig1_HTML.jpg
Figure 16-1

Both high poly and low poly are in same place

In Figure 16-1 you can see that both low poly models and high poly models are in the same place such that they overlap each other and start z-fighting. This may look odd, but since they are in separate layers, they can be exported individually while staying in the same place. And yes, the low poly model and high poly model both are exported separately.

Naming meshes for baking is important (unless you decide to exolode the mesh, which we will discuss later). As you have seen before, baking in Substance Painter happens through an option called Match; this option has two types. One is called Always, and another one is called By Mesh Name. Baking parts of the mesh that are close together can cause shading issues. So, you can either name mesh parts appropriately or explode the mesh.

Naming mesh parts should be done in a comprehensible way, and each part of the high poly model should have same name as its corresponding low poly part. The _low and _high suffixes should appear in the names. See Figure 16-2 as an example of how naming is done.
../images/492314_1_En_16_Chapter/492314_1_En_16_Fig2_HTML.jpg
Figure 16-2

Naming conventions for baking

Now, if you have named your mesh properly, then Match: By Mesh Name should work correctly and save you from any shading artifacts caused by parts of the mesh that are too close.

Exploding a mesh works in a similar way. Exploding a mesh (Figure 16-3) means separating each part that is not connected by faces and laying them so that, during baking, close together parts d`on’t introduce baking artifacts.
../images/492314_1_En_16_Chapter/492314_1_En_16_Fig3_HTML.jpg
Figure 16-3

An exploded mesh

If you have exploded your mesh, then you can bake with the Match: Always setting and your bake should be error-free.

There are a lot of other things to keep in mind as well such as your low poly model should match the high poly model as closely as possible. Your low poly and high poly models should be roughly the same size.

Blender to Substance Workflow

Make sure you have done all the previous preparations, as mentioned previously. Make sure only the layer that contains a low poly model is enabled and select everything visible (Figure 16-4) by clicking and dragging a box around everything.
../images/492314_1_En_16_Chapter/492314_1_En_16_Fig4_HTML.jpg
Figure 16-4

Visibility off and on

After completing these steps, select File ➤ Export ➤ FBX. Once you click FBX, the export window will open (Figure 16-5).
../images/492314_1_En_16_Chapter/492314_1_En_16_Fig5_HTML.png
Figure 16-5

Default exporter window of Blender

In the bottom-left menu, you will find a lot of settings that you can modify before exporting your file out of Blender. Select the Selected Objects checkbox and click Mesh so that only Mesh is highlighted, instead of everything. This part of the menu should look like Figure 16-6.
../images/492314_1_En_16_Chapter/492314_1_En_16_Fig6_HTML.jpg
Figure 16-6

Export settings

Now click the Geometries tab in the window. There should be a Smoothing option, and by default it should be set to Normals Only. See Figure 16-7.
../images/492314_1_En_16_Chapter/492314_1_En_16_Fig7_HTML.jpg
Figure 16-7

Geometries tab and Smoothing option

To export a file for use in Substance Painter, the default Smoothing option Normals Only should work fine, but sometimes you may need to set it to Face. Experimentation is the best strategy here.

Now set your name for the file; let’s say in this case you name it Filter_low. Select the export destination and click Export.

Now do the same for the high poly model. Hide the low poly model by clicking the eye icon on the folder containing it. Unhide the high poly model by clicking the closed eye icon, and it should be visible again. Now select everything and export them as well.

For simple models, this export method works well, but if your model is complex and has multiple UVs, then you should assign different materials to each of its parts (Figure 16-8).
../images/492314_1_En_16_Chapter/492314_1_En_16_Fig8_HTML.jpg
Figure 16-8

Blender material editor

You can create a new material by clicking the + icon and then clicking the New button. Select the material you want to apply on your mesh by selecting it from the list and clicking Assign after selecting the surface on which you want to assign it.

Now you can export, and once you import the file into Substance, a new texture set will be created for each new material.

Maya to Substance Painter Workflow

All the concepts that we discussed for Blender apply to Maya as well. The only thing that is slightly different is the method of exporting. Select everything that you want to export, in this case, the low poly model of the filter. Then select File ➤ Export Selection.

Note

Before exporting your object from Maya, make sure you delete the type history and then freeze and reset the transformation.

Click the “File type” drop-down menu (Figure 16-9) and choose “FBX export” from the list. Now click the Export Selection button (Figure 16-10), and a new window will open.
../images/492314_1_En_16_Chapter/492314_1_En_16_Fig9_HTML.jpg
Figure 16-9

Maya export window

In this new window, name your file appropriately so that it is easy to identify. Then choose the output directory where you want your file to be exported. Click Export to export your scene as an .fbx file in the desired location.
../images/492314_1_En_16_Chapter/492314_1_En_16_Fig10_HTML.jpg
Figure 16-10

Export selection window

This method of exporting files for use in Substance Painter remains universal for almost all software. The only thing that changes is the interface and slightly varied names of tools. So, if you want to send your scene/model to Substance Painter, then I highly recommend that you simply export it as an .obj or .fbx file, and it should be easily transferrable to Substance Painter.

Once again, I would like to stress that files that need to go to Substance Painter need to UV mapped properly and named properly if needed. To avoid shading errors, you can separate each part of the mesh as an object and name the objects appropriately with the correct suffix. Alternatively, meshes can be “exploded” so that during baking no errors occur.

If everything is done accordingly, then you will have no problem importing a file into Substance Painter and also getting a clean bake, which is very important.

Importing into Blender, Maya, and Marmoset

So, you have now exported files for use in Substance Painter and have done some texturing. Now you want to export the file to your preferred render engine to create some renders or maybe integrate it into a scene. Whatever your end goal may be, your first target is to export your textures for whichever render engine you want to use.

Exporting from Substance for Use in Blender

To go from Substance to Blender, you will begin by exporting some textures for use in Blender. Once a model has been textured, Substance can bake all the textures into UVs of the models, and then only the texture maps need to be exported. These texture maps can be exported into the 3D modeling and rendering application of your choice. But remember, different programs require different maps for rendering. We will see this in detail now.

Once you have finished your texturing work and want to export your creation, then select File ➤ Export Textures or press the shortcut key combination Ctrl+Shift+E. This will launch the export window of Substance Painter (Figure 16-11).
../images/492314_1_En_16_Chapter/492314_1_En_16_Fig11_HTML.jpg
Figure 16-11

Export window of Substance Painter

Before you click Export, you’ll see there is a multitude of options that allow you to personalize your export for the render/game engine you want to import it into. Click the Configuration tab to see all the options available (Figure 16-12).
../images/492314_1_En_16_Chapter/492314_1_En_16_Fig12_HTML.jpg
Figure 16-12

Export configuration

Now for the convenience of the user, the exporter of Substance Painter has some template configurations with preset settings that make the exporting process easier and faster (Figure 16-13). But as of now, there is no template for Blender.
../images/492314_1_En_16_Chapter/492314_1_En_16_Fig13_HTML.jpg
Figure 16-13

Configuration templates available in Substance Painter

The best configuration for Blender is PBR MetalRough because Blender is a physically based render engine and uses metallic and roughness maps for rendering. One thing to note here, though, is that Blender uses OpenGL normal maps. This means while creating a project, you need to set the normal map format to OpenGL. You can also use the “Converted maps” section of the export configuration to create maps that you did not work with here but that work with the metallic-roughness workflow.

Now let’s export our maps for use in Blender. First click the Config drop-down menu and choose PBR MetalRough from the list. Then choose your output destination. Now click the image format drop-down list (see Figure 16-14) and choose the “bmp” format (or any other image format you want). By default, it should be set to png.
../images/492314_1_En_16_Chapter/492314_1_En_16_Fig14_HTML.jpg
Figure 16-14

Image format menu

After that, set the document size to be 2048x2048. Now click the configuration tab and choose PBR MetalRough from the presets list. Right-click PBR MetalRough in the presets list and click Duplicate. This should create a PBR MetalRough_copy preset at the end of the list. Right-click it and rename it to Blender.

In the “Output maps” list, delete BaseColor by clicking the small X button at the bottom of the map name. Now create a new RGB file by clicking the RGB button at the top where it says Create (Figure 16-15).
../images/492314_1_En_16_Chapter/492314_1_En_16_Fig15_HTML.jpg
Figure 16-15

Creating a new output channel

You will notice that output maps in Substance Painter have a pretty complex naming convention. You need to name your newly created map similarly. Either you can read the name of one of the maps shown and type it in or you can copy the entire name of one of the maps shown, let’s say $mesh_$textureSet_Normal, and paste it into the name slot of your newly created map and then replace Normal at the end with Diffuse.

Now go to the “Converted maps” list and drag and drop Normal OpenGL into the RGB map slot of the Normal output map. A new menu should open as soon as you release your mouse (see Figure 16-16). But remember that if you have not created your project with an OpenGL normal configuration, then the export will fail.
../images/492314_1_En_16_Chapter/492314_1_En_16_Fig16_HTML.jpg
Figure 16-16

Changing the Normal map output type

Choose RGB Channels from the list. This should change the Normal map output type to OpenGL. Now you need to drag and drop Diffuse from the “Converted maps” list to the new Diffuse output map slot that you created. This time, again choose RGB Channels from the list that appears.

You can remove the Emissive and Height channels as you don’t need them unless you have created something specific that uses those channels. You final output channel list should look something like Figure 16-17.
../images/492314_1_En_16_Chapter/492314_1_En_16_Fig17_HTML.jpg
Figure 16-17

Output maps list

Now you can go back to the Export tab, choose your destination, and click Export.

This should create all the required maps for you in the directory that you chose. Those maps can now be imported into Blender and set up to work with their respective meshes, something that you will learn how to do in upcoming chapter.

Exporting from Substance for Use in Maya

Exporting files for use in Maya is not very different; in fact, it is much simpler. In this section, you will export for one of the latest render engines introduced to work with Maya: Arnold. Substance Painter has a preset for that render engine, so this will make exporting fast. The preset that you are going to use is “Arnold 5 (AiStandard),” as shown in Figure 16-18.

In the export window, click the Config presets drop-down menu and choose Arnold 5 (AiStandard) from the list.
../images/492314_1_En_16_Chapter/492314_1_En_16_Fig18_HTML.jpg
Figure 16-18

Arnold 5 preset in Config presets list

If you go to the configuration settings and take a look at the Arnold 5 (AiStandard) preset, you will see that it is similar to the PBR MetalRough preset (see Figure 16-19). This is because the Arnold 5 render engine is also a PBR-based render engine that uses the metallic-roughness workflow. That is why the maps queued for export are the same as the PBR MetalRough preset (except the normal map that will be exported in the OpenGL format).

In this particular case, you could have exported the textures in the PBR MetalRough preset as well. This would have been fine except that you would need to change the normal map format.
../images/492314_1_En_16_Chapter/492314_1_En_16_Fig19_HTML.jpg
Figure 16-19

Configuration preset for Arnold 5 (AiStandard)

Now switch back to the Export tab because we need to change some more settings here as well. First change the bit depth of the “png” setting to 16 bit and change the document resolution to 2048x2048 (Figure 16-20).
../images/492314_1_En_16_Chapter/492314_1_En_16_Fig20_HTML.jpg
Figure 16-20

Export settings

Make sure you choose the correct directory where you want your exported maps to be saved. Also, make it a practice to name files properly so that they are easy to identify and work with.

That’s all for the Maya export process; you are now ready to import the materials into Maya and set up the textures. In the next chapter, I’ll discuss the process of importing maps into the render engine of your choice and rendering a portfolio-ready image.

Note

Remember that the naming convention is important for each object and material.

Exporting from Substance for Use in Marmoset Toolbag

Exporting textures for use in Marmoset Toolbag is no different from the others that I covered previously except that some of the settings will change. So, let’s see what we need to do.

The first thing that you need to do before you begin texturing is to know what your target render engine is. If it is Marmoset Toolbag 3, then it supports both the specular-glossiness and metallic-roughness workflows. This is a huge advantage as you can create your textures in any format and easily bring them over to Marmoset to create renders. But in this section, you will learn to export using the specular-glossiness workflow to get a taste of it. However, you can also export using the metallic-roughness workflow if you want.

Once again, you will launch the exporter window and click the Config presets drop-down menu. Choose PBR SpecGloss from MetalRough from the list (Figure 16-21).
../images/492314_1_En_16_Chapter/492314_1_En_16_Fig21_HTML.jpg
Figure 16-21

PBR SpecGloss from MetalRough option

This will convert your metallic-roughness maps to specular-glossiness maps during export so that you can export them into Marmoset Toolbag. Marmoset Toolbag uses the DirectX normal map format, so there are no problems there.

You can switch to the Configuration tab to see which maps are selected for export (see Figure 16-22).
../images/492314_1_En_16_Chapter/492314_1_En_16_Fig22_HTML.jpg
Figure 16-22

Configuration for PBR SpecGloss from MetalRough option

These maps are used by Marmoset Toolbag for creating PBR renders, so we will export them. Once again switch back to the Export tab and set your export destination. Then change the rest of the settings according to Figure 16-23.
../images/492314_1_En_16_Chapter/492314_1_En_16_Fig23_HTML.jpg
Figure 16-23

Image parameters for export

Once you’re done, you can click Export.

In the next chapter, I will discuss the process of importing maps in the render engine of your choice and show how to render a portfolio-ready image.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.193.232