UPDATE MAY 2016
I’ve released a tutorial which covers the subject of the MODO to ZBrush workflow in much greater depth:
This is the final result from our new FlippedNormals Tutorial: The Complete MODO to ZBrush Workflow. In short, it’s an elaborate 3D tutorial on how to use ZBrush together with MODO (or any other 3D software for that matter) using an industry proven and efficient method. We cover all the steps, including:
- Displacements In-Depth
- Setting up Displacement maps in MODO (can easily be transferred to Vray, Arnold, etc)
- Appealing Lighting
- Photoshop Postwork.
This tutorial is going to be similar to the one I have on how to get a displacement map from ZBrush to Vray for Maya. We’re going to look at how to get the ZBrush – modo workflow going.
Displacment maps. The words sends shivers down the spine of any CG artist. It’s a topic I’ve spent countless hours trying to wrap my head around. In this tutorial we’ll look at a reliable way to use 32 bit displacement maps in modo generated in ZBrush. You have significantly more data to work with so your displacement will be more accurate and will contain more information. I’ll assume you know the difference between a normal, bump and displacement map, and why a displacement map is necessary. If not, you have some googling to do.
Let’s get started. Here is the mesh in Zbrush which I want to transfer to modo. It’s about 4 mill polys and it’s fairly detailed. It has been retopologized to make sure that the topology is good, and it has UVs with little to no stretching. It’s extremely important that your UV map is good, otherwise you’re going to see nasty artifacts and stretching in the render once you apply your maps.
Alright, let’s jump into ZBrush We’re going to use Multi Map Exporter (MME), which is a relative recent plugin in ZBrush. You can find it under Zplugin in your top menu. This is your friend and you should know it well. Before we had this thing of beauty, we had to export every map manually, which is a tedious process. With the MME, you can export several maps at the same time where you have more control over them. It also supports multiple UV tiles. This is a huge thing when you’re working in a production and your UVs are laid out over several tiles. Traditionally, multiple tiles are hard and convoluted to work with in ZBrush, so this is wonderful. More info regarding the MME
Open the plugin up and you should hopefully not be too overwhelmed by the wall of text and buttons. Check Displacement in the very top. Here you can adjust your size, export map for all visible subtools, et cetera.
Set the size to whatever you need, in my case I need a 2k map.
Enable Flip V which will flip the maps vertically, which you always have to do in Zbrush due to some weird voodoo by Pixologic.
Next, hit the friendly looking button which says Export Options. This is where the options for the various maps can be found. You want to click Displacement to bring up the options for the displacement map.
Now we have a couple of settings which we need to know about
SubDiv Level: This dictates which subD level the displacement map will be generated from. You normally want this set to 1 as the displacement will then be generated from the lowest level, meaning that the map will have the difference between the lowest and highest level. This overrides the current subD level your model is currently in, which means that if your model is set to level 5 and your SubDiv is set to level 1, then the map will be generated from level 1. I sometimes use this to make bump maps. If I set my SubDiv level to 4 out of 6, the displacement generated will only include the finer details, so it can be used as a bump.
Adaptive: If pressed, the map will be of higher quality, but it will take longer to generate. I always have this on when exporting a final displacement. I leave it unchecked when doing tests.
DpSubPix: Now this is an interesting one. Initially I thought this was only a quality slider, where 0 was the worst and 4 was the best. It’s not. This is what Matthew Yetter from Pixologic writes about it.
This is most likely unnecessary and is definitely a significant drain on resources. DPSubPix is mostly a dinosaur, held over from when ZBrush couldn’t handle models in the 10′s of millions of polygons. What that slider does is to virtually subdivide the model a number of times equal to the slider setting before then creating the map. Its purpose is to let you create a larger map than what your current number of polys would allow.
A 1 million poly mesh is ~ equal to a 1K texture map. If you want a 4K map, that would mean that you’d get a lot of artifacting caused by interpolation while the map is being created. You’d want to divide the model twice to bring it to 16 million polys, which is ~ equal to the number of pixels in a 4K map. In ZBrush 2, you couldn’t get to 16 million polys so you’d use a DPSubPix value of 2 and get a nice, clean map. With ZBrush 4.x you CAN hit that many polys easily and so you can subdivide the model yourself, do some more detailing and then create the displacement map without DPSubPix.
Now if you have a 20 million poly model and you’re using a DPSubPix value of 4, guess what happens? You’re telling ZBrush to first calculate over 5 billion polygons and then create the maps. Even just a DPSubPix value of 1 is enough to hit 80 million polys. Not only will it make most any computer puke, it’s also calculating WAY more data than the displacement map could possibly hold.”
The TL;DR version? Disable it. It takes A LOT longer to extract the map. One test I did took 23 seconds with it disabled and 5 minutes with it set to 4. The quality was identical.
Smooth UV: This will smooth your UV, as you might have guessed. Might or might not be preferable, depending on your project. If unpressed, your UVs will be rigid, which might be what you want. By default, modo will smooth your UVs so this might be preferable. In this example though, I will NOT smooth the uvs. It’s extremely important that you’re consistent here, otherwise you will have issues with seams.
Mid: This is the mid range for the displacement. When using 32 bit maps, you want your mid range to be set to 0. By default the mid range will be 0.5, meaning 50% grey, which makes no sense when using 32 bit images.
3 Channels: Will give the displacement information in all channels instead of just the red one. Enable this.
32 Bit: Enable this. Otherwise you cant get a 32 bit map.
exr: You want to enable this, as this will save your files as EXR-files, which are far superior to tif-files when it comes to displacement maps.
Scale: Don’t touch this.
Intensity: Don’t touch. There is a way where you can use the intensity with 32 bit maps, but frankly, there’s no need to do so.
16 Bit Scale: Only relevant when using 16 bit maps.
Get scale: Can be handy, but don’t touch this for this particular workflow.
In short, there are the settings you want for top quality:
Now hit Create All Maps and chose the directory you want to save it to. Yo Give it a couple of minutes and you should be set. As a general rule, I never touch the computer while Zbrush is calculating. Sometimes it freezes and crashes when you touch it. Export your base mesh at the level you want, preferably the lowest one.
Leave the ZBrush window active while the maps are being generated. This will make the maps generate faster, according to the developer of MME. It will generate regardless of ZBrush being the active window, but it will slow down if you Alt+Tab to something else.
There’s a bug in modo which means you can’t import 32 bit TIFF-files. It’s easy to go around though: Open the newly generated map in Photoshop and simply save it as an .EXR It will look something like this. Just because you cant see all the information doesnt mean it’s not there.
File – Import and select your Obj file. Organize your file and give the different items appropriate names. This will save you so much trouble later on.
Remember how we made the displacement map with Smooth Uvs unchecked? Now is the time to change this. Click on the mesh item and enable Linear UVs
Here you can see the difference between linear and smooth UVs.
Lets head over to the new, sexy render layout found in modo 701. Select the model you want to displace, here the body, hit M to give it a material. Again, give it a proper name.
Now we need to assign the displacment map to our fishy. The easiest way is to simply drag it from the explorer to the shader tree. By default it will be set as Diffuse Color. As this is a scalar map (as opposed to a color map) the gamma should be set to 1.0. In other words, dont touch the gamma if you’re rendering in linear workflow. If you’re not rendering in linear workflow, shame on you; you should.
Right Click on the newly imported texture map, Surface Shading – Displacement
This is what it looks like currently. Apparently nothing is happening. Either the map simply isnt working, or it’s not strong enough. In this case, it’s simply not strong enough.
This is the million dollar question: How the heck to you know how strong you should set the displacement map to be? What magical numbers work every time? I’m going to be completely honest here: I dont know. In vray, there is a way to do it which works every time, but I havent found anything like this in modo yet. That said, setting the Displacement Distance to 1 meter seems to work in most cases, but this can vary from scene to scene.
This is with a Displacement Distance set to 1 m, rendered out.
If you want to have better visual results with the displacement, enable Displacement as Bump under Settings
And there we go! That’s how you successfully render a displacement map from Zbrush in modo. It’s really a rather simple procedure once you know how.
I hope this is helpful!
If you have questions, corrections or general comments, feel free to email me at henning.sanden [at] gmail.com