Entries in maya (3)

Thursday
Jun092016

Male Character Portrait

This is a cinematic character project I have been working on recently. I wanted to explore a few sculpting and detail transfer solutions, along with hair styling workflows between ZBrush and Maya, and skin and hair shading in Vray. 

The hair guides were created in ZBrush using Fibermesh and were used to drive the hairstyle in Maya. The XGen setup is mostly procedural and consists of a couple of modifiers driven by custom expressions that output values based on the hair length. 

The head model was baked in Zbrush with the Multi Map Exporter onto an animation ready mesh, and rendered using displacement maps. 

Sunday
Oct262014

VRay - Physically Based Shader

I am currently working a Vray base shader for dielectrics and metals that has a similar response to the PBR implementations from Marmoset/Unreal/Substance. The purpose of this is to have a material that responds well in different lighting conditions, and that is driven by plausible parameters based on physical measurements. It currently supports both metallness/gloss and specular(F0)/gloss workflows, along with micro roughness control, and should make the texturing process a lot more easier and consistent between different projects.

Download: undoz_vray_PBR_simple_SHD.rar ( Please note that this shader was created before Vray supported Maya’s color management system. That’s why the shader is setup with gamma correction nodes. You can either disable the color management, bypass the gamma nodes, or set the texture color space to raw. Edited: 8-8-2016 )

Usage: Import the shader through the Maya Hypershade window (File>Import). 

The shader is made for LWF (gamma 2.2) and supports both mentalness and specular workflows. The fresnel component is remapped to allow full F0-F1 control, and the F1 component is sensitive to glosiness changes to account for the microfacet normal changes.

 

Monday
Jun162014

Hard/Soft Edges to Edge Creasing - Maya MEL

One of the modeling workflows that I frequently apply in 3ds Max is to use Smoothing Groups to act as a poor man’s creasing. That is done by stacking two Turbosmooth modifiers on top of eachother, with the first one having Separate By Smoothing Groups on and using the Iterations to control the crease amount. 

With the introduction of Pixar’s OpenSubdivs in Maya 2015, edge creasing becomes very appealing and in a lot of cases it can be a huge time saver. One of the major drawbacks I found was that the crease values are easily destroyed when using basic modeling tools, and rebuilding them is a pain in the ass.



With the script below I am replicating the same workflow by using Hard/Soft edges to store and control the creasing of the model. It basically adds a predefined creasing value to Hard edges and removes the creasing from Soft edges. 

I run this after I define the initial Hard/Soft edges, usually with Set Normal Angle, and whenever the edge creasing gets mangled by various modeling tools. The authoring is done only by using Harden/Soften Edge, or by using the commands from the Shelf attached at the bottom. 

 

 

global proc createCrease()
{
        float $creaseValue = 3;
        ConvertSelectionToEdges;
	SelectEdgeMask;
	string $selEdges[] = `ls -sl -fl`;
        string $hardEdges[];
	polyCrease -value 0;
        select -cl;     
        int $i = 0;
        for ($edge in $selEdges)
        {
                string $edgeType[] = `polyInfo -ev $edge`;
                if (`gmatch $edgeType[0] "*Hard*"`)
                {
                        $hardEdges[$i] = $edge;
                        $i++;
                }
        }
        select $hardEdges;
        polyCrease -value $creaseValue;
        select -cl  ;
}


createCrease();

 

Notes:

 I recommend staying away from defining custom crease sets until you are done changing the topology of the model, and only worry about Hard and Soft edges. Maya’s tools are very destructive when it comes to maintaining crease values, and you will end up manually reassigning custom creases after each topology change. The default creasing value in the script is 3, so you can use safely use the H3 and Soft presets while modeling, in case you have to rebuild the creasing with the H/S script later on. These presets mark the edges as Hard/Soft at the same time

 

Please feel free to modify the scripts to your own liking!

 

Download: shelf_U_Crease.mel

To install, copy it to : Documents\maya\2015-x64\prefs\shelves