Showing posts with label Maya. Show all posts
Showing posts with label Maya. Show all posts

Saturday, April 28, 2012

Symmetry can help uv lay-out


Symmetry can help uv laying out
When you work on a character that is symmetrical, halfway done is almost done.
You can just work on one half and mirror that to the other side.

Here's a character's head and its uv.




I select the uvs on the right side only and apply unfold and relax to smooth out the uvs a little bit.



Wednesday, April 25, 2012

One weird normal map error.


I found this weird error when I was using a normal map in Maya.
If you attach more than one bump2d node to a single file node and use these bump2d nodes as a normal map, whether set to Tangent Space Normals or Object Space Normals, this will cause a problem.
The object's color doesn't show up and the surface normals get messed up.


 
Here I have a simple shader connection.  A blinn shader with one normal map input.
The render looks like this.


I  create a new shader and used the same file node as a normal map through a new bump2d node and assign this new shader to the right plane.



Tuesday, April 24, 2012

Optimizing the portal light.

Traditionally, to simulate the illumination that comes through the window, area lights are placed in the window. This method is enhanced by using portal light which obtains its intensity and color from the environment outside the window.
The portal light helps in a great deal reducing Final Gathering's noise and since it's a light source it can cast shadow.


 
 Here's a scene with a room. I have set up an area lights for each window and a portal light is connected to each light.



 This is the spherical environment texture used for IBL as a primary environment for Mental ray in HDR format. It's a very high resolution texture. ( 6250x3125)
Using the default setting, this is the initial render result.



indirect illumination for skin shading








In this post, I will talk about applying indirect illumination to the skin shader  using ambient light and AO
Mental ray's  misss_fast_maya_skin shader is a  one of the better skin solutions.
Like its name implies, it's fast and quite easy to accomplish a quick skin look.
But if you look for more realistic results, you need to provide with indirect illumination to the skin.
First of all, you need to approach the skin shader from two different directions. direct and indirect illumination.
Most of the skin tutorials generally deal with direct illumination part only.
Sometimes direct illumination only can create a satisfactory result, especially for cartoonish look characters.
But a realistic human skin cannot go without considering the indirect illumination.
So, I'd like to show a method of doing this, not using expensive final gathering but ambient light and AO combo.
Here's a scene with a head model. A skin shader is alreay assigned to it.



I have set up two light sources. One from the front for epidermal and subdermal scatering and the other from the back for back scattering.

Area 1: This is where the direct illumination hits the sufrace.
Area 2: This is where you can see scattering.
Area 3: This is where no illumination or scattering is found.


Sunday, April 22, 2012

miLabel attribute to control ambient occlusion


Mental ray's ambient occlusion material doesn't respect transparency and this can create undesired occlusion for transparent materials like windows.
You can easily turn on and off AO for a certain object using miLabel attribute.
Let's look at the simple scene here.

  


 
All three objects in this scene are assigned with the same ambient occlusion material.
What if object#2 is a transparent object like window. If the window is transparent enough,  it should not cast that much occlusion on the floor.



Flexible shading on Maya Fur and Hair




Maya's native fur shading doesn't give you much flexibility.  So often times you want to use
another shader but Maya's default fur and hair shaders are hard-coded it
 doesn't let you assign a shader of your choice.
 I'll take a look into what to do to override the default material.
Here's a simple scene with two spheres.
The left one has fur assigned to it and the right one has hair.



 
Here's the render result that looks alright but with a better shader it will look better.


 

Saturday, April 14, 2012

How to make Mental ray's tessellation match Maya's tessellation in Nurbs.

When you use nurbs surface, from time to time, you might want to how its tessellation.
You can simply turn on Display Render Tessellation option under Tessellation section in the attribute editor to see it. But that's for Maya software render and  doesn't necessarily match Mental ray's tessellation.  To be able to mental ray's tessellation, you need to use Mental ray's contour rendering feature.
Here I have two simple nurbs sphere. For comparison,  I turned on Display Render Tessellation option
for the sphere on the right side. And I also turned on Enable Advanced Tessellation. This is to explicitly assign the number of tessellation for each span for the sphere.




 
Next, I will create a new surface shader and assign it to the sphere on the right. This shader is for contour line.  After the shader assignment, select the shader's shading group node and open the attribute editor.



 

How to use Maya's 2d motion vector pass for Nuke's vectorBlur. (2of2)

In Nuke, you need to use VectorBlur node. ( under Filter menu )
The VectorBlur node has just one single input. This means the input source image must carry its own motion data, in this case, the separately rendered out 2d motion vector pass.
To do this, you need a ShuffleCopy node ( under channel ). 
Check out the connection.
And set up the node like it's seen in Pic_2. Notice that the R and G channel of the 2d Motion vector image feed the u and v motion channel of the Masterbeauty pass.





Friday, April 13, 2012

How to use Maya's 2d motion vector pass for Nuke's vectorBlur. (1of2)

We all know that motion blur is one of the essential effects to accomplish better realism but it generally requires a long rendering time, especially when using full 3d motion blur of Mental ray renderer.
As an alternative,  2d motion vector methods are widely used since it is a cheaper and still very effective and flexible solution.
There are some good articles and tutorials that you can find in the internet about 2d motion vector methods but I will focus on a more specific issue in this article which is a sync problem.  
First, let's take a look at what really happens when motion blur is on, in terms of moving objects' position.


Here's a very simple five-frame animation.

Pic 1. Master beauty



Click the image to see the moving stick.
The animated stick moves by one notch at a time so the moving stick is perfectly aligned with the sticks at the bottom at each frame.


Now you turn on 3d motion blur in Render Settings and you'll get this motion-blurred animation.



Pic 2. Master beauty 3d motion-blurred