Creating a Lava Lamp in Maya 2009

This tutorial presents a step by step project for the modeling, shading, lighting and rendering of a realistic lava lamp. The steps should be straightforward for beginners to follow.

This tutorial was written because I like to give something back to the 3D community. I wrote it rather than creating a video tutorial, as is so popular these days, because I have found that many beginners in 3D prefer to learn from text-based tutorials. The pace of a video can often be too fast, and when starting 3D modeling it can be difficult to discern what the key points are - like listening to a new foreign language! It is also useful to have all of the steps in front of you, rather than scrubbing along a film timeline trying to find the part where they said the thing about the tool that did that function. You know what I mean! Anyway, I hope you find the tutorial really useful, and that I find the time to write some more of these in the future.

Three Button Mouse

Maya is designed to be used with a three button mouse. Throughout this tutorial the following abbreviations are used:

  • LMB = Left mouse button
  • MMB = Middle mouse button
  • RMB = Right mouse button

Selection Tools

Located in the top left corner of the Maya window are the selection tools. These are used to move objects, or parts of objects, around in 3D space (Fig.01).

Fig. 01

Fig. 01

Setting up Maya

Open the Maya program. In the top left hand corner of the Maya window is a drop down menu list. Select Polygons from the list (Fig.02).

Create a LavaLamp project in Maya. Go to File > Project > New and the New Project window will open.  Type "LavaLamp" in the Name text box. Click the Use Defaults button. This will add useful directory names to all of the other text boxes. Click the Accept button.

Go to File > Save Scene As. In the window that pops up, set the file format to Maya Ascii (.ma) and save the scene as "lavaLamp1.ma". It is important to save work frequently, and useful to do this across multiple files. For example, after a major change it may be a good idea to save the new work as "lavaLamp2.ma", and so on. This is good insurance against file corruption (which thankfully does not happen too often).

The project is now set up and you are ready to start modeling!

Fig. 02

Fig. 02

Modeling the Base

Maya should be currently displaying the Perspective viewport.

Go to Create > Polygon Primitives > Cylinder. LMB click in the perspective window and drag to create the base of the cylinder. Release the mouse button, and then click and drag again to give the cylinder some height. Any cylinder dimensions are OK at this point. To see the cylinder as a smooth shaded object, press the number 6 on the keyboard.

For the next step the cylinder will need to be selected. LMB click on it and see that it is highlighted. On the right side of the Maya window, the Attribute Editor is currently displayed.  Select the polyCylinder1 tab. Set the radius value to 6.75, the height value to 14.5, the subdivisions value to 32 and the subdivisions height value to 7.

Click on the pCylinder1 tab. Set all of the Translate values to 0.0, 7.25, 0.0. This re-positions the cylinder in 3D space.
In the text box at the top of the panel, rename "pCylinder1" to be "pBase"(Fig.03).

Fig. 03

Fig. 03

Change to the Front viewport. Hit the space bar on the keyboard and then LMB click in the viewport labeled Front. If the pBase object is not fully within the viewport window, press the A key on the keyboard.

LMB click and select pBase. Then RMB click and select Vertex from the pop-up menu. LMB click and drag to select the 3rd and 4th rows of vertices. LMB click the Scale Tool in the top left corner of the Maya screen. Finally, LMB click the green square handle of the scale tool and drag upwards to move the two rows of vertices closer together, as shown in the image below (Fig.04).

Fig. 04

Fig. 04

For the next few steps, a selection feature called Soft Selection needs to be turned on. To do this, LMB double-click on the Select Tool in the top left corner of the Maya screen. The Attribute Editor for the Select Tool (arrow pointer) will be displayed. Select the Soft Select option of it is not checked already.  Set the falloff radius to 4. Select linear from the Curve presets, so that the falloff curve is a straight line as in the image below (Fig.05).

Fig. 05

Fig. 05

LMB click and select pBase. RMB click and select Vertex from the pop-up menu. LMB click and drag a box around the 3rd and 4th rows of vertices to select them, as shown in the image below (Fig.06).

Fig. 06

Fig. 06

Uniformly scale the vertices down by 65%. This can be done either by grabbing the yellow square at the mid-point of the Scale Tool and watching the values change to approximately 0.65 in the text box at the bottom left of the Maya screen. To be more precise, a value of 0.65 can be entered into the X, Y and Z text boxes in the top right hand corner of the Maya screen (Fig.07).

Fig. 07

Fig. 07

LMB double-click the Select tool. Uncheck the Soft Select option. Select individual rows of vertices and use the Translate and Scale tools to adjust the shape of pBase so that it resembles the image below.  Select the top two rows of vertices and uniformly scale them down by 90% (Fig.08).

Fig. 08

Fig. 08

The base of the lava lamp needs to be at least partially hollow. In a real lava lamp the bottle rests in the base, which also contains a light bulb and other electrical parts.

RMB click on the pBase and select Object Mode from the pop-up menu. If some vertices on pBase are still highlighted, LMB click in a blank area of the viewport, and then LMB click on pBase to select it again.

RMB click on pBase and select Faces. In the perspective viewport, select the faces on the top end of pBase. This can be done by dragging a box around a group of faces. Selected faces are highlighted in an orange color. There may be some unwanted faces in the selection. Hold down the CTRL key on the keyboard and LMB click to remove faces from the selection. Alternately, there may be faces that must be added to the selection. Hold down the SHIFT key and LMB click to add faces to the selection.
With the faces selected, go to Edit Mesh > Extrude. Click on the Attribute Editor icon so that all the options for Extrude can be seen. The Attribute Editor is the icon on the left (Fig.09).

Fig. 09

Fig. 09

In the Attribute Editor, look down the list to the Poly Extrude Face History rollout. Set the Offset value to 0.1. The top of pBase should now resemble the image below (Fig.10).

Fig. 10

Fig. 10

If the mesh has done something crazy, undo the last step and make sure that the Keep Faces Together option at the top of the Edit Mesh menu list is checked, then repeat the steps above.

Go to Edit Mesh > Extrude. Select the Scale Tool. Scale the selected faces down so that they fit inside pBase. Select the Translate Tool. Move the selected faces down into pBase. The model should look similar to the image below. A few Scales and Translates may be required to adjust pBase (Fig.11).

Fig. 11

Fig. 11

RMB click on pBase and select Object Mode. LMB click on a blank space in the viewport. The faces on the inside of pBase will appear faceted. To repair this effect, select the faces on the inside of pBase. Go to Normals > Set Normal Angle. In the pop-up box that appears, enter a value of 10.

Return to Object Mode and select the Perspective viewport. Create a test render of pBase. LMB click on the Render icon on the tool bar. The Render icon has an orange box around it in the image below (Fig.12).

Fig. 12

Fig. 12

The test render should resemble the image below. It looks very plain and grey so far (Fig.13).

Fig. 13

Fig. 13

LMB click pBase to select it. RMB click pBase and select the Assign New Material option from the list.  From the next list that appears, select Lambert. The Attribute Editor for the new lambert shader will appear. A lambert shader will allow a flat color to be applied to the model.

Rename the lambert shader to "baseLambert". LMB click on the Color swatch. A color picker will appear. Select a color for pBase. This temporary color will be replaced with a shiny metal later on.

Save your work!

Modeling the Glass Bottle Middle Section

Switch to the perspective viewport.

Go to Create > Polygon Primitives > Cylinder. LMB click in the perspective window and drag to create the base of the cylinder. Release the mouse button, and then click and drag again to give the cylinder some height. Any cylinder dimensions are OK at this point.

For the next step the cylinder will need to be selected. LMB click on it and see that it is highlighted. On the right side of the Maya window, the Attribute Editor is currently displayed. Select the polyCylinder2 tab. Set the radius value to 6.5, the height value to 26, the subdivisions axis value to 32 and the subdivisions height value to 2.

Click on the pCylinder1 tab. Set all of the Translate values to 0.0, 23, 0.0. This re-positions the cylinder in 3D space.
In the text box at the top of the panel, rename "pCylinder1" to be "pMiddle".

LMB click pMiddle to select it and then RMB click pMiddle and select the Assign New Material option from the list. From the next list that appears, select Lambert. The Attribute Editor for the new lambert shader will appear. A lambert shader will allow a flat color to be applied to the model.

Rename the lambert shader to "middleLambert". LMB click on the Color swatch. A color picker will appear. Select a color for pMiddle. This temporary color will be replaced with a glass material later on.

Switch to the front viewport. RMB click on pMiddle. Select Vertex from the pop-up menu. LMB click and drag to select the middle row of vertices on pMiddle. Go to the Y text box in the top right hand corner of the Maya window and enter the value 15. This will move all those vertices to Y=15 on the y-axis of the 3D world (Fig.14).

Fig. 14

Fig. 14

LMB click and drag to select the bottom row of vertices and scale them down so that pMiddle appears to rest in pBase. LMB click and drag to select the top row of vertices and scale them down by 40%.

The lava lamp model should now look like the image below (Fig.15).

Fig. 15

Fig. 15

Modeling the Top Cap

Switch to the perspective viewport.

Create a cylinder. Follow the steps given previously and set the values as follows:

  • Radius value to 3
  • Height value to 5
  • Subdivisions axis value to 32
  • Leave the subdivisions height value set at 1.


Set all of the Translate values to 0.0, 38, 0.0 to re-position the cylinder in 3D space and in the text box at the top of the panel, rename "pCylinder1" to be "pCap".

As before, switch to the front viewport. RMB click on pCap. Select Vertex from the pop-up menu. LMB click and drag to select the top row of vertices on pCap. Scale the top row of vertices down by 70%. Select the Scale Tool, and drag to scale the vertices or enter the values X=0.7, Y=1.0 and Z=0.7 in the text boxes in the top right hand corner of the Maya window.

Move pCap downwards along the y-axis by selecting the Translate Tool and dragging on the up arrow (green axis). Move pCap until it appears to be resting on pMiddle.

The next steps describe how to hollow out the inside of pCap. Go to the perspective viewport and select pCap and move it away from the rest of the lava lamp. RMB click pCap and select Face from the pop-up menu. Select all the faces on the bottom of pCap. Check that no other faces are selected accidentally and then go to Edit Mesh > Extrude. Set the Offset value to 0.1 and leave all the other values as they are.

Go back to Edit Mesh > Extrude (or press g on the keyboard to repeat the last action). Grab the blue arrow handle of the Extrude tool and move the newly created (extruded) faces all of the way inside the cap. Using the Scale Tool, scale the faces so that they fit inside pCap.

Below is a wireframe image of pCap, with the inside cap end highlighted in orange. To see objects in wireframe mode, press the number 4 on the keyboard. Press 6 to return to shaded mode (Fig.16).

Fig. 16

Fig. 16

To move pCap back to the top of the lava lamp, open the Channel Box by clicking on the icon on the right. Change the Translate X and Translate Z values to 0. The Channel Box icon is shown in the image below, and can be found in the top right corner of the Maya window (Fig.17).

Fig. 17

Fig. 17

Create a test render. Frame the lava lamp in the perspective viewport and click the render icon on the tool bar. This icon has an orange box drawn around it in the image below (Fig.18).

Fig. 18

Fig. 18

Below is an image of the lava lamp so far. This is not a very exciting or interesting looking lava lamp yet, but the basics are there (Fig.19).

Fig. 19

Fig. 19

Creating Layers for Each Part of the Model

Next, layers will be created for each part of the lava lamp model. The visibility of the layers can be turned on and off, so that each part of the lava lamp can be seen by itself. This will be useful when applying some extra details to parts of the model.

Open the Channel Box. The icon for the Channel Box is located in the top right hand corner of the Maya window, and is the icon on the right in the image below (Fig.20).

Fig. 20

Fig. 20

When the Channel Box first opens, the Layers part of the window may not be displayed. It is possible to have only channels displayed, only layers displayed, or a split screen of both. To see the split screen mode, click on the icon on the right in the image below (Fig.21).

Fig. 21

Fig. 21

Select pCap by LMB clicking on it in the perspective viewport. Then click on the Create a new layer and assign selected objects icon, which is the yellow cog and blue sphere button in the image below (Fig.22).

Fig. 22

Fig. 22

Double click on the default layer name, layer1. A pop-up window will appear. Name the layer "l_cap". Choose any color. Click the Save button. The visibility of the layer l_cap can be turned on and off by clicking on the letter V, shown at the left hand side of the image above.

Create layers for the other objects in the scene. Call them "l_middleGlass" and "l_base". Turn off visibility for l_middleGlass and l_cap. Select pBase and then press F on the keyboard to zoom in on the pBase object.

Adding Details to the Base

To start, more thickness will be added to the slight edge around the bottom of pBase.

Select pBase by LMB clicking on it. Go to Edit Mesh > Insert Edge Loop Tool. LMB click on pBase just above the second lowest mesh line, as shown in the image below. Press Q on the keyboard to exit from the Insert Edge Loop Tool(Fig.23).

Fig. 23

Fig. 23

Use the Translate Tool to move the new edge loop just created into position. Then use the Scale Tool to make this new edge loop the same dimensions as the one below it. An easy way to know if the two are the same size is if there is a straight line of mesh between them, shown as the red line in the close up image below (Fig.24).

Fig. 24

Fig. 24

RMB click on pBase and select Object Mode to finish editing the edges of pBase. In the Layers section of the Channel Box, click on the V next to l_base to hide pBase. Then, still in the Layers section of the Channel Box, click on the V next to l_cap to show pCap.

RMB click on pCap and select Face from the pop-up menu. Select all of the faces on the top of pCap and go to Edit Mesh > Extrude. Open the Attribute Editor. In the Poly Extrude Face History section of the window set values as shown in the image below (Fig.25).

Fig. 25

Fig. 25

pCap should now have a tidy bevelled edge on its top, as shown in the image below (Fig.26).

Fig. 26

Fig. 26

Modeling Some Blobs

Make all of the layers visible again, so that the whole lava lamp model can be seen. LMB click to select pMiddleGlass. RMB click and then select Material Attributes from the pop-up menu. The Attribute Editor will open, displaying all of the Material Attributes of the Lambert shader applied to pMiddleGlass.

Move the Transparency slider about 75% of the way across the slider, to make pMiddleGlass a see-through object in the viewports. pMiddleGlass will now also render as transparent, although it won't look very good at this point.

Make sure the perspective viewport is active then go to Create > Polygon Primitives > Sphere. LMB click in the viewport and drag to create the sphere.

Go to the Attribute Editor on the right hand side of the Maya window. Open the tab called "polySphere1" and set the values as follows:

  • Radius value to 2.0
  • Subdivisions Axis to 32
  • Subdivisions Height to 32

Open the pSphere1 tab. Rename "pSphere1" to "pBlob1". Using the Translate Tool and one or more viewports, move pBlob1 so that it is inside pMiddleGlass. Then open the Deformation tab at the centre top of the Maya window (Fig.27).

Fig. 27

Fig. 27

LMB click on the wireframe box at the left hand end of the Deformation tab, to add a Lattice Deformer to pBlob1.
In the Attribute Editor, open the tab called "ffd1LatticeShape". Set the S, T and U Divisions values all to 4 and then open the ffd1 tab and uncheck the local option at the top. Leaving this option turns on changes the influence of the lattice deformer.

LMB click on the lattice to select it. RMB click on the lattice and select Lattice Point from the pop-up menu. Select grids of lattice points and use the Translate and Scale Tools to create an appealing lava lamp blob shape.

LMB click on pBlob1 to select it. RMB click on pBlob1 and select Material Attributes from the pop-up menu. Select a Lambert shader type and then in the Attribute Editor for the Lambert shader, change the name to "blobLambert", and double click on the Color swatch to choose a new color.

The image below displays a lava lamp model containing one blob (Fig.28).

Fig. 28

Fig. 28

Create a few more blobs to populate the lava lamp (Fig.29).

Fig. 29

Fig. 29

Modeling an Electric Cord

There are several different ways to go about creating an electric cord in Maya. The next steps have been chosen because the focus of this part of the tutorial is modeling using polygons.

Select the perspective viewport. Go to Create > Cube. Open the attribute editor for this new cube and click on the polyCube1 tab. Set the values as follows:

  • Width value to 1
  • Height value to 32
  • Depth value to 1
  • Subdivisions height value to 8

LMB click on the pCube1 tab. Change the name of "pCube1" to be "pCord".

Open the Channel Box. Set the Rotate X value to 90. Select the top viewport by RMB clicking in it. By using the RMB, pCord will remain the selected object.

RMB click on pCord and select Vertex from the pop-up menu. Then select the Translate Tool and move the vertices around until they shape pCord to be something like the image below. Notice that the ends of pCord have two rows of vertices quite close together. This will affect the shape of the end of the final pCord after it has been smoothed (Fig.30).

Fig. 30

Fig. 30

RMB click in the side viewport to select it. Move the vertices at the end of pCord up a little bit so that the end of pCord is intersecting with pBase. Ensure that all of the vertices in pCord are no lower than the very bottom of pBase. Use the image below as a guide (Fig.31).

Fig. 31

Fig. 31

RMB click pCord and select Object Mode from the pop-up menu to finish editing vertices. Then go to Mesh > Smooth > Options (select the little box icon next to Smooth on the drop down list).

In the Smooth Options pop-up window, go to Edit > Reset Settings. Set the Division levels value to 3 and LMB click the Smooth button. pCord will now be a smooth-looking electric cord. The smoothing operation will have changed the dimensions of pCord slightly. Check that pCord still intersects with pBase. If not, move pCord using the Translate Tool until it intersects with pBase again.

RMB click pCord and select the Assign New Material option from the list. From the next list that appears, select Lambert. The Attribute Editor for the new lambert shader will appear. A lambert shader will allow a flat color to be applied to the model.

Rename the lambert shader to "cordLambert". Then LMB click on the Color swatch. A color picker will appear. Select a black color for pCord. This temporary color will be replaced with a plastic material later on.

Go to Create > Pipe and in the Attribute Editor, click on the tab polyPipe1. Set the values as follows:

  • Radius value to 0.7
  • Height value to 1.5
  • Thickness value to 0.5
  • Subdivisions axis value to 40

Then LMB click on the pPipe1 tab and change the name to "pCordConnector".

Next open the Channel Box and set the Rotate X value to 90. Using the top and side viewports, position pCordConnector where pCord meets pBase. This should look like the image below (Fig.32).

Fig. 32

Fig. 32

RMB click pCordConnector and select Assign Existing Material from the pop-up menu. Choose cordLambert as the temporary material for pCordConnector.

Modeling a Power Plug

Go to Create > Polygon Primitives > Cube. Then LMB click and drag in the perspective viewport to create the cube.
In the Attribute Editor, go to the polyCube2 tab (or whatever the new cube is called). Set the values as follows:

  • Width, height and depth values to 2.0
  • Subdivisions width value to 2
  • Subdivisions height value to 2
  • Subdivisions depth value to 5

Rename the cube to "pPlug" and using the Translate Tool, move pPlug until it is aligned with the end of pCord.
RMB click on pPlug and select Vertex from the pop-up menu.

Using the Translate and Scale Tools, change the shape of pPlug to look like the image below. Move the two right end rows closer together. Move the two left end rows closer together. Use the Scale Tool to move the other vertices. RMB click on pPlug and select Object Mode when vertex editing is finished (Fig.33).

Fig. 33

Fig. 33

In the next steps, pPlug will be smoothed. First, the pPlug mesh needs to be adjusted slightly so that when it is smoothed, the right hand end of pPlug remains flat.

RMB click on pPlug and select Face from the pop-up menu. Select the four faces on the end of pPlug. LMB click on the first face, and then hold down the shift key and LMB click select the other three faces.

Check that no extra faces have been accidentally selected and then go to Edit Mesh > Extrude. Make sure that Keep Faces Together is checked on.

In the Attribute Editor for the Extrude, set the Local Translate Z value to 0.02, as shown below (Fig.34).

Fig. 34

Fig. 34

Extruding a surface by a tiny amount like this, will keep it flat when the whole object is smoothed.

RMB click on pPlug and select Object Mode to finish editing faces. Go to Mesh > Smooth > Options (the little box next to the word Smooth) and in the pop-up window, set the Divisions levels value to 2. LMB click the Smooth button and pPlug will now have been smoothed.

pPlug probably looks a little too small at this point. So use the Scale Tool to make it bigger and then RMB click pPlug and select Assign Existing Material from the pop-up menu. Select the material cordLambert to apply to pPlug.

Lastly, any authentic lava lamp would have some prongs on the end of the power plug (in this case, Australian compatible ones). Go to Create > Polygon Primitives > Cube. LMB click and drag in the perspective viewport to create a cube. Then go to the Attribute Editor and click on the polyCube3 tab (or to the tab that matches the new cube in). Set the values as follows:

  • Width value to 1.0
  • Height value to 0.25
  • Depth value to 2.0

Open the Channel Box and set the Rotate Z value to 50.

To be really picky, the edges of this prong should be slightly bevelled, but this is a fairly minor detail, particularly if the lamp actually gets plugged into a wall before rendering.

Change the name of pCube1 to be "pProng1". Go to Edit > Duplicate and then in the Channel Box, set the Rotate Z value of pProng2 to -50.

Finally, using the Translate Tool, move pProng2 to the opposite side of pPlug (Fig.35).

Fig. 35

Fig. 35

Save the file!

Setting Up a Camera

Go to Create > Cameras > Camera. A new camera called "camera1" will appear at the origin of the 3D world. Actually, it will start off positioned inside the lava lamp.

Use the Translate and Rotate Tools to position the camera. It is also helpful to go to the Panels viewport menu and choose the Look Through Selected option. Using this method, moving around in the viewport interactively re-positions the camera.

From the Panels menu in the viewport, choose Perspective > camera1. This sets up the selected viewport to be the camera1 viewport.

Open the View menu in the viewport. Select Camera Settings > Resolution Gate. Turning on this option shows the portion of the viewport that is actually renderable. The resolution itself can only be changed in the Render Options window. The default is 640 x 480, which will do for now.

Open the Attribute Editor for camera1. Scroll down in the Attribute Editor panel to Environment and click on the Background color swatch. Change the color to something non-black.

The image below shows the current camera set up. Note the menu options along the top of the viewport (Fig.36).

Fig. 36

Fig. 36

Once the camera position is decided, it is a good idea to lock it into place, so that it cannot accidentally be moved - which is really annoying! The camera position can be unlocked later on if necessary.

With camera1 selected, open the Channel Box. LMB click on Translate X, and drag down the list so that every channel, down to the Visibility option, is highlighted blue.  

RMB click with the Channels selected. A pop-up menu will appear. Choose Lock Selected. The locked channel values will now have a dark grey background, as shown below (Fig.37).

Fig. 37

Fig. 37

Setting Up Lights

Go to Create > Lights > Spot Light. There are several different types of lights. Area lights produce the most realistic shadows.

A new light will be created called "spotLight1". Rename spotLight1 to "keyLight". The key light is the main source of illumination in a scene.

Go to Create > Lights > Point Light. Rename this new light "fillLight". Position keyLight and fillLight in the same way as for a camera. Use the images below as a guide. The Top and Perspective viewports are showing the same lighting set up (Fig.38 & Fig.39).

Fig. 38

Fig. 38

Fig. 39

Fig. 39

Select keyLight. Open the Attribute Editor and select the keyLightShape tab. Set the Intensity value to 1.1 and the Cone Angle value to 140.0.

LMB click on the arrow next to Depth Map Shadow Attributes to open the roll out. Uncheck the Use Depth Map Shadows option. Shadows will be required later on, but it is faster to check the lighting setup without shadows first.

LMB click on the arrow next to Raytrace Shadow Attributes. Ensure that the Use Ray Trace Shadows option is turned off and then select Fill Light.

In the Attribute Editor, select the fillLightShape tab. Set the Intensity value to 0.6 and uncheck the Use Depth Map Shadows option as was done for the keyLight. LMB click on the arrow next to Raytrace Shadow Attributes. Ensure that the Use Ray Trace Shadows option is turned off.

Select the camera1 viewport, and create a test render by clicking on the button highlighted in the image below (Fig.40).

Fig. 40

Fig. 40

Click on the Render Settings button, which is the button at the right hand side of the image above. It is time to adjust some options to achieve a better quality render.

LMB click on the Maya Software tab and set the Quality value to Production Quality. This will preset many of the other options. Set the Shading value to 2 and the Max Shading value to 10.

Click on the triangle next to Raytracing Quality to open the roll-out. Check the Raytracing option to turn it on. Raytracing will be required for the glass section of the lava lamp. Set the Reflections value to 10, the Refractions value to 10 and Shadows value to 2. Then close the Render Settings window.

Creating Materials Metal

The lava lamp cap and base need surfaces that appear to be made out of metal. An excellent shader type for creating metals is the Anisotropic shader.

LMB click on pBase to select it. RMB click and select Assign New Material > Anisotropic from the pop-up menu. LMB click on the Color swatch. The Color Chooser will appear. At the bottom of the Color Chooser, change to RGB and 0 to 255. HSV works fine, but RGB values have more meaning to me. Set the color to R=209, G=226, B=232. This is a pale blue-grey color.

Set the Diffuse value to 0.7. Metals have a very low diffuse value, in reality much lower than even this value. Diffuse means how much color a material takes from its environment. A value of 0 would be appropriate for a mirror surface that only shows its environment. A value of 1 would be great for something that takes almost no color from its environment, such as an illuminated neon tube.

Open the Specular Shading roll-out and set the values as follows:

  • Angle value to 0
  • Spread X value to 10
  • Spread Y value to 3
  • Roughness value to 0.9
  • Fresnel Index value to 12.0

Leave everything else as the defaults and name this new Anisotropic material "lavaLampMetal".

Glass

LMB click on pMiddleGlass to select the object. Before a glass material is created, the glass section of the lava lamp will need to have a thickness just as real glass does.

With pMiddleGlass selected, go to Edit > Duplicate Special > Options (the little square). In the Duplicate Special Options window that appears, change all of the Scale values to 0.995.

Click the Duplicate Special button. There will now be a new object in the scene called "pMiddleGlass1", which is very slightly smaller than pMiddleGlass.

With pMiddleGlass1 selected, go to Edit UVs > Flip. This will flip all of the normals of the surface. Normals are which way the surface is pointing - either towards or away from the camera. Flipping all of the normals basically turns the object inside-out. The glass lava lamp middle now has a glass surface pointing outwards, and a glass surface pointing inwards - like a regular drinking glass does.

RMB click pMiddleGlass1 and select Assign New Material > Anisotropic from the pop-up menu. Name this new Anisotropic material "lavaLampGlass".

Select pMiddleGlass. RMB click pMiddleGlass and select Assign Existing Material > lavaLampGlass. LMB click on the Color swatch and the Color Chooser will appear. Set the color to white then LMB click on the Transparency color swatch. In the Color Chooser, set the color to R=253, G=253, B=253 and then set the Diffuse value to 0. Clear glass has no colors of its own. Any color it shows is a reflection of the environment that the glass material is in.

Open the Specular Shading roll-out and set the values as follows:

  • Angle value to 0
  • Spread X value to 35.5
  • Spread Y value to 4.64
  • Roughness value to 0.3
  • Fresnel Index value to 1.2

Uncheck the Anisotropic Reflectivity option and set the Reflectivity value to 0.1.

LMB click on the little arrow next to Reflected Color. The Create Render Node window will appear. Scroll down to Environment Textures and select an envCube type texture.

LMB click on the checkerboard next to the Right option. The Create Render Node window will appear again. Select File, the second option from the top in the right hand side column.

The Attribute Editor will change to display the file chooser. LMB click on the grey folder next to Image Name and a directory window will open. It will default to the /sourceimages directory of the current Maya Project. Select a photograph from somewhere on the hard drive. An image with a lot of sky in it will work well.

LMB click on the button marked with the orange square in the image below to move back up a level in the shader hierarchy (Fig.41).

Fig. 41

Fig. 41

Add the same image to all of the other sides of envCube1 and then LMB click the hierarchy button again to get back to the top level of lavaLampGlass.

Scroll down in the Attribute Editor for lavaLampGlass and click on the little triangle to open the Raytrace Options roll-out. Check the box to turn on Refractions and set the values as follows, leaving all other values as their defaults:

  • Refractive Index value to 1.33. This is the real world refractive index of glass.
  • Refraction Limit value to 10.
  • Surface Thickness value to 0.4.

Liquid

Now the lava lamp glass bottle has two surfaces with plain glass material applied to them. A lava lamp must contain a liquid for the blobs to float around in. The easiest way to achieve this effect is to tint the inner surface a different color.
Go to Window > Rendering Editors > Hypershade. The Hypershade window will appear. All of the materials for the scene will be shown on the Materials tab.

Select the material lavaLampGlass and MMB drag it to the Work Area in the bottom half of the window. Still in the Hypershade window, go to Edit > Duplicate > Shading Network. This will create a copy of lavaLampGlass called "lavaLampGlass1".

LMB click on lavaLampGlass1 to select it and then go to the Attribute Editor to see all the parameters of lavaLampGlass1. The Hypershade can now be closed. Rename lavaLampGlass1 to "lavaLampGlassTint". Choose a new color for lavaLampGlassTint. This particular project is going with a magenta color, as a nice complement to the orange blobs. Set the Diffuse value to 1.0 and the Transparency slider to about 75%, as shown in the image below (Fig.42).

Fig. 42

Fig. 42

Leave all the other values as they are and then create a test render (Fig.43).

Fig. 43

Fig. 43

Blob

Those orange blobs need a bit more intensity so select any of the blobs created. RMB click on the blob and select Material Attributes.

The Attribute Editor for blobLambert will be displayed. Set the shader Type to Blinn. The Blinn shader is particularly good for plastic. Change the name of this new Blinn material to "blobBlinn" and set the values as follows:

  • Diffuse value to 0.9
  • Translucence value to 0.8
  • Specular Roll Off value to 0.3
  • Reflectivity value to 0.0


Power cord

Simplest thing first - apply the lavaLampMetal material to pProng1 and pProng2. Then LMB click to select pProng1, hold down the shift key and LMB click to select pProng2. Release the shift key. RMB click on either pProng1 or pProng2 and from the pop-up menu, select Assign Existing Material > lavaLampMetal. LMB click to select the pCord object and then RMB click on pCord and select Material Attributes.

The Attribute Editor will display the material cordLambert. Set the shader Type to Blinn. Change the name of this new material blinn1 to be "cordBlinn". Set the Diffuse value to 0.95, then scroll down to the Specular Shading roll-out and set the Reflectivity value to 0.0.

Create a test render (Fig.44).

Fig. 44

Fig. 44

Setting Up a Ground Plane

First, a ground plane will need to be created to receive the shadows cast by the lava lamp. Go to Create > Polygon Primitives > Plane and rename "pPlane1" to "pGroundPlane". Using the Translate and Scale Tools, move pGroundPlane into position, as shown in the image below. Ensure that the horizon line is flat. In the Channel Box, check that Translate Y = 0 (Fig.45).

Fig. 45

Fig. 45

Introducing pGroundPlane has created a problem - the power plug is now going through the floor and needs to be adjusted. Go to Window > Outliner. The Outliner is very useful for easily selecting objects in the scene. LMB click to select pProng1 and then holding down the shift key, LMB click to select pPlug. Go to Edit > Parent. When pPlug is moved, pProng1 will follow. Parent pProng2 to to pPlug. Move pPlug upwards so that it is resting on pGroundPlane, then LMB click to select pCord and click on the Deformation tab. Click on the Wireframed (see-through) box icon, at the left hand end of the Deformation Tab. This will apply a deformation lattice to pCord.

Select the deformation lattice. Go to the ffd1LatticeShape tab in the Attribute Editor and set the values as follows:

  • S Divisions value to 2
  • T Divisions value to 12
  • U Divisions value to 2

RMB click the lattice and select Lattice Point. Then in a side viewport, move the first two rows of deformer upwards so that pCord joins pPlug again, as in the image below (Fig.46).

Fig. 46

Fig. 46

RMB click the lattice again and select Object Mode to finish. Then LMB click pGroundPlane to select it, RMB click pGroundPlane and select Assign New Material > Blinn. Rename "blinn1" to "blinnGroundPlane" and set Color to white. Set the other values as follows:

  • Diffuse value to 0.90
  • Eccentricity value to 0.1
  • Specular Roll Off value to 0.5
  • Specular Color to white
  • Reflectivity to 0.25

Setting Up Shadows

Select the light called keyLight. The keyLight will be the main shadow casting light in the scene. Go to the Attribute Editor for keyLight. Scroll down to the Raytrace Shadow Attributes roll-out. Check the box next to Use Ray Trace Shadows to turn shadows on and set the following values:

  • Light Radius value to 2.0
  • Shadow Rays value to 20
  • Ray Depth Limit to 2

Create a test render of the camera viewport. The shadow gets cut off because pGroundPlane is not large enough so select pGroundPlane and, using the Scale Tool, make pGroundPlane much larger.

The final rendered image is shown in Fig.47.

Fig: 47

I hoped you enjoyed this tutorial and I would really appreciate any feedback that you may have. Please email me at Kristina@animatedcreations.net

Thank you!
Kristina Sara Johnson

Enter content...

Fetching comments...

Post a comment