Hi
I’m not sure if this was posted on here or not but I didn’t see anything about a method like this. I’ve only been using ZB for a few weeks ( so don’t laugh at my model ) but figured I’d contribute this for those who’d like to know. This is one level stepped down from my high res model, appx 900,000 faces.
I am doing this in Maya 2009 on Mac OS X but it should work in any version/platform of maya that the shaders are compatible with. This doesn’t use displacement, bump or normal but I can show how to add those as well in another post if anyone wants to know.
Here is what you will need:
-
a model (I know, obvious)
-
MinMatcap Shader Download
-
P_Shadow Shader Download
-
Mix20layer Shader Download
Basically import your model into maya and assign a Mix20Layer (Mix8Layer will work too if you have that instead).
Next you are going to click the checkbox next to “base.color” and create a MinMatcap. Alternatively you can create MinMatcap thorugh hypershade (it’s in the MR materials) and middle mouse drag it to the base.color. Click the checkerbox next to the “Matcap Sample” file path which will create an MR Texture node, and then click the folder icon in the MR Texture next to “Image Name:” and choose a matcap image. This can be your own image, but for this I just used the zbrush red clay sample that came with the shader.
Next, back in your Mix20Layer, under “layer.1” section you will make sure “Enable” is checked on, blending mode is set to “multiply”, “o.factor” (this is opacity) is set to .6 and then click the checkerbox next to “color.1” and create a p_shadow shader. There is barely anything in the shader, just make sure “Self Shadow” is checked on or you will get gaps in the shadow, and Mode should be set to 0. Modes 1 and 2 just relate to light linking I believe.
Next, open render globals and make sure mental ray is the renderer. In the common tab go to the very bottom and disable default light. You can also up your sampling and lower contrast threshold in quality tab if you want a better render.
If you render now, your image is going to look dark because we have no light and the p_shadow is basically adding 60% black on top of your matcap. If you want to see what the matcap looks like, just assign the MinMatcap directly to your object and render, it doesn’t needs any light. If you do this, remember to apply the Mix20Layer back to it.
For the final step, create a simple spot light, and turn OFF “emit diffuse” and “emit specular”. Position your light where you would like the shadows to be, making sure the cone is larger than your object and the penumbra encompasses it. Turn on quadratic for decay rate if you want more accurate falloff. Hit “7” on your keyboard in perspective view so you can see the light and crank up the intensity until it’s enough without blowing out the model. Mine is at 9090.900. Truthfully, I don’t think it will matter since we are dealing with shadows only, but it might be good if you decide to use this light in future renders it will be setup already.
Next, open up the shadow portion of your light, turn on “raytrace shadows” and set the “angle” to 20 and the 'shadow rays" wherever you like. the more rays you use, the softer the shadow will look and the longer it will take to render. Mine is at 10. I use raytrace, you can use depthmap if you like. p_shadows should catch both if I remember correctly. I just like the look of raytrace better.
Now you should be good to go. Hit render and you will have a Zbrush-like matcap with shadows. See attachments for each step and render tests.
Hope this helps someone.
D