The Layering Library (MILA) Part 1

In Maya 2015, the Layering Library (MILA as we will call it) was integrated for use. This is an initial integration and will evolve through advancements and feedback.

Part One will discuss some basics before getting to the UI inside Maya.

You can find other details on the Official mental ray blog with Bart’s first post on MILA.

betterTrees

Why MILA? Isn’t the MIA (Architectural) material good enough?

Artists have noticed when using the MIA (Architectural) material that complexity adds render time. In fact, the more you layer and tweak the MIA material, the worse it can get on an exponential level. The MIA material would spawn rays to sample the scene at a high rate even if it was a third or fourth level of trace depth. When layering the MIA material, each layer would complete the entire job of shooting rays and sampling lights before combining output, even if that work wasn’t visible in the final result.

The MILA material avoids this. It uses better techniques to reduce work done by the renderer. This means layering the material or using high trace depth has less (or no) impact on the render time or quality. This is important for better and easier realism in an image.

The MIA material also had a few features that users have decided they didn’t like or were rarely used. The glossy reflection curve had a drastic change near the 0. point, making it hard to paint textures for. The interpolated reflections weren’t used often and required tuning. And other features like tuning reflection rays weren’t always intuitive.

MILA moves towards a “roughness” parameter for glossiness that is more linear and easier to texture. It also has a more accurate glossy reflection model. Rarely used settings or “tricks” were removed in favor of straightforward operation. And in keeping with the mental ray shift in usability, simple Quality controls are used to tune the result of the material instead of tweaking numbers. The Quality controls also understand the settings in the material itself and attempt to self-adjust for better renders from the beginning.

Why component based?

Many times an artist would want to add a simple reflection layer or maybe some dirt to a MIA material. This meant adding a completely new monolithic material on top for a single and simple job.

Component based selections mean effects or interactions can be added as necessary.

MILA also follows the design of the Material Definition Language (MDL). Coming in mental ray 3.13, the MILA materials will lead towards this rendering workflow.

Anisotropic MDL model

 

Understanding concepts and terms.

In using MILA there are a couple things to talk about. Before getting into the actual components, there are types of interactions to think about. This will make creating a material easier to understand later.

Reflection versus Transmission

-Reflection is a ray that strikes the material and bounces off. This can be the traditional “reflection” we’re used to as well as diffuse reflection where light strikes and comes off an object back into the scene. This lets us see the reflected light from the object(s). A specular or mirror-like reflection is easy to understand. Diffuse reflection is the same thing but the light reflected back is diffused (not sharp). So the concept is the same in graphics.

-Transmission is when a ray passes through an object. This is traditionally noted as something like “refraction” but covers all types of transmission. Diffuse transmission is commonly known as translucency.

The names of the components and the direction of the energy (ray) can be described visually using the image below:

From the docs. ® nVidia

From the docs. ® nVidia

Why these names?

As mentioned above, the move to MDL makes for renderer agnostic materials. Using these names also helps associate with Light Path Expressions (LPE) which are also renderer agnostic. For example, “reflection” can mean a lot of things to different renderers. But “diffuse reflection” is specific.

Direct versus Indirect

-Direct effects are a result of light directly affecting the material. The light path is from the light to the material with nothing in between.

-Indirect effects are a result of light that has interacted with something else before reaching the object.

Components have these names in their description to help you choose the effect you need:

MILA Components Menu

MILA Components Menu

More details can be found in the previous post about the Beta testing of the Layering Library. Integration has changed the UI and the workflow. That process will follow in the next parts of the blog.

On to part 2 with explanations on the Base components and more.

 

 

About David

I am a VFX artist that specializes in Lighting and Rendering. I spend a fair amount of my time supplying clients with artistic solutions as well as technology solutions. With a background in fine art and technical animation training, I strive to bridge the divide between the artist and technologist.

Posted on April 18, 2014, in shaders. Bookmark the permalink. 36 Comments.

  1. Hi David, in 2015, I can’t find attributes such as single Env sample and No highlights for visible area light. Can I expect these in the future release? I remember these were included in the beta.

    • These became global string options but may have been removed after that since they mean nothing for MDL. The old string options can be tried, I dont have them with me though. A forum search might turn them up.

  2. Hi, I’m new in Maya and Mental Ray, this Mila material will be the standard for Mental Ray? the tutorials i have is for Mia_Materials, and i really liked this new Mila, it’s better to learn the Mia first and then jump to Mila?
    Thanks for your attention.

    • MILA is future proof as it moves towards MDL. But learning the mia material is still useful but legacy.

      • Sorry, i forgot to ask something too haha.
        Like, if i want to render a car, it’s better to use the car_paint or Mila? just an example.

      • I would use MILA. It’s physically correct and has better flake options for metallic paint.

      • so, Mila material is better in everything, right? for skin and other things? sorry for the dumb questions, i know nothing about Mental hehe.

      • MILA has a lot of improvements beyond the mia_material. So yes, overall it’s better. But since it’s new there are a few things to work out with the Maya workflow/integration. But this will replace the mia_material completely in the future.

      • Oh, thanks for the reply’s. It’s because i was planning to see some Gnomon Workshops tutorials (forest techniques) and Digital tutor’s tutorials (like automotive rendering and other things) and i tought that wouldn’t worth learning.

        So i’ll see these tutorials, understand mental ray light, settings and the materials to get used to hypershade, and than, start learning the Mila_material.

        Do you recommend?

      • Most tutorials right now will use legacy shaders but they aren’t a bad idea to learn.

  3. Hi David,

    I’m feeling existed to try out the layering library(MILA), but I couldn’t find it in maya 2015. Do I missing some thing or where I can turn it on. Thanks

    Regards,
    Tom

  4. Hey I’m trying to make a glass of milk with mila shaders, I have the to models slightly overlaped, I render each by its own and looks ok, when I render both together the glass looks ok but the milk just looses the scatter look, any tips on how to aproach that?

    • Make sure you’re using the correct depth for your final gather rays and raytrace depth. These shaders are more reliant on physics of the real world.

      • I did turned on, and still looks like the material of the milk doesnt have any scatter, I set the final gather tracing up to 8 on reflections and refractions and 16 the max trace depth, and the raytraincing is to 10 for reflec and refract and 20 max trace depth

      • It’s possible if they intersect the scatter node cannot function, I would say offset the meshes sightly.

      • Ok, I did that, now the scatter works, the glass works, but I have the problem where you can see the border of the glass, beacuase they are not touching, I know with the dialectric material you have to use three shaders and three pieces of geometry for this to work to emulate the air to glass to fluid IOR interaction, I even could send you my scene, is very simple scene thou, maybe I’m not setting the mila shaders right

      • You might post it to the ARC forum. It would take me awhile to get to it.

  5. Transmission is when you want the rays to pass though the object. At first run of the MilA shader your present with, Transmission, Fresnel, Weight. If I understand correctly a steel or SSS material wouldn’t need Transmission, or does a SSS material need Transmission ?

    Regardless of which option you choose when running the MilA shader, you get the same list of menus as seen in the last image of this blog posting, regardless if you chose Transmission, Fresnel or Weight, what difference does it make ?

    I want to understand this shader, more then just understand, get the results I want in very little time, besides the time taken for maps etc but there is some confusion on how the layers respond to light etc.

    • If you don’t need to see what’s on the other side of the material then you probably don’t need transmission. Scatter is your SSS material and handles the light scatter for you. The base layers are sort of like presets to get you started or act as a complete material as noted in part 2. From there you can create new layer or mixes on top.

      • For example, rust, I would primarily use Fresnel shaders & weight ? Regardless what option I choose, the menus are the same whether I chose Fresnel, weight or custom why have that menu to begin with ?

      • I would not choose fresnel for rust. Rust doesn’t appear based on angle of view. Dirt is typical straight weight (transparency weight) with a mask into the weight to reveal the material under the rust.

        Component options are always the same. Only the method of layering like weight, fresnel, etc changes the control for *how it is layered visually.

      • Regardless if I choose, Fresnel, Weight or Custom the second menu is the same between any of the above chosen, correct ?

      • The second menu list components. They can be layered using whatever your chosen weighting is. There is no “wrong” component depending on what your end goal is.

  6. still finding it hard to switch from mia to mia mainly because i cant figure out how to convert from the highlights only on the mia to what to do on the mila

    • Highlights only is dead, it was a hack to make things faster. This is no longer needed since machines are so fast. If you were using it for a look instead of speed enhancement (as intended) then you’re stuck with something legacy. 😦

  1. Pingback: The Layering Library (MILA) Part 2 | elemental ray

  2. Pingback: Getting Familiar With MILA Material Properties and Base Phenomenon | LESTERBANKS

  3. Pingback: Maya 2015 SP2 and mayatomr | elemental ray

  4. Pingback: The Layering Library (MILA) UI: BETA SHADERS | elemental ray

  5. Pingback: New GI Prototype Quick Start | elemental ray

  6. Pingback: MILA Tests | patrickjamesfinn

  7. Pingback: Maya 2016, new features and integration | elemental ray

  8. Pingback: Mental Ray Resources | 3D Monkey

  9. Pingback: Buoys | Black Light

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: