Search Maya Zest

Monday, July 22, 2013

Ptex displacement and texturing in Mudbox to V-ray for Maya PART 2

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.
  1. 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)

  2. 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.

  3. Scroll to the bottom of the attribute editor and expand the 'Extra V-Ray Attributes' rollout.
  4. Set 'Render As A Subdivision Surface' to CHECKED.
  5. Set 'Subdivide UVs' to UNCHECKED.
  6. 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).
  7. Select 'Normal Displacement' from the Displacement Type dropdown.
  8. Set 'Keep Continuity' to CHECKED.
  9. Leave all other settings at their defaults. Here is a screen shot of the above settings to verify

  10. 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. 

  11. 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.

  12. 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'.

  13. 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...'

  14. 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.

  15. 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.

  16. 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.

  17. 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”

  18. Click on the black color swatch below that next to 'MIN value'. A color picker comes up put '-1' in the 'V' attribute.

  19. Do another test render. Now it should be working properly!

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.

  1. In your hypershade select your VrayMtl1 material, and pull up your attribute editor for it on the right side of maya.

  2. 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.

  3. Now select your VrayMtl in the hypershade to bring up it's attributes.
  4. Middle mouse button click and drag the VrayPtex2 node onto the Diffuse Color slot in your vraymtl material.

  5. 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.

  6. 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