一、 Building a 大炮 wheel
Your first step begins with the task of modeling a single 大炮 wheel. You’ll then clone the wheel an move it to the opposite side, and then connect the two wheels with an axle. Then, you’ll add the barrel an the support.
To create a 大炮 model, follow these steps:
1. Start by resetting the interface with the 文件>重置menu command. Answer 是 in the warning box that appears.
2. Before modeling the first wheel, 打开the 捕捉开关 in the main toolbar so that all created points will snap to the grid points. Configure the Snaps figure by right-clicking the Snaps Toggle button. This opens the Grid and Snap Settings dialog box. Make sure the 栅格点 option is selected, and close the dialog box.
3. Select 创建>标准基本体>管状体, and drag in the 顶 viewport at the center of the grid to create the outer shape of the wheel. In the 参数 rollout, set the 半径1 and 半径2 values to 130 and 100, the 高度 value to 15, the 高度分段 value to 3, and the 边数 value to 18.
4. Select 创建>标准基本体>圆柱体, and drag in the 前 viewport at the center of the wheel. In the 参数 rollout, set the 半径 value to 5, the 高度 value to 110, the 高度分段 value to 1, and the 边数 value to 18. The spoke isn’t centered with the wheel, so select the outer wheel and move the tube object upward in the Front viewport until it is centered with the spoke. You’ll need to temporarily 关闭 the 捕捉开关 in order to do this.
5. With the cylinder selected, choose the 工具>阵列 menu command. This opens the Array dialog box, where you can quickly create the other wheel spokes. Start by clicking the 预览 button in the Array dialog box so you can see the results in the viewports. Click the arrow icon to the right of the 旋转 row and set the Y Rotate column value to 360. This tells the array to position the duplicates within a 360-degree range. Then set the 1D 数量 to 14. The cylinders are rotated about the original object’s pivot point, which is located at the base of the cylinder. If the spoke look right in the viewport, then press OK to close the dialog box.
6. The spokes all meet and overlap in the center of the wheel, so you’ll create a cylinder to overlay the center of the spokes. Select the 创建>标准基本体>圆柱体 menu command, and drag in the 顶 viewport from the center of the grid outward to create the center hub. The Parameters for this object are 半径, 30; 高度, 20; 高度分段, 1; and Sides, 18.
7. To add some variety to the center hub, select the 创建>标准基本体>球体 menu command, and drag in the 顶 viewport at the center of the grid to create a new sphere object. The Parameters for this object are 半径, 20; 分段, 32; and 半球, 0.5. Then select and move the sphere upward in the 前 viewport until it sits on top of the center hub object.
二、Cloning and positioning the 大炮 wheels
With the first wheel finished, you’ll create a clone of it and position the second wheel, but you’ll want temporarily 成组 the wheel so all the pieces move together.
To group, clone, and position all the wheels, follow these steps:
1. Select the 编辑>选择全部(or press the Ctrl+A shortcut) to select all the objects. Then choose the 组>成组 menu command and name the group 轮子 in the dialog box that appears.
2. Enable the 角度捕捉切换 button on the main toolbar and rotate the wheel in the Top viewport 90 degrees so it is standing upright.
3. Although you can clone objects by moving them with the Shift key let down, you want to keep the sphere on the outside of the wheel, so you’ll want to mirror the wheel. Select the 工具>镜像 menu command. In the Mirror dialog box that appears, select Y as the 镜像轴, set the 偏移 value to 220, and enable the 复制 option. Then click OK to close the dialog box.
4. Click the 所有视图最大化显示 button in the lower-right corner to see both wheels in all viewports.
三、Finishing the 大炮
With the wheels in place, you can complete the 大炮 by adding the axle, the barrel, and the support.
To finish the cannon model, follow these steps:
1. Using the Front viewport, select the 创建>标准基本体>圆柱体 menu command and drag to create an axle that runs between the two hub objects. Set its Radius value to 22, its Height value to -220 and its Sides value to 18.
2. With the axle selected, select the 工具>对齐>对齐 menu command (or press the Alt+A shortcut) and click one of the wheel groups. This opens the Align Selection dialog box; select the Y Position option and the Center options for the Current and Target objects. Then click OK to align the axle to the wheel center.
3. In the 左 viewport, select the 创建>标准基本体>管状体 menu command and drag to create the 大炮 barrel. Set its Radius1 value to 30, its Radius2 value to 22, its Height to 350, its Height Segments to 3, and its Sides value to 18. Then select and move the barrel backwards in the Front viewport until one third of the barrel is behind the axle.
4. Select the barrel object and choose the 修改器>参数化变形器>锥化 menu command to apply the Taper modifier to the barrel object. In the Parameters rollout, set the Amount value to -0.4. with the 主轴 Z axis enabled. This reduces the size of the cross section（横切面） at the front of the barrel.
5. In the Left viewport, select the 创建>标准基本体>圆柱体 menu command and drag to create the back end of the barrel. Set its Radius value to 25, and its Height to 10. Then move the cylinder to the back of the 大炮. Then create a sphere object with a Radius of 12 and position it behind the back end cylinder to act as a handle. Use the ViewCube to rotate the Perspective viewport so you can see the back of the barrel.
6. In the Left viewport, select the 创建>标准基本体>长方体 menu command and drag to create a rectangular box object to act as the ground support. Set its dimensions to 25, 60, and -450. Then rotate the support so its back end touches the ground equal with the wheels and the front end overlaps the barrel.
四 、Adding ProMaterials 材质
After the modeling is complete, you can add materials to the objects to improve their look.
Max includes a special set of materials that are used to dress up buildings and architectural designs, but they require that the mental ray render engine be enabled. After the mental ray render engine is enabled using the Render Scene dialog box, you can access the ProMaterials materials in the Material Editor.
To add materials to the cannon, follow these steps:
1. Select the 渲染>渲染设置 menu command (or press the F10 key) to open the Render etup dialog box. At the very bottom of the Common panel is the 指定渲染器 rollout. Within this rollout, click the button to the right of the 产品级 renderer and then double-click the mental ray Renderer option in the Choose Renderer dialog box that opens. Then close the Render Scene dialog box.
2. Select the 渲染>材质编辑器 menu command (or press the M key) to open the Material Editor. Click the Standard material button, select the ProMaterials: Metal material from the 材质/贴图浏览器, and click OK.
3. In the Metal Material Parameters rollout at the top of the Material Editor, select the Anodized Aluminum option from the Type drop-down list. Then click on the Color (Reflectance) color swatch and change the color to black. Then drag the Metal material from its 材质球 in the Material Editor, and drop it on the 炮筒 and back-end objects.
4. Select the second 材质球, and repeat the preceding step to choose the ProMaterials: Hardwood material with a black color. Then select the barrel and back-end objects and choose the 编辑>反选 menu command to select all objects except for the barrel and back end. Then click the 将材质指定给选定对象 button in the Material Editor. The Material Editor holds each of the selected materials.
五、Adding a Sun & Sky system
Another benefit of having the mental ray renderer enabled is that you also can use the Sun & Sky system. This system simulates outdoor lighting from a distant source like the sun and generates a sky for the background and a ground plane also.
To add a Sun & Sky system to the scene, follow these steps:
1. Because the Sun & Sky system adds a ground plane to the scene, you need to reposition the cannon so it is located above the default grid plane. Use the 编辑>全选 menu command (or press the Ctrl+A shortcut) to select all objects, and then move them in the 左视口 above the default grid.
2. Select the 创建>灯光>日光系统 menu command, and drag in the 顶视口 to add a compass helper to the scene. Then click and drag to position the Sun light icon above the 大炮.
When the Daylight System is applied, a dialog box automatically appears recommending that you use the Logarithmic Exposure Control and asks if you want to make this change. Click Yes to continue.
3. Select the 渲染>环境 menu command (or press the 8 key) to open the 环境和效果 dialog box. Click on the 环境贴图 button and select the mr Physical Sky map from the 材质/贴图浏览器. Then enable the 使用贴图 option, and close the Environment dialog box.
4. Next, choose the 视图>视口背景>视口背景 (or press Alt+B) menu command to open the >视口背景 dialog box, enable the 使用环境背景 and the 显示背景 options, and close the dialog box.
5. Then click the 最大化视口切换 button (Alt+W) in the lower-right corner of the interface to make the 透视视口 full sized.
6. With the daylight selected, click the 设置 button in the 日光参数 rollout found in the 修改面板. Then set the Time Hours to 18. This sets the time of day to sundown and places the sun in the horizon.
The viewport now shows the 大炮 with a background sky and a ground plane.
六、渲染 the scene
1. Use the 视口导航控件, located in the lower-right corner of the interface, to position the cannon view just the way you like it.
2. Select the 渲染>渲染设置 menu command (or press the F10 key), and open the 间接照明 panel. Turn on the 启用最终聚集 option, and set the 预设 to 中. This computes a global illumination model by determining how light rays bounce about the scene.
3. Back in the 公用 panel of the Render Scene dialog box, 选择适当的图像大小 in the Common Parameters rollout and click the Render button. The active viewport automatically is rendered and displayed in the Render Frame Window.
The rendered 大炮 image, includes all the materials, lighting effects, reflections, and refractions.
1. Click the 最大化视口切换 button in the lower-right corner of the interface to toggle back to four viewports. Then 缩放 the 顶视口 so you can see the entire cannon and the distant horizon.
2. Select the 创建>标准基本体>球体 menu command, and drag in the 顶视口 to create a 炮弹. Size the 炮弹 to a Radius of 15. Then position the 炮弹 within the 炮筒.
3. Drag the 时间滑块 to 帧 10 and click the 自动关键点 button at the bottom of the interface. Then click the 设置关键点 button to create a 关键帧 for the 炮弹.
4. Drag the 时间滑块 to frame 20 and drag the cannonball forward away from the cannon until it is out of the scene. The cannonball should only be visible for 4 frames as it moves out of the scene.
5. Drag over all the objects that make up the cannon object in the 顶视口 and drag the Time Slider to frame 10 again.
6. Click the Key button to create an initial keyframe for the cannon. Then drag the Time Slider to frame 13 and move the cannon backwards to define the recoil. With AutoKey enabled, the keyframe is created automatically.
7. Select just the barrel and the back end and return the Time Slider to frame 10; then click the Key button to set a key. Drag the Time Slider to frame 13 and rotate the barrel about 5 degrees upward. Then drag the Time Slider to frame 16 and rotate the barrel back to its original position.
By adding the secondary motion to the barrel, the animation looks more real.
Remember to turn off the Auto Key button when you are done animating or you will continue
to create keys as you edit the scene.
As a final effect to the scene, you°Oll add a stream of particles that will be emitted as the cannonball emerges This effect also helps with the realism of the scene.
To add a particle effect to the scene, follow these steps:
1. Select the 创建>粒子>超级喷射 menu command, and drag in the 左视口 at the center of the barrel to create a particle emitter. Move and orient the particle system icon to the front of the barrel so it is pointing in the direction of the traveling cannonball.
2. Choose the 选择并链接 button on the main toolbar and drag from the particle system icon to the cannon barrel. This links the particle system to the barrel so that it moves with it.
3. In the 修改 panel, set the Off Axis and Off Plane 扩散 values to 30 to cause the particles to fan out from its initial location. In the 粒子生成 rollout, set the 使用总数 to 10000, the 速度 to 30, the 发射开始 to 8, the 发射停止 to 20, and the 寿命 to 30 with a 变化 of 40. Then set the 粒子大小 to 20 with a 变化 of 20.
4. Open the 材质编辑器 and select the third sample slot; then click in the small map box to the right of the 漫反射颜色 and choose the 粒子年龄 map. Then set Color1 to orange, Color2 to yellow, and Color3 to black.
5. Then click the Up arrow icon in the Material Editor to get back to the base material and click the map button for the 不透明度 parameter and select the 烟雾 map in the Material/Map Browser. This will make the material 半透明 and 束状.
6. Apply the new material to the particle system.