Glass bottle modelling and rendering in mental ray in Maya tutorial
Rendering a good looking glass object is always a difficult task for CG artist. In this tutorial you will learn about the modelling, texturing (shading), lighting a glass bottle using Maya. I tried my best to make it easy as possible for beginners. And sorry for adding custom voice. Most of the people don't like my poor English!
Bright objects to reflect
More dark areas to refract
Lot of rays for reflection and refraction.
Watch the video tutorial below. And also remember to add your comments.
Here is the text version of the tutorial.
Welcome to Fermi cg dot net.
Today we are going to create a glass bottle with studio lighting in Maya.
I try my best to make it beginner level tutorial. If you have any doubts please add a comment below.
This is the Maya rendered image of the bottle. We are going to get something similar using Mental Ray.
Let us take a look at the scene file inside Maya.
There is nothing complex in this scene. A bottle mesh, BG backdrop and some lighting planes.
Let us start a new scene.
Go to file. New scene.
It is a good practice to create a scene directory first.
So go to file and select set project.
Maya will open the most recent file location. Chose the desired directory and create a new folder.
Rename it to glass modelling tutorial and press set.
Maya will ask for a default work space. Select create default workspace.
Now go to file and chose project window.
Simply press the accept button.
Now save the scene by pressing file, save scene.
Give a name to the file like glass bottle 01.
Now we need to model the bottle.
Go to create, polygon primitives. Make sure that the interactive creation is turned off.
Chose the cylinder primitive.
Jump to channel box by pressing control A.
Under inputs you can see polygon cylinder1.
Change the subdivision height to 4.
Subdivision cap to zero.
Height to 4.
In the view port right click on the poly cylinder and chose face selection.
Select the top face and press delete.
Change to front view by pressing spacebar and left clicking on the Maya tab and choosing front view.
Change to vertex mode by right clicking on the cylinder and chose vertex.
Select the top vertices and scale down.
Also select the second last row of vertices and pull down towards the last row of vertices.
Select the last row of vertices and scale down little bit.
Now change to edge mode and chose the top edges only. You can use control dragging for deselecting.
Shift right click and chose extrude face.
Select the blue global icon and move the edges upward.
I think the area is too big. So select the top two rows of vertices (you need to change to vertex mode) and scale down.
Zoom to that area.
Change to face selection and select the top faces.
Shift right click and chose add division to faces.
In the channel box and expand the polysubdface1.
Change the subd method to linear.
Increase the division v to 5.
Select the alternate row of faces and extrude them in the z axis.
Change to edge mode and select the neck edge.
Shift plus right click and chose bevel edges.
Select the poly bevel 1 at the channel box and increase the segments to 3, fraction to 1.
Select these edges and shift plus right click and do bevel.
Select the poly bevel 2 and increase the segments to 7.
Select the second last row of edges and do bevel.
Change the fraction to 1 and segments to 3.
Select the bottom face and control plus right click to show the selection menu. Chose to edges.
Do a bevel with fraction 1 and segments 3.
Select the bottom face and do extrude face. Optionally select the global button and scale down the face to centre.
Do extrude again by pressing g. scale down and move it upward a little bit.
Do extruding a couple of time and create the bottom shape.
In the face selection mode select all face by dragging.
Shift plus right click and select extrude face.
Drag the thickness to a positive value. Under channel box change the thickness to 0.025.
Press 3 for smooth mesh proxy.
Delete the history by clicking edit, delete by type history.
Now save the scene as a new file. Rename it to bottle 2.
Simply do a render by clicking the render icon.
This image is the previously rendered one. You will get something similar to this.
Now we are using software render. Change it to mental ray render.
If you can’t see the mental ray option you need to enable it in plug ins. Go to windows, settings/preferences, plug in manager.
And look for Maya to mr dot m l l is loaded. Otherwise turn on both the clicks.
Now render using mental ray. You will get something similar to previous render but with smoother mesh.
Move the objects upwards so that it sit on the grid.
You can use combination of alt plus the arrow keys for moving.
Now we need something for backdrop.
So go to the curve shelf and click on ep curve tool.
Create a curve in the right view. You need to create something similar. Use shift for creating straight lines.
Right click and select vertical control vertices and do scaling for arranging it in a straight line. Do the same for the horizontal vertices except the curved ones.
Change to perspective. In object mode move the curve to the left.
Duplicate the curve by pressing control plus d. or by going to edit duplicate.
Move the resulting curve towards the right.
Select both the curve by holding shift, go to surface editing mode.
Under surface select loft. Maya creates a lofted surface.
Now create a new camera by create, camera.
Select the camera1 as the default view. Click on the resolution mask to see the area we are going to render.
Position the camera as you need.
Now the backdrop need to be big. Simply select the two curves and move them apart little bit further.
It is better to rename all your components. So inside the outliner double click on each component and rename them to bottle, BG etc.
Because we are going to create transparent glass it is better idea to light the scene first than applying materials.
We are not going to use the traditional lights. Instead we are using indirect lighting method.
So create a polygon cylinder. Move it upwards. Change the radius to 6. Subdivision axis to 50.
Subdivision caps to 0.
Isolate it by clicking the isolate selection.
Select the bottom face, then shift selecting all the face to select vice versa. Delete those faces.
Jump to object mode.
Go to modify and do centre pivot.
Rename it to top light.
Also delete the history.
Undo the isolate selection by clicking the isolation button again.
Position the light accordingly. We will properly position it later.
Press shift plus t to assign a new material to the top light. Select surface shader.
Rename the shader to light emission.
Change the out colour to white.
Now do a render by selecting the camera 1.
See there is no effect by the lighting.
In order to visualize it properly go to render settings, render options and turn off default lightings.
Render once again.
Now the scene is blank.
Once again go to render settings, indirect lighting and turn on final gathering.
Now the scene is lighted by the indirect light.
We need to increase the intensity.
So in the light emission shader aka surface shader click on the white colour.
Make sure you are using HSV. Increase the v value to 20.
See now we have another problem. Lot of noise in rendering. How we can resolve it?
Before solving this we need to complete our lighting set up.
Change the v value to 10 and render again.
Create a polygon plane.
Scale it. Change the subdivisions to 1.
Rotate it to 90 degree in z axis.
Move it left and scale it accordingly.
You need to position the plane just above the BG plane. Scale it wisely because it should not be covering the entire area.
Rename to left light.
Delete the history.
Duplicate it and move it to the right.
And rename to right light.
Select both planes and right click assign existing material and chose light emission material.
Render again to see the difference.
We have the noise problem.
First go to render settings, quality tab and chose production pre-set.
Render again. Now the edges are bit sharper, shadows are much clear, but still we have the noise issue.
In order to get rid of the issue go to indirect lighting, change the point interpolation value to 100.
Render to see the difference.
Now we can add the materials.
Select the bottle and press shift plus t. add a new mia material x.
Rename it to glass
Click on the pre-sets tab and chose glass physical.
Render again. Now we have the glass bottle.
Select the BG plane and apply a new mia material x. change the colour to blue.
Render again. Now we have much interesting effect.
But we need to change the camera angle little bit. So select the camera and place it in such a way that it is sitting in front of the bottle.
Also scale the top light to cover the entire area.
We can remove the unwanted reflection inside the BG plane by tweaking the material.
Turn on use max distance under advanced reflection. Increase the max distance to 4.
Tweak the surface shader out colour value for better lighting effect. Also change the diffuse colour of the BG material for better effect.
Click on the file tab in render image view and save with a format of your choice.