资源描述:
《山山讲堂 Maya建模教程之电话建模》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、山山讲堂Maya建模教程之电话建模2009-11-1716:30作者:nathan来源:eNet硅谷动力本是想通过这篇教程介绍另外一种建模方法——鼎鼎大名的细分建模(Subdiv),但在录制过程中,由于惯性思维的影响,还是采用了多边形建模,不能不说是一个遗憾。为了弥补过失,我将在下一篇飞船建模的教程中与大家详细分享细分建模技术。 先来看一下最终的效果: 创建一个Cube,按照下图参数进行调整。 进入点级别,调整点的位置。 使用“InsertEdgeLoopTool”工具添加环线。 技巧:在使用InsertEdgeLoopTool工具的时候,为了一次性添加,我们可以
2、打开改工具的设置选项,具体设置如下: 使用Extrude命令进行三次挤压,效果如下图所示。 添加环线,保留形状。 使用Extrude命令进行挤压。 添加环线,保留形状。 重复上面的方法,制作出下图所示部分。 使用Extrude挤压,并调整点的位置。 继续挤压。 使用“splitpolygontool“添加线,保留形状。 挤压面,记住一定要关闭“keepfacestogether”选项。 添加环线,保留形状。 细分。 下面我们来制作话筒。 创建Cube,具体参数如下图所示。 F8进入点级别,调整点的位置。
3、添加环线,保留形状。 使用Extrude命令进行挤压。 重复上面的步骤,挤压出话筒部分。 细分。 制作电话线。这一部分比较难,但也比较简单。为什么这样说呢?如果你曾读过我前面的螺旋曲线教程的话,这里你只要写一个简单的MEL语言,就可实现我们想要的效果,如下图所示。 然后用户使用Surfaces下的Extrude命令就可实现电话线的制作。 今天换一个制作方法,我给大家提供专门制作电话线的脚本,这样更加方便快捷。 globalprocphoneCord1(string$curv,float$numLoops) { int$numCvs,$i; f
4、loat$p,$min,$max,$angle,$uoff,$voff; string$exp_str,$crv,$p_on_c; int$cvsPerLoop=4; //Webasethenumberofcvson $numCvs=(int)($numLoops+.5)*$cvsPerLoop; $crv=curve("-d",3,"-p",0,0,0,"-k",0,"-k",0,"-k",0); $min=getAttr($curv+".min"); $max=getAttr($curv+".max"); //createacurvewiththerequire
5、dnumberofcvs for($i=1;$i<=$numCvs;$i++) { curve-a-p((float)$i)00$crv; } //AddaloopOffsetattributetothespiralcurve addAttr-snloff-lnloopOffset-dv1.0-min0-max10$crv; setAttr-keyableon($crv+".loopOffset"); for($i=0;$i<=$numCvs;$i++) { $p=(float)$i/$numCvs; $angle=$p*$numLoops*6.28;
6、$uoff=-sin($angle); $voff=cos($angle); //wesettheoffsettozeroforthestartandendcvs if($i==0 $i==$numCvs) { $uoff=0; $voff=0; } $p=$min+($max-$min)*$p; //createapointOnCurvenodeonthesourcecurve $p_on_c=pointOnCurve("-ch",1,"-parameter",$p,$curv); //Createanexpressiontopositionthesp
7、iral //cvsrelativetothesourcecurveusingthe //point,normalandtangentfromthepointOnCurvenode //Acrossproductisperformedtogiveavectorperpendicular //tothenormalandtangent.The2Drotationisthenmappedto //thisvectorandthenorma