ZBrush to Maya Pipeline_DP_tuts
Embed Size (px)
Transcript of ZBrush to Maya Pipeline_DP_tuts
ZBrush to Maya Pipeline Creating and Rendering Displacement Map Tutorial
Hello Guys in this Tutorial I will guide you a process of generating 32- bit Displacement map in ZBrush and later on rendering in mental ray Maya.
Displacement mapping also known as height mapping, Displacement map is an alternative technique in contrast to bump mapping, normal mapping. Displacement map literally displace the mesh itself based on texture information from a map- usually a grayscale map where white is the highest Displacement and black is the lowest. This allows for highly realistic texture maps as your objects are literally being displaced by the map. This means that any light source casting on the object will cast true shadow & silhouettes. Displacement map are going to differ from bump maps based on their ability to create self shadowing and extend the form past the silhouette and into the surrounding alpha of the render. They are able to do this because they are not just a shading illusion like bump maps are, but physically create new polygons at render time. The downside of DP mapping is that as it is creating actual geometry at render time, it will have a significant impact on the render time.
Lets first look at how to export our geometry from Maya If your model is started in Maya, we will need to export geometry as OBJ format. The OBJ exporter is a plug-in which must be loaded. To load the OBJ exporter go to window>Setting and Preferences>Plug-in manager. It will open the Plug -in Manager as seen below. The OBJ plug-in is called objExport.mll Click the Loaded checkbox.
It is important to note that UV map will required for all this process and make sure your UVs are not overlap to each other, if your UVs are overlap it may create problem
To export mesh go to File>Export Selection click on option box it will open window below select file type to OBJexport and click Export Selection and save the model. You are now ready to import the mesh into ZBrush as Ztool.
Now open up ZBrush and click on Import button under the tool menu to Import OBJ file.
Now, click and drag on the canvas to draw your tool. Immediately press the Edit button on the top of the shelf or press t key on the keyboard to go into edit mode.
When your sculpting is complete your are ready to generate a Displacement map.
Heres how to generate a displacement map in ZBrush. First, adjust the setting according to the following: You will need to step down your geometry level. In Tool palettes Geometry Subpalette, set your SDiv level to level 1.
Set UV map res to 2048 or whatever suitable for you.
You will now generate displacement map by going to Tool> Displacement and turning on Adaptive, Smooth UV, Flip V, 3 Channels and 32 Bit.
Click to Create and Export Map, it will open up a window, save your map. Back to Maya Open your low poly geometry in Maya. With the mesh selected press Ctrl-a to open the attribute editor. Under Displacement Map in the shape node uncheck feature displacement.
Open Hypershade by going to Window >Rendering Editor> Hypershade. Then create a blin material and a take a Displacement shader and by holding middle mouse button drag a displacement shader over blinn material, select Displacement Map
Now double click on the Displacement Shader to open the attributes. Click the checker box
And select the File from pop up window. This will creates a file node in which you can place your displacement map. Your shading network will appear like the image below.
Double click on file node and go to attribute editor and click the folder icon to the right of Image Name to browse the map. You need to convert .tiff file to .map, its mental ray own texture map format. .map file is more efficient and it will render faster. To convert .tiff to .map you have to download a script the
convertfile.bat file and put it on your folder. Find your displacement map thatZBrush generated and drag it into the convertfile.bat icon. This will automatically convert the file to a .map file and place it in the same directory as the original displacement map.
Now go to browse button and load the .map file. And then in the file node under the Color Balance, change the Alpha Gain to 2.2 and Alpha Offset to -1.1.
Now you need to attach an approximation node to this node. Open theApproximation Editor under Window > Rendering Editors > Mental Ray > Approximation Editor,
With the mesh selected ,click create for both Displacement and Subdivision .This will assing these approximations.
Set the Approx method to Spatial and set min subdivision to 2 and max subdivision to 3 and length to 0.10 set same setting for Displacement approximation also.
Thats it, now set your renderer to mental ray and set Quality Preset to Production
Open render view and hit render.
Finally end up with this result. Thank you