close

Maya Tutorial: Make Glass Effects With Maya Base Materials

Mental Ray for Maya, Maya render farm

As the leading cloud rendering services provider and GPU&CPU render farm, Fox Renderfarm is here to share with you a Maya tutorial from the author Dai Wei.

Today, I shared with you a tutorial about how to use the Maya basic material and the mental ray material to achieve the glass effect, I hope to help everyone.

The basic principle of materials: Law of Conservation of Energy

When light hits the surface of an object, there are three general reactions: absorption, reflection, and refraction. The reflection is divided into diffuse reflection and specular reflection.

According to the Law of Conservation of Energy, energy can not be disappear, only conversion can occur.

Reflected energy can be divided into diffuse reflection and specular reflection, while diffuse reflection is generally diffuse in our CG production process, while specular reflection is generally specular, and refraction is generally refraction. Let the incident energy be 100%, which is 1, and finally we can use the formula: 1>=diffuse+specular+refraction.

Mental Ray for Maya, Maya render farm

All reflections have a Fresnel Effect

The main factor determining the Fresnel Effect is the refractive index. When the refractive index is close to 1, the difference between the reflectance of the 90 degree angle of view and the 0 degree angle of view is larger. When the refractive index value is higher, the reflectance of the 90 degree angle of view and the 0 degree angle of view is closer to 1.

Generally, the refractive index of transparent objects is between 1.3 and 1.9, and plastic, rubber, and baking varnish are also around this range. The metal is 4-10.

Use Maya basic material to achieve glass effect

Here we use the blinn material that everyone is most familiar with and use the basic principles mentioned above to make the glass.
This scene uses HDR for illumination, and in the Mental ray it uses IBL nodes.

The key settings are as follows:

Open the IBL node. If the FG does not open automatically, please turn it on manually.

Mental Ray for Maya, Maya render farm

Turn off the default lighting for the scene, at the end of the common tag.

Mental Ray for Maya, Maya render farm

Enable color management and set the following to turn on linear workflow.

Mental Ray for Maya, Maya render farm

The result of the rendering is as follows.

Mental Ray for Maya, Maya render farm

Give the model a blinn material and adjust the transparency to full transparency. Turn on the refraction under the raytracing option tab and adjust the refractive index to a value of 1.7 or similar to get the result shown below.

Mental Ray for Maya, Maya render farm

This is because the number of refractions is set very small by default, a simple scenario to illustrate.

Mental Ray for Maya, Maya render farm

A mirror with two opposite sides with a small ball in the middle. The mirror gives a highly reflective material.

Mental Ray for Maya, Maya render farm Mental Ray for Maya, Maya render farm

Both mirrors give the same material, but the reflections in the opposite mirror are not, because the limits of the number of reflections and refractions are limited.

When rendering, if the computer calculates according to the display, it must calculate the reflection between the two mirrors infinitely. In order to avoid this, the software introduces the limit of reflection and refraction to improve the performance. There are raytracing, reflection, and refraction under the quality label of Mental ray. Their values correspond to the number of reflections and refractions that will be calculated, and max trace depth is the maximum limit of the sum of these two values.

Find the raytrace option for the blinn ball. There is a reflection limit below, which is also the limit on the number of reflections. You will find that this value is set to a few, then the reflection will be done several times.

Mental Ray for Maya, Maya render farm

The same is true for refraction. Generally, it is more than 9 times. The figure of the glass is adjusted after the number of refractions. The result is that the black place disappears, but the refraction is not good.

Mental Ray for Maya, Maya render farm

For glass objects, there is no diffuse reflection, and some are specular reflection and refraction. So, turn off color or diffuse first, and adjust the reflectivity and specular color to the highest. In the blinn material, the control of reflection is that when both reflectivity and specular color are 1, it is total reflection.

After adjusting the specular roll off to 0, the effect of this value is to control the Fresnel Effect. This value can be used instead of the sampler info and ramp nodes to implement Fresnel control.

Mental Ray for Maya, Maya render farm

The above image has the result of Fresnel Feflection, but the reflection of the cup perpendicular to the plane of your line of sight is almost invisible, and the value of eccentricity does not work. My blinn's transparency is all 1, the reflection is 0 on the 90 degree view, and the reflection is 1 on the 0 degree view.

I use a method to correct the refractive energy of different perspectives, that is, transparency. Here we use the classic method of sampler info plus ramp.

Mental Ray for Maya, Maya render farm Insert the facingRatio of the sampler info into the vCoord of the ramp. Set the ramp end to the white end to be black. Insert this ramp into a lambert to render the cup.

Mental Ray for Maya, Maya render farm

This set of nodes can control different perspectives to get different values. The set of nodes just made is just right, inserted into the transparency channel of the previous blinn material.

Mental Ray for Maya, Maya render farm

Still feeling too dark, we can control the color on the ramp to adjust to acceptable results.

Mental Ray for Maya, Maya render farm

The bottom of the cup is especially black. This is because the lighting method I use is IBL, mainly relying on FG photons. The photon of FG is also reflected and refraction times. Turn on the FG's refraction limit and increase it a little, so that light can penetrate the wall of the cup to illuminate the ground at the bottom of the cup.

Mental Ray for Maya, Maya render farm

Finally, the ground texture is added, the intensity of the HDR is enhanced, the illumination is enhanced, and the material properties are finely adjusted to obtain the glass of the pure blinn material below. You can also add some color to the color of the ramp that is inserted into the transparency to create colored glass, but don't expect the result too much. It is also possible to add a little refracting blur to the glass.

Mental Ray for Maya, Maya render farm

For refraction blur, please select Mi Refraction Blur under the mental ray label of the material, limit is the number of times of refraction blur, and rays is precision. Increase the blur and create the effect of frosted glass. Of course, this property will slow down the rendering speed, please use it with caution. You can also attach a texture to the bump to make the glass look less regular.

Mental Ray for Maya, Maya render farm

Making glass with mental ray material

Mental ray's architectural materials have many advantages. Compared to blinn, there is a huge optimization - built-in energy conservation. Even if there is a problem with the settings, the result is still a forced result, which is different from the setting. When you give the material a color, then constantly adjust its reflectivity and you will understand.

Mental Ray for Maya, Maya render farm

The mia material is set so that the reflectance of the 0 degree angle of view and the 90 degree angle of view is 1, that is, no Fresnel reflection is generated, and the default mia has Fresnel reflection. The following are the effects of Reflecity=0, 0.3, 0.6 and 1 respectively.

Mental Ray for Maya, Maya render farm Mental Ray for Maya, Maya render farm

When the reflection of the mia material is turned to 1 and the Fresnel Reflection is turned off, it is the mirror, which perfectly reflects the surrounding environment without itself. Then adjust the reflectance to 1, the refractive index is adjusted to 1.7, the transparency is adjusted to 1, that is, fully transparent, open the brdf shutter, check the use fresnel reflection, this option will let the refractive index control the Fresnel reflection. And the larger the max distance, the lighter the glass color, and the smaller the max distance, the darker the glass color.

Mental Ray for Maya, Maya render farm

Shadow of glass and caustics

The shadow of the glass is the first thing to be clear: the shadow of the glass is solid and opaque! Blinn material, shadow attenuation under raytracing options, the smaller the value, the more transparent the shadow, the larger the value, the more opaque the shadow.

The mia material also has a shadow calculation similar to blinn, and when max distance is used, your shadow method must be segments to get the correct shadow effect.

Now use the mia material, then pay attention to the refractive caustic and transparent shadow options under the advanced refraction, and want to use the caustics shadow, so check the former, and adjust the photon and so on to enhance the caustics.

Mental Ray for Maya, Maya render farm

This gives a good caustics effect, which is the effect of making glass using Maya's basic material.

Fox Renderfarm hopes it will be of some help to you. It is well known that Fox Renderfarm is an excellent cloud rendering services provider in the CG world, so if you need to find a render farm for Maya, why not try Fox Renderfarm, which is offering a free $25 trial for new users? Thanks for reading!

Author: Dai Wei

Welcome to join us

render farm free trialCHRISTMAS SUPER SALE

Recommended reading


Top 9 Best And Free Blender Render Farms of 2024

2024-08-30


Revealing the Techniques Behind the Production of Jibaro "Love, Death & Robots", Which Took Two Years to Draw the Storyboard

2024-08-30


Top 10 Free And Best Cloud Rendering Services in 2024

2024-11-08


Top 8 After Effects Render Farm Recommended of 2023

2024-08-30


Shocked! The Secret Behind Using 3D to Make 2D Animation was Revealed!

2022-05-11


How to Render High-quality Images in Blender

2024-12-04


Easy Cel Shading Tutorial for Cartoon in Blender Within 2 Minutes

2022-07-01


Top 5 Best and Free 3d Rendering Software 2024

2024-01-19


Partners

Interested

Business Consulting

Global Agent Contact:Gordon Shaw

Email: gordon@foxrenderfarm.com

Marketing Contact: Rachel Chen

Email: rachel@foxrenderfarm.com

Message Us:
Newsletter
Keep up with our latest software updates, special offers and events!
Copyright © 2024 FoxRenderfarm.com. All Rights Reserved.