ÿþ<html> <head> <title>Creating a Lava Lamp - Maya Tutorial by Kristina Sara Johnson</title> <link rel=stylesheet type="text/css" href="tutorial.css"> <meta name="keywords" content=" Maya 2009, Maya 2010, Maya 2011, Maya PLE, 3D tutorial, modelling, modeling, shading, materials, lighting, shadows, rendering, tutorial"> <!-- Author: kristina at www.animatedcreations.net --></head> <body> <h3>Creating a Lava Lamp</h3> 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. <p>This tutorial was written for Maya 2009 or Maya PLE. It will also work with Maya 2010 and Maya 2011. <p> 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 use a text to learn from. 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. <p> This tutorial is also available as a document: <a href="lavaLamp.pdf">lavaLamp.pdf</a> <p> I would really appreciate any feedback that you may have. Please email me at kristina (at) animatedcreations (dot) net <p> Thank you, <br><a href="../index.html">Kristina Sara Johnson</a><br> <p>&nbsp;<p> <strong>New Tutorial EBook available</strong><p> <a href="http://www.animatedcreations.net/maya/diverBot.pdf"><img src="images/diverBotAdTextSmall.jpg" width="400" height="80" border="0"></a> <br>&nbsp;<p> <p> <strong>Three button mouse</strong><br> Maya is designed to be used with a three button mouse. Throughout this tutorial the following abbreviations are used: <br> LMB = Left mouse button <br> MMB = Middle mouse button <br> RMB = Right mouse button <p> <strong>Selection Tools</strong><br> 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. <br> <img src="images/image46.jpg"> <p> <strong>Setting up Maya</strong><br> Open the Maya program. <br> In the top left hand corner of the Maya window is a drop down menu list. Select <em>Polygons</em> from the list.<p> <img src="images/image1.jpg"> <p> <ul> <li> Create a LavaLamp project in Maya. Go to File > Project > New. <li> The New Project window will open. <li> Type LavaLamp in the Name text box. <li> Click the <em>Use Defaults</em> button. This will add useful directory names to all of the other text boxes. <li> Click the <em>Accept</em> button. <li> 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 <em>lavaLamp1.ma</em>. 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 <em>lavaLamp2.ma</em>, and so on. This is good insurance against file corruption (which thankfully does not happen too often). <li> The project is now set up and you are ready to start modeling. </ul> <p> <strong>Modeling the base</strong><br> <ul> <li> Maya should be currently displaying the Perspective viewport. <li> Go to Create > Polygon Primitives > Cylinder. <li> 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. <li> To see the cylinder as a smooth shaded object, press the number 6 on the keyboard. <li> For the next step the cylinder will need to be selected. LMB click on it and see that it is highlighted. <li> On the right side of the Maya window, the <em>Attribute Editor</em> is currently displayed. <li> Select the <em>polyCylinder1</em> tab. <li> Set the radius value to 6.75. <li> Set the height value to 14.5. <li> Set the subdivisions axis value to 32. <li> Set the subdivisions height value to 7. <li> Click on the <em>pCylinder1</em> tab. <li> Set all of the Translate values to 0.0, 7.25, 0.0. This re-positions the cylinder in 3D space. <li> In the text box at the top of the panel, rename <em>pCylinder1</em> to be <em>pBase</em>. </ul> <img src="images/image2.jpg"><br> <ul> <li> Change to the Front viewport. Hit the space bar on the keyboard and then LMB click in the viewport labelled Front. <li> If the pBase object is not fully within the viewport window, press the <em>a</em> key on the keyboard. <li> LMB click and select pBase. <li> RMB click and select <em>Vertex</em> from the pop-up menu. <li> LMB click and drag to select the 3rd and 4th rows of vertices. <li> LMB click the Scale Tool in the top left corner of the Maya screen. <li> 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. </ul> <img src="images/image9.jpg"><br> <ul> <li> For the next few steps, a selection feature called <em>Soft Selection</em> needs to be turned on. To do this, LMB double-click on the Select Tool in the top left corner of the Maya screen. <li> The Attribute Editor for the Select Tool (arrow pointer) will be displayed. <li> Select the Soft Select option of it is not checked already. <li> Set the falloff radius to 4. <li> Select linear from the Curve presets, so that the falloff curve is a straight line as in the image below. </ul> <img src="images/image4.jpg"><br> <ul> <li> LMB click and select pBase. <li> RMB click and select <em>Vertex</em> from the pop-up menu. <li> LMB click and drag a box around the 3rd and 4th rows of vertices to select them, as shown in the image below. </ul> <img src="images/image5.jpg"><br> <ul> <li> 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. </ul> <img src="images/image10.jpg"><br> <ul> <li> LMB double-click the Select tool. Uncheck the <em>Soft Select</em> option. <li> 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. <li> Select the top two rows of vertices and uniformly scale them down by 90%. </ul> <img src="images/image11.jpg"><br> <ul> <li> 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. <li> 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. <li> RMB click on pBase and select Faces. <li> 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 colour. There may be some unwanted faces in the selection. Hold down the <em>control</em> 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 <em>shift</em> key and LMB click to add faces to the selection. <li> With the faces selected, go to Edit Mesh > Extrude. <li> 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. </ul> <img src="images/image12.jpg"><br> <ul> <li> In the Attribute Editor, look down the list to the <em>Poly Extrude Face History</em> rollout. <li> Set the Offset value to 0.1. The top of pBase should now resemble the image below. </ul> <img src="images/image13.jpg"><br> <ul> <li> If the mesh has done something crazy, undo the last step and make sure that the <em>Keep Faces Together</em> option at the top of the Edit Mesh menu list is checked, then repeat the steps above. <li> Go to Edit Mesh > Extrude. <li> Select the Scale Tool. Scale the selected faces down so that they fit inside pBase. <li> 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. </ul> <img src="images/image14.jpg"><br> <ul> <li> RMB click on pBase and select Object Mode. LMB click on a blank space in the viewport. <li> 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. <li> Return to Object Mode. <li> Select the Perspective viewport. <li> 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. </ul> <img src="images/image15.jpg"><br> <ul> <li> The test render should resemble the image below. It looks very plain and grey so far. </ul> <img src="images/lavaLamp2.jpg"><br> <ul> <li> LMB click pBase to select it. <li> RMB click pBase and select the <em>Assign New Material</em> option from the list. <li> 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 colour to be applied to the model. <li> Rename the lambert shader to <em>baseLambert</em>. <li> 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. <li> Save your work. </ul> <p> <strong>Modeling the glass bottle middle section</strong><br> <ul> <li> Switch to the perspective viewport. <li> Go to Create > Polygon Primitives > Cylinder. <li> 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. <li> For the next step the cylinder will need to be selected. LMB click on it and see that it is highlighted. <li> On the right side of the Maya window, the <em>Attribute Editor</em> is currently displayed. <li> Select the <em>polyCylinder2</em> tab. <li> Set the radius value to 6.5. <li> Set the height value to 26. <li> Set the subdivisions axis value to 32. <li> Set the subdivisions height value to 2. <li> Click on the <em>pCylinder1</em> tab. <li> Set all of the Translate values to 0.0, 23, 0.0. This re-positions the cylinder in 3D space. <li> In the text box at the top of the panel, rename <em>pCylinder1</em> to be <em>pMiddle</em>. </ul> <ul> <li> LMB click pMiddle to select it. <li> RMB click pMiddle and select the Assign New Material option from the list. <li> 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 colour to be applied to the model. <li> Rename the lambert shader to <em>middleLambert</em>. <li> 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. </ul> <ul> <li> Switch to the front viewport. <li> RMB click on pMiddle. Select Vertex from the pop-up menu. <li> LMB click and drag to select the middle row of vertices on pMiddle. <li> 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. </ul> <img src="images/image16.jpg"><br> <ul> <li> LMB click and drag to select the bottom row of vertices and scale them down so that pMiddle appears to rest in pBase. <li> LMB click and drag to select the top row of vertices and scale them down by 40%. <li> The lava lamp model should now look like the image below. </ul> <img src="images/image17.jpg"><br> <p> <strong>Modeling the top cap</strong><br> <ul> <li> Switch to the perspective viewport. <li> Create a cylinder. Follow the steps given previously. <li> Set the radius value to 3. <li> Set the height value to 5. <li> Set the subdivisions axis value to 32. <li> Leave the subdivisions height value set at 1. <li> Set all of the Translate values to 0.0, 38, 0.0. This re-positions the cylinder in 3D space. <li> In the text box at the top of the panel, rename <em>pCylinder1</em> to be <em>pCap</em>. <li> Switch to the front viewport. <li> RMB click on pCap. Select Vertex from the pop-up menu. <li> LMB click and drag to select the top row of vertices on pCap. <li> 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. <li> 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. </ul> <ul> <li> The next steps describe how to hollow out the inside of pCap. <li> Go to the perspective viewport. <li> Select pCap and move it away from the rest of the lava lamp. <li> RMB click pCap and select Face from the pop-up menu. <li> Select all the faces on the bottom of pCap. Check that no other faces are selected accidentally. <li> Go to Edit Mesh > Extrude. <li> Set the Offset value to 0.1. Leave all the other values as they are. <li> Go to Edit Mesh > Extrude (or press g on the keyboard to repeat the last action) <li> Grab the blue arrow handle of the Extrude tool and move the newly created (extruded) faces all of the way inside the cap. <li> Using the Scale Tool, scale the faces so that they fit inside pCap. <li> 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. </ul> <img src="images/image19.jpg"><br> <ul> <li> 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. </ul> <img src="images/image12.jpg"><br> <ul> <li> 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. </ul> <img src="images/image15.jpg"><br> <ul> <li>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. </ul> <img src="images/lavaLamp3.jpg"><br> <p> <strong>Creating layers for each part of the model</strong><br> 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. <br> <ul> <li>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. </ul> <img src="images/image12.jpg"><br> <ul> <li>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. </ul> <img src="images/image20.jpg"><br> <ul> <li> Select pCap by LMB clicking on it in the perspective viewport. <li> 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. </ul> <img src="images/image21.jpg"><br> <ul> <li> Double click on the default layer name, <em>layer1</em>. A pop-up window will appear. Name the layer <em>l_cap</em>. Choose any colour. Click the <em>Save</em> 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. <li> Create layers for the other objects in the scene. Call them l_middleGlass and l_base. <li> 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. </ul> <p> <strong>Adding detail to the base</strong><br> <ul> <li> To start, more thickness will be added to the slight edge around the bottom of pBase. <li> Select pBase by LMB clicking on it. <li> Go to Edit Mesh > Insert Edge Loop Tool. <li> LMB click on pBase just above the second lowest mesh line, as shown in the image below. <li> Press q on the keyboard to exit from the <em>Insert Edge Loop Tool</em>. </ul> <img src="images/image22.jpg"><br> <ul> <li> Use the Translate Tool to move the new edge loop just created into position. <li> Use the Scale Tool to make this new edge loop the same dimensions as the one below it. <li> 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. </ul> <img src="images/image23.jpg"><br> <ul> <li> RMB click on pBase and select Object Mode to finish editing the edges of pBase. <li> In the Layers section of the Channel Box, click on the V next to l_base to hide pBase. <li> In the Layers section of the Channel Box, click on the V next to l_cap to show pCap. <li> RMB click on pCap and select Face from the pop-up menu. <li> Select all of the faces on the top of pCap. <li> Go to Edit Mesh > Extrude. <li> Open the Attribute Editor. In the <em>Poly Extrude Face History</em> section of the window set values as shown in the image below. </ul> <img src="images/image24.jpg"><br> <ul> <li> pCap should now have a tidy bevelled edge on its top, as shown in the image below. </ul> <img src="images/image25.jpg"><br> <p> <strong>Modeling some blobs</strong><br> <ul> <li> Make all of the layers visible again, so that the whole lava lamp model can be seen. <li> LMB click to select pMiddleGlass. <li> 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. <li> 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. <li> Make sure the perspective viewport active. <li> Go to Create > Polygon Primitives > Sphere. <li> LMB click in the viewport and drag to create the sphere. <li> Go to the Attribute Editor on the right hand side of the Maya window. <li> Open the tab called <em>polySphere1</em>. <li> Set the radius value to 2.0. <li> Set the Subdivisions Axis to 32. <li> Set the Subdivisions Height to 32. <li> Open the <em>pSphere1</em> tab. <li> Rename <em>pSphere1</em> to <em>pBlob1</em>. <li> Using the Translate Tool and one or more viewports, move <em>pBlob1</em> so that it is inside <em>pMiddleGlass</em>. <li> Open the <em>Deformation</em> tab at the centre top of the Maya window. </ul> <img src="images/image26.jpg"><br> <ul> <li> LMB click on the wireframe box at the left hand end of the Deformation tab, to add a <em>Lattice Deformer</em> to pBlob1. <li> In the Attribute Editor, open the tab called <em>ffd1LatticeShape</em>. <li> Set the S, T and U Divisions values all to 4. <li> Open the <em>ffd1</em> tab and uncheck the local option at the top. Leaving this option turns on changes the influence of the lattice deformer. <li> LMB click on the lattice to select it. <li> RMB click on the lattice and select <em>Lattice Point</em> from the pop-up menu. <li> Select grids of lattice points and use the Translate and Scale Tools to create an appealing lava lamp blob shape. <li> LMB click on pBlob1 to select it. RMB click on pBlob1 and select <em>Material Attributes</em> from the pop-up menu. <li> Select a Lambert shader type. <li> In the Attribute Editor for the Lambert shader, change the name to <em>blobLambert</em>, and double click on the Color swatch to choose a new color. <li> The image below displays a lava lamp model containing one blob. </ul> <img src="images/image27.jpg"><br> <ul> <li>Create a few more blobs to populate the lava lamp. </ul> <img src="images/lavaLamp4.jpg"><br> <p> <strong>Modeling an electric cord</strong><br> <ul> <li> 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. <li> Select the perspective viewport. <li> Go to Create > Cube. <li> Open the attribute editor for this new cube click on the polyCube1 tab. <li> Set the width value to 1. <li> Set the height value to 32. <li> Set the depth value to 1. <li> Set the subdivisions height value to 8. <li> LMB click on the pCube1 tab. Change the name of pCube1 to be pCord. <li> Open the Channel Box. <li> Set the Rotate X value to 90. <li> Select the top viewport by RMB clicking in it. By using the RMB, pCord will remain the selected object. <li> RMB click on pCord and select vertex from the pop-up menu. <li> Select the Translate Tool. <li> 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 effect the shape of the end of the final pCord after it has been smoothed. </ul> <img src="images/image28.jpg"><br> <ul> <li> RMB click in the side viewport to select it. <li> Move the vertices at the end of pCord up a little bit so that the end of pCord is intersecting with pBase. <li> Ensure that all of the vertices in pCord are no lower than the very bottom of pBase. Use the image below as a guide. </ul> <img src="images/image29.jpg"><br> <ul> <li> RMB click <em>pCord</em> and select <em>Object Mode</em> from the pop-up menu to finish editing vertices. <li> Go to Mesh > Smooth > Options (select the little box icon next to Smooth on the drop down list). <li> In the <em>Smooth Options</em> pop-up window, go to Edit > Reset Settings. <li> Set the Division levels value to 3. <li> LMB click the <em>Smooth</em> button. <li> <em>pCord</em> will now be a smooth looking electric cord. The smoothing operation will have changed the dimensions of <em>pCord</em> slightly. Check that pCord still intersects with pBase. If not, move <em>pCord</em> using the Translate Tool until it intersects with <em>pBase</em> again. <li> RMB click pCord and select the Assign New Material option from the list. <li> 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. <li> Rename the lambert shader to <em>cordLambert</em>. <li> LMB click on the Color swatch. A color picker will appear. Select a black color for <em>pCord</em>. This temporary color will be replaced with a plastic material later on. </ul> <ul> <li> Go to Create > Pipe. <li> In the Attribute Editor, click on the tab <em>polyPipe1</em>. <li> Set the radius value to 0.7. <li> Set the height value to 1.5. <li> Set the thickness value to 0.5. <li> Set the subdivisions axis value to 40. <li> LMB click on the <em>pPipe1</em> tab and change the name of <em>pPipe1</em> to <em>pCordConnector</em>. <li> Open the Channel Box. <li> Set the Rotate X value to 90. <li> Using the top and side viewports, position <em>pCordConnector</em> where <em>pCord</em> meets <em>pBase</em>. This should look like the image below. </ul> <img src="images/image30.jpg"><br> <ul> <li> RMB click pCordConnector and select Assign Existing Material from the pop-up menu. Choose cordLambert as the temporary material for pCordConnector. </ul> <p> <strong>Modeling a power plug</strong><br> <ul> <li> Go to Create > Polygon Primitives > Cube. <li> LMB click and drag in the perspective viewport to create the cube. <li> In the Attribute Editor, go to the <em>polyCube2</em> tab (or whatever the new cube is called). <li> Set the width, height and depth values to 2.0. <li> Set the subdivisions width value to 2. <li> Set the subdivisions height value to 2. <li> Set the subdivisions depth value to 5. <li> Rename the cube to <em>pPlug</em>. <li> Using the Translate Tool, move <em>pPlug</em> until it is aligned with the end of pCord. <li> RMB click on pPlug and select Vertex from the pop-up menu. <li> Using the Translate and Scale Tools, change the shape of pPlug to look like the image below. <li> Move the two right end rows closer together. <li> Move the two left end rows closer together. <li> Use the Scale Tool to move the other vertices. <li> RMB click on pPlug and select Object Mode when vertex editing is finished. </ul> <img src="images/image31.jpg"><br> <ul> <li> 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. <li> RMB click on pPlug and select Face from the pop-up menu. <li> Select the four faces on the end of pPlug. <li> LMB click on the first face, and then hold down the shift key and LMB click select the other three faces. <li> Check that no extra faces have been accidentally selected. <li> Go to Edit Mesh > Extrude. Make sure that <em>Keep Faces Together</em> is checked on. <li> In the Attribute Editor for the Extrude, set the Local Translate Z value to 0.02, as shown below. </ul> <img src="images/image32.jpg"><br> <ul> <li> Extruding a surface by a tiny amount like this, will keep it flat when the whole object is smoothed. <li> RMB click on pPlug and select <em>Object Mode</em> to finish editing faces. </ul> <ul> <li> Go to Mesh > Smooth > Options (the little box next to the word Smooth). <li> In the pop-up window, set the Divisions levels value to 2. <li> LMB click the Smooth button. pPlug will now have been smoothed. <li> pPlug probably looks a little too small at this point. Use the Scale Tool to make it bigger. <li> RMB click pPlug and select <em>Assign Existing Material</em> from the pop-up menu. Then select the material <em>cordLambert</em> to apply to pPlug. </ul> <ul> <li> Lastly, any authentic lava lamp would have some prongs on the end of the power plug. In this case, Australian compatible ones. <li> Go to Create > Polygon Primitives > Cube. <li> LMB click and drag in the perspective viewport to create a cube. <li> Go to the Attribute Editor and click on the <em>polyCube3</em> tab (or to the tab that matches the new cube in). <li> Set the width value to 1.0. <li> Set the height value to 0.25. <li> Set the depth value to 2.0. <li> Open the Channel Box. <li> Set the Rotate Z value to 50. <li> 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. <li> Change the name of <em>pCube1</em> to be <em>pProng1</em>. <li> Go to Edit > Duplicate. <li> In the Channel Box, set the Rotate Z value of <em>pProng2</em> to -50. <li> Using the Translate Tool, move <em>pProng2</em> to the opposite side of <em>pPlug</em>. </ul> <img src="images/image33.jpg"><br> <ul> <li> Save the file! </ul> <p> <strong>Setting up a camera</strong><br> <ul> <li> Go to Create > Cameras > Camera. <li> A new camera called <em>camera1</em> will appear at the origin of the 3D world. Actually, it will start off positioned inside the lava lamp. <li> Use the Translate and Rotate Tools to position the camera. It is also helpful to go to the Panels viewport menu and choose the <em>Look Through Selected</em> option. Using this method, moving around in the viewport interactively re-positions the camera. <li> From the Panels menu in the viewport, choose Perspective > camera1. This sets up the selected viewport to be the camera1 viewport. <li> 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. <li> Open the Attribute Editor for camera1. <li> Scroll down in the Attribute Editor panel to <em>Environment</em>. <li> Click on the <em>Background color</em> swatch, and change the color to something non-black. <li> The image below shows the current camera set up. Note the menu options along the top of the viewport. </ul> <img src="images/image34.jpg"><br> <ul> <li> 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. <li> With camera1 selected, open the Channel Box. <li> LMB click on <em>Translate X</em>, and drag down the list so that every channel, down to the <em>Visibility</em> option, is highlighted blue. <li> RMB click with the Channels selected. A pop-up menu will appear. Choose <em>Lock Selected</em>. <li> The locked channel values will now have a dark grey background, as shown below. </ul> <img src="images/image36.jpg"><br> <p> <strong>Setting up lights</strong><br> <ul> <li> Go to Create > Lights > Spot Light. There are several different types of lights. Area lights produce the most realistic shadows. <li> A new light will be created called <em>spotLight1</em>. <li> Rename <em>spotLight1</em> to <em>keyLight</em>. The key light is the main source of illumination in a scene. <li> Go to Create > Lights > Point Light. Rename this new light <em>fillLight</em>. <li> Position <em>keyLight</em> and <em>fillLight</em> 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. </ul> <img src="images/image44.jpg"><p> <img src="images/image45.jpg"><br> <ul> <li> Select keyLight. <li> Open the Attribute Editor and select the <em>keyLightShape</em> tab. <li> Set the Intensity value to 1.1. <li> Set the Cone Angle value to 140.0. <li> LMB click on the arrow next to <em>Depth Map Shadow Attributes</em> to open the roll out. <li> Uncheck the <em>Use Depth Map Shadows</em> option. Shadows will be required later on, but it is faster to check the lighting setup without shadows first. <li> LMB click on the arrow next to <em>Raytrace Shadow Attributes</em>. Ensure that the <em>Use Ray Trace Shadows</em> option is turned off. <li> Select fillLight. <li> In the Attribute Editor, select the <em>fillLightShape</em> tab. <li> Set the Intensity value to 0.6. <li> Uncheck the <em>Use Depth Map Shadows</em> option as was done for the keyLight. <li> LMB click on the arrow next to <em>Raytrace Shadow Attributes</em>. Ensure that the <em>Use Ray Trace Shadows</em> option is turned off. <li> Select the camera1 viewport, and create a test render by clicking on the button highlighted in the image below. </ul> <img src="images/image15.jpg"><br> <ul> <li> 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. <li> LMB click on the <em>Maya Software</em> tab. <li> Set the Quality value to Production Quality. This will preset many of the other options. <li> Set the Shading value to 2. <li> Set the Max Shading value to 10. <li> Click on the triangle next to <em>Raytracing Quality</em> to open the roll-out. <li> Check the <em>Raytracing</em> option to turn it on. Raytracing will be required for the glass section of the lava lamp. <li> Set the Reflections value to 10. <li> Set the Refractions value to 10. <li> Set the Shadows value to 2. <li> Close the Render Settings window. </ul> <p> <strong>Creating materials</strong><p> <strong>Metal</strong><br> <ul> <li> 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. <li> LMB click on <em>pBase</em> to select it. <li> RMB click and select <em>Assign New Material > Anisotropic</em> from the pop-up menu. <li> LMB click on the Color swatch. The Color Chooser will appear. <li> 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. <li> Set the color to R=209, G=226, B=232. This is a pale blue-grey color. <li> 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. <li> Open the <em>Specular Shading</em> roll-out. <li> Set the Angle value to 0. <li> Set the Spread X value to 10. <li> Set the Spread Y value to 3. <li> Set the Roughness value to 0.9. <li> Set the Fresnel Index value to 12.0. <li> Leave everything else as the defaults. <li> Name this new Anisotropic material <em>lavaLampMetal</em>. </ul> <p> <strong>Glass</strong><br> <ul> <li> LMB click on <em>pMiddleGlass</em> 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. <li> With <em>pMiddleGlass</em> selected, go to Edit > Duplicate Special > Options (the little square). <li> In the <em>Duplicate Special Options</em> window that appears, change all of the Scale values to 0.995. <li> Click the <em>Duplicate Special</em> button. <li> There will now be a new object in the scene called <em>pMiddleGlass1</em>, that is very slightly smaller than <em>pMiddleGlass</em>. <li> 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. <li> RMB click pMiddleGlass1 and select <em>Assign New Material > Anisotropic</em> from the pop-up menu. <li> Name this new Anisotropic material <em>lavaLampGlass</em>. <li> Select pMiddleGlass. RMB click pMiddleGlass and select <em>Assign Existing Material > lavaLampGlass</em>. <li> LMB click on the Color swatch. The Color Chooser will appear. <li> Set the color to white. <li> LMB click on the Transparency color swatch. In the Color Chooser, set the color to R=253, G=253, B=253. <li> 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. <li> Open the Specular Shading roll-out. <li> Set the Angle value to 0. <li> Set the Spread X value to 35.5. <li> Set the Spread Y value to 4.64. <li> Set the Roughness value to 0.3. <li> Set the Fresnel Index value to 1.2. <li> Uncheck the Anisotropic Reflectivity option. <li> Set the Reflectivity value to 0.1. <li> LMB click on the little chequerboard next to Reflected Color. <li> The Create Render Node window will appear. Scroll down to <em>Environment Textures</em> and select an <em>envCube</em> type texture. <li> LMB click on the chequerboard next to the <em>Right</em> option. The Create Render Node window will appear again. Select File, the second option from the top in the right hand side column. <li> The Attribute Editor will change to display the file chooser. <li> LMB click on the grey folder next to <em>Image Name</em>. <li> A directory window will open. It will default to the /sourceimages directory of the current Maya Project. <li> Select a photograph from somewhere on the hard drive. An image with a lot of sky in it will work well. <li> LMB click on the button marked with the orange square in the image below to move back up a level in the shader hierarchy. </ul> <img src="images/image38.jpg"><br> <ul> <li> Add the same image to all of the other sides of <em>envCube1</em>. <li> LMB click the hierarchy button again to get back to the top level of lavaLampGlass. <li> Scroll down in the Attribute Editor for lavaLampGlass and click on the little triangle to open the Raytrace Options roll-out. <li> Check the box to turn on Refractions. <li> Set the Refractive Index value to 1.33. This is the real world refractive index of glass. <li> Set the Refraction Limit value to 10. <li> Set the Surface Thickness value to 0.4. <li> Leave all the other values as their defaults. </ul> <p> <strong>Liquid</strong><br> <ul> <li> 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. <li> Go to Window > Rendering Editors > Hypershade. <li> The Hypershade window will appear. All of the materials for the scene will be shown on the Materials tab. <li> Select the material lavaLampGlass and MMB drag it to the Work Area in the bottom half of the window. <li> Still in the Hypershade window, go to Edit > Duplicate > Shading Network. This will create a copy of lavaLampGlass called <em>lavaLampGlass1</em>. <li> LMB click on lavaLampGlass1 to select it. <li> Go to the Attribute Editor to see all the parameters of lavaLampGlass1. <li> The Hypershade can now be closed. <li> Rename <em>lavaLampGlass1</em> to <em>lavaLampGlassTint</em>. <li> Choose a new color for lavaLampGlassTint. This particular project is going with a magenta color, as a nice complement to the orange blobs. <li> Set the Diffuse value to 1.0. <li> Set the Transparency slider to about 75%, as shown in the image below. </ul> <img src="images/image40.jpg"><br> <ul> <li> Leave all the other values as they are. <li> Create a test render. </ul> <img src="images/lavaLamp7.jpg"><br> <p> <strong>Blob</strong><br> <ul> <li> Those orange blobs need a bit more intensity. <li> Select any of the blobs created. RMB click on the blob and select <em>Material Attributes</em>. <li> The Attribute Editor for <em>blobLambert</em> will be displayed. <li> Set the shader Type to Blinn. The Blinn shader is particularly good for plastic. <li> Change the name of this new Blinn material to <em>blobBlinn</em>. <li> Set the Diffuse value to 0.9. <li> Set the Translucence value to 0.8. <li> Set the Specular Roll Off value to 0.3. <li> Set the Reflectivity value to 0.0. </ul> <p> <strong>Power cord</strong><br> <ul> <li> Simplest thing first - apply the lavaLampMetal material to pProng1 and pProng2. <li> LMB click to select pProng1, hold down the shift key and LMB click to select pProng2. <li> Release the shift key. RMB click on either pProng1 or pProng2 and from the pop-up menu, select <em>Assign Existing Material > lavaLampMetal</em>. <li> LMB click to select the <em>pCord</em> object. <li> RMB click on <em>pCord</em> and select <em>Material Attributes</em>. <li> The Attribute Editor will display the material <em>cordLambert</em>. <li> Set the shader Type to Blinn. <li> Change the name of this new material <em>blinn1</em> to be <em>cordBlinn</em>. <li> Set the Diffuse value to 0.95. <li> Scroll down to the Specular Shading roll-out. <li> Set the Reflectivity value to 0.0. <li> Create a test render. </ul> <img src="images/lavaLamp8.jpg"><br> <p> <strong>Setting up a ground plane</strong><br> <ul> <li> First, a ground plane will need to be created to receive the shadows cast by the lava lamp. <li> Go to Create > Polygon Primitives > Plane. <li> Rename <em>pPlane1</em> to <em>pGroundPlane</em>. <li> 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. </ul> <img src="images/image41.jpg"><br> <ul> <li> Introducing pGroundPlane has created a problem - the power plug is now going through the floor and needs to be adjusted. <li> Go to Window > Outliner. The Outliner is very useful for easily selecting objects in the scene. <li> LMB click to select pProng1 and then holding down the shift key, LMB click to select pPlug. <li> Go to Edit > Parent. When pPlug is moved, pProng1 will follow. <li> Parent pProng2 to to pPlug. <li> Move pPlug upwards so that it is resting on pGroundPlane. <li> LMB click to select pCord. <li> Click on the <em>Deformation</em> tab. <li> 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. <li> Select the deformation lattice. <li> Go to the <em>ffd1LatticeShape</em> tab in the Attribute Editor. <li> Set the S Divisions value to 2. <li> Set the T Divisions value to 12. <li> Set the U Divisions value to 2. <li> RMB click the lattice and select Lattice Point. <li> In a side viewport, move the first two rows of deformer upwards so that pCord joins pPlug again, as in the image below. </ul> <img src="images/image43.jpg"><br> <ul> <li> RMB click the lattice again and select <em>Object Mode</em> to finish. <li> LMB click pGroundPlane to select it. <li> RMB click pGroundPlane and select <em>Assign New Material > Blinn</em>. <li> Rename <em>blinn1</em> to <em>blinnGroundPlane</em>. <li> Set the Color to white. <li> Set the Diffuse value to 0.90. <li> Set the Eccentricity value to 0.1. <li> Set the Specular Roll Off value to 0.5. <li> Set the Specular Color to white. <li> Set the Reflectivity to 0.25. </ul> <p> <strong>Setting up Shadows</strong><br> <ul> <li> Select the light called keyLight. The keyLight will be the main shadow casting light in the scene. <li> Go to the Attribute Editor for keyLight. <li> Scroll down to the Raytrace Shadow Attributes roll-out. Check the box next to Use Ray Trace Shadows to turn shadows on. <li> Set the Light Radius value to 2.0. <li> Set the Shadow Rays value to 20. <li> Set the Ray Depth Limit to 2. <li> Create a test render of the camera viewport. The shadow gets cut off because pGroundPlane is not large enough. <li> Select pGroundPlane. Using the Scale Tool, make pGroundPlane much larger. <li> Final Rendered image shown below. </ul> <img src="images/lavaLamp10.jpg" width="320" height="240"> <p> <a href="../index.html">Kristina Sara Johnson</a> </body> </html>