Maya 建模入门:Sci-Fi 太阳能电池板
《Modeling a Single Solar Cell》 2024-02-09
《Duplicating the Cells》 2024-02-17
《Building the Panel Body》 2024-03-04
《Duplicating and Placing Panels》 2024-03-17
《Modeling the Array Base》 2024-03-31
《Constructing the Bracket》 2024-04-07
《Modeling the Feet Using Nurbs》 2024-04-14
《Building the Leg Geometry》 2024-04-21
《Extracting Useable Geometry》 2024-05-05
《Duplicating the Legs》 2024-05-15
这个太阳电池板说是 Sci-Fi 题材的,其实就是“不好看”的说辞。但是现在没办法,因为它对初学者友好。
回顾一下整个系列,总结一下所学。这个模型里面的物体,要不就是基本体加挤出而来的,要不就是 NURBS 旋转或挤出得来的。细节靠平滑得到,循环边限制平滑范围。
视频中说,不要限制跟着做,发挥自己想象力,自己找一些其他的物体尝试建模。但是感觉还是没什么思路,自己之后需要这么尝试。
模型既然完成了,简单试了一下渲染。菜单 Arnold / Lights / Skydome Light 添加自然光,就能够在 Arnold 里渲染了。窗口 / 渲染编辑器 / 渲染设置 里可以设置渲染图片大小以及渲染精度等。
为了自定义渲染视口,可以添加一个摄像机。面板 / 透视 里可以切换到添加的摄像机视角,从而进行调整。

同时记录一下:NURBS 有点特殊,比如在边界或导出方面,都和多边形有所不同。如果想“剔除”选中物体集合里的 NURBS,可以使用代码清单 1 的脚本。
- import maya.cmds as cmds
- # 获取当前选中的所有物体
- selected_objects = cmds.ls(selection=True, long=True) or []
- # 创建一个空列表用于存放非NURBS对象
- non_nurbs_objects = []
- # 检查每个对象,如果它是transform节点,检查其子节点
- for obj in selected_objects:
- # 判断对象是否为transform节点
- if cmds.nodeType(obj) == 'transform':
- # 获取该节点下的所有子节点,这些通常是形状节点
- shapes = cmds.listRelatives(obj, children=True, shapes=True, fullPath=True) or []
- # 检查每个形状是否为NURBS类型
- is_nurbs = False
- for shape in shapes:
- if cmds.nodeType(shape) in ['nurbsCurve', 'nurbsSurface']:
- is_nurbs = True
- break
- if not is_nurbs:
- non_nurbs_objects.append(obj)
- else:
- # 如果不是transform节点,直接添加到非NURBS列表
- non_nurbs_objects.append(obj)
- # 清除当前的选择
- cmds.select(clear=True)
- # 如果存在非NURBS对象,选择这些对象
- if non_nurbs_objects:
- cmds.select(non_nurbs_objects)
- print("已选中非NURBS的物体:", non_nurbs_objects)
- else:
- print("没有找到非NURBS的物体。")
- # 强制刷新UI,确保大纲视图更新
- cmds.refresh()