This tutorial presumes you have already
completed Part 1 and are ready to import your Mudbox model to Maya and Render it in V-ray.
- SETTING UP PTEX DISPLACEMENT IN MAYA
- Open Maya and import the level 0 OBJ you exported from mudbox. Don't try and use the original base mesh that you imported into mudbox.(pic)
- Select your mesh, open the attribute editor, and have your object's Shape node tab selected. Then in the attribute editor's menu click 'Attributes -> V-Ray' and check 'Subdivision', 'Subdivision and Displacement Quality' and 'Displacement Control' to add those extra attributes to your mesh's Shape node.
- Scroll to the bottom of the attribute editor and expand the 'Extra V-Ray Attributes' rollout.
- Set 'Render As A Subdivision Surface' to CHECKED.
- Set 'Subdivide UVs' to UNCHECKED.
- Set 'Edge Length' to a value of 4.0 to begin with, and lower as needed for better displacement quality (At the expense of higher render times).
- Select 'Normal Displacement' from the Displacement Type dropdown.
- Set 'Keep Continuity' to CHECKED.
- Leave all other settings at their defaults. Here is a screen shot of the above settings to verify
- Right click on your model, create a VRayMtl for it with the menus 'Assign New Material' Select a vraymtl and assign it to your mesh.
- With you model selected, open your hypershade, in the hypershade go to the menu graph> graph materials on selected objects. This will show the nodes for your vraymtl material.
- Type 'dis' in the hypershade search box. And click 'Displacement' to add a 'Displacement' node to the work area from maya's list of hypershade nodes on the left, then middle-click-drag from the Displacement node to the VRayMtlSG node and then select 'Default'.
- Now type 'ptex' in the hypershade search box. Add a 'Vray Ptex' node middle-click-drag from the v-ray ptex node node to the Displacement node and then select 'Other...'
- The connection editor pops up. On the left side of the connection editor, click the plus next to 'OutColor' to expand it and select 'OutColorR', then select the 'Displacement' value on the right side to connect them. Close the connection editor.
- Now select the 'VrayPtex1' node in hypergraph, open the attribute editor, and click the file icon next to 'ptex file name' and load the Ptex displacement map file you exported from mudbox during part 1 of the tutorial.
- Let's do a test render. Our Ptex Displacement map should be working but some of the indentations are 'filled in' let's fix that or not quite accurate.
- Select your mesh and open the attribute editor. Select the 'Shape' node and open up the 'extra Vray Attributes' dropdown. Down at the bottom of that you will see a black and white color swatch . Click the 'Displacement Bounds' drop down menu and select “Explicit”
- Click on the black color swatch below that next to 'MIN value'. A color picker comes up put '-1' in the 'V' attribute.
- Do another test render. Now it should be working properly!
- ADD YOUR PTEX TEXTURE
I'm going to add a quick v-ray dome
light, and a directional light with shadows so we can see our model
better. I'm also turning on GI rendering because this is what I will
be using in my final render.
- In your hypershade select your VrayMtl1 material, and pull up your attribute editor for it on the right side of maya.
- Now in the hypershade type ptex in the search box and create a new Ptex node, select it in the hypershade. In the atribute editor Click the file icon next to 'Ptex File Name' and locate your Ptex texture we exported from Mudbox during part 1.
- Now select your VrayMtl in the hypershade to bring up it's attributes.
- Middle mouse button click and drag the VrayPtex2 node onto the Diffuse Color slot in your vraymtl material.
- Open the Maya Render Settings window, go to the 'V-Ray' tab, and open the 'Global Options' rollout. Make sure that the checkbox next to 'Displacement' is checked.
- Render again and the texture should be applied. If you need to add any more maps bump, specular etc. Just create a new ptex node in the and middle mouse drag it into the appropriate slot of your material.
That's it! You can now use Ptex files you have painted in Mudbox in
V-ray for Maya! The cool thing is it's not hard to bring your PTEX back to a UV workflow. But that is a topic of another tutorial. :) Comment below if you are interested in a tutorial on that!
Please check "HELPFUL" below if it was, if not COMMENT below and tell me why! Don't miss another tutorial or tip! Subscribe to Maya Zest
Please check "HELPFUL" below if it was, if not COMMENT below and tell me why! Don't miss another tutorial or tip! Subscribe to Maya Zest