數字人輕鬆學Xpresso入門-5
廢話不多說,繼續用XPRESSO研究皮帶輪子的運動。
![7195479-50c50aa8d03ed7d0.png](https://upload-images.jianshu.io/upload_images/7195479-50c50aa8d03ed7d0.png)
![7195479-5defee2380ec45bf.gif](https://upload-images.jianshu.io/upload_images/7195479-5defee2380ec45bf.gif)
第一步製作輪子:
1、在場景中建立一個圓盤,設定如下:
![7195479-e572cb69a08d00bb.png](https://upload-images.jianshu.io/upload_images/7195479-e572cb69a08d00bb.png)
2、按C 轉換多邊形。邊模式,按UL圈選,調整邊的位置。
![7195479-ab0c321790f6030d.png](https://upload-images.jianshu.io/upload_images/7195479-ab0c321790f6030d.png)
3、選擇如下圖的面,刪除。
![7195479-fd2cdb287b16c15f.png](https://upload-images.jianshu.io/upload_images/7195479-fd2cdb287b16c15f.png)
4、選擇面模式,按D ,擠壓。
![7195479-45a15abe6fa6a64b.png](https://upload-images.jianshu.io/upload_images/7195479-45a15abe6fa6a64b.png)
5、選擇中間的兩邊的面,按D 擠壓(注意,勾掉"建立封頂",否則,裡邊會出現夾層)
![7195479-1dd30b82356a4b69.png](https://upload-images.jianshu.io/upload_images/7195479-1dd30b82356a4b69.png)
6、如此再擠出上邊的面。
![7195479-843ae42dc2e6af76.png](https://upload-images.jianshu.io/upload_images/7195479-843ae42dc2e6af76.png)
7、 面模式,UL圈選中間的面,按D擠壓。
![7195479-620219618305dc41.png](https://upload-images.jianshu.io/upload_images/7195479-620219618305dc41.png)
8、按T縮放。
![7195479-4b0c5f241e74d55c.png](https://upload-images.jianshu.io/upload_images/7195479-4b0c5f241e74d55c.png)
9 、為其新增一個平滑細分,太圓滑了。
![7195479-a09ef069e652b845.png](https://upload-images.jianshu.io/upload_images/7195479-a09ef069e652b845.png)
10、面模式,按K,切刀,選擇迴圈模式,對要硬化的邊,切邊。
![7195479-2b26f5eec677d065.png](https://upload-images.jianshu.io/upload_images/7195479-2b26f5eec677d065.png)
11、按Q再開啟細分,現在好多了。
![7195479-4da4e1ac1920edf3.png](https://upload-images.jianshu.io/upload_images/7195479-4da4e1ac1920edf3.png)
12、按C轉化為多邊形。
![7195479-28b7dcf96b3be47f.png](https://upload-images.jianshu.io/upload_images/7195479-28b7dcf96b3be47f.png)
13、當初,圓盤的外半徑為200,由於進行細分之後,模型要往裡”圓滑“,所以要比原來小。
找到下面的尺寸,XY輸入400,應用。
![7195479-66467d4a161fec26.png](https://upload-images.jianshu.io/upload_images/7195479-66467d4a161fec26.png)
14、按CTRL 複製一個,在尺寸XY中輸入200。大輪子改名叫主動輪,小輪子叫被動輪。
![7195479-91995a6b91ee3d96.png](https://upload-images.jianshu.io/upload_images/7195479-91995a6b91ee3d96.png)
第二步製作皮帶:
1、在場景中建立一個圓環曲線。半徑為200。
![7195479-6b6c690eb73d58ec.png](https://upload-images.jianshu.io/upload_images/7195479-6b6c690eb73d58ec.png)
2、 複製一個圓環曲線,把它當做”被動輪“的子物體。然後,把這個圓環的座標歸零。這個圓環就和”被動輪“中心對齊了。(一般人我不告訴他)
![7195479-9034831c29dea97c.png](https://upload-images.jianshu.io/upload_images/7195479-9034831c29dea97c.png)
3、轉正檢視,按C ,轉換可編輯曲線。(還是兩個曲線)
![7195479-df65b8b96a1eda1e.png](https://upload-images.jianshu.io/upload_images/7195479-df65b8b96a1eda1e.png)
4、選擇一個曲線一點,右鍵”斷開連線“
![7195479-0b6d1bebec289cb1.png](https://upload-images.jianshu.io/upload_images/7195479-0b6d1bebec289cb1.png)
5、另一個曲線也是,並刪除點。
![7195479-f590b3812dae54a7.png](https://upload-images.jianshu.io/upload_images/7195479-f590b3812dae54a7.png)
6、 選擇兩個曲線,右鍵”連線+刪除“,合併為一個曲線。選擇下圖這兩個點。
![7195479-6a5e392fa93a6e51.png](https://upload-images.jianshu.io/upload_images/7195479-6a5e392fa93a6e51.png)
7、右鍵”合併分段“,然後,點選選取,勾選皮膚的”閉合樣條。
![7195479-a9497b1cf68133a9.png](https://upload-images.jianshu.io/upload_images/7195479-a9497b1cf68133a9.png)
8、選擇一些點,進行調整。(原則是兩個手柄與曲線相切,走向一致)
![7195479-8f47de6ebdc70c5f.png](https://upload-images.jianshu.io/upload_images/7195479-8f47de6ebdc70c5f.png)
9、皮帶線製作完成。
![7195479-4021e549243b2e8e.png](https://upload-images.jianshu.io/upload_images/7195479-4021e549243b2e8e.png)
10、 製作皮帶截面。放大大輪子的正上方。按UM路徑選擇,選擇如圖的曲線。
![7195479-103eb581b04c245f.png](https://upload-images.jianshu.io/upload_images/7195479-103eb581b04c245f.png)
11、選擇選單--網格--命令--提取樣條。從模型分離出一個樣條,它的分段點太多。
![7195479-bbb0c36a02866a1b.png](https://upload-images.jianshu.io/upload_images/7195479-bbb0c36a02866a1b.png)
12、右鍵“平滑”對齊進行優化。
![7195479-184a55266beffe84.png](https://upload-images.jianshu.io/upload_images/7195479-184a55266beffe84.png)
13、勾選皮膚的“閉合曲線”。
![7195479-b7167f9b1d18309f.png](https://upload-images.jianshu.io/upload_images/7195479-b7167f9b1d18309f.png)
14、選擇上邊的兩個點,右鍵“倒角”。
![7195479-8d114fac537b7768.png](https://upload-images.jianshu.io/upload_images/7195479-8d114fac537b7768.png)
15、把此曲線改為截面。新增一個掃描物件,如下圖。發現,掃描出的模型不對。
![7195479-e24a5326619ec604.png](https://upload-images.jianshu.io/upload_images/7195479-e24a5326619ec604.png)
15、發現是截面的座標有問題。(應該是Z軸垂直截面)
![7195479-61892c555e2862be.png](https://upload-images.jianshu.io/upload_images/7195479-61892c555e2862be.png)
16、按L 修改座標,旋轉90度。
![7195479-039ffa170f037c54.png](https://upload-images.jianshu.io/upload_images/7195479-039ffa170f037c54.png)
17、開啟掃描,發現還是不對。是Y軸。按L,直接旋轉調整。
![7195479-319f6b6261165649.png](https://upload-images.jianshu.io/upload_images/7195479-319f6b6261165649.png)
18、這個方向是對的。
![7195479-26a423fdcbe956e0.png](https://upload-images.jianshu.io/upload_images/7195479-26a423fdcbe956e0.png)
19、點選兩個曲線,進行優化。完成下面的皮帶模型。
![7195479-f29f093be1ba3796.png](https://upload-images.jianshu.io/upload_images/7195479-f29f093be1ba3796.png)
20、渲染看看。
![7195479-7db54ff3ddbf326a.png](https://upload-images.jianshu.io/upload_images/7195479-7db54ff3ddbf326a.png)
第三步建立材質
主要介紹是皮帶材質。
1、高光
![7195479-36dc44e0fcec0092.png](https://upload-images.jianshu.io/upload_images/7195479-36dc44e0fcec0092.png)
2、凹凸用圖層。下面的燥波細緻一些,上面的燥波粗糙一些。
![7195479-12c7e44c8ab14deb.png](https://upload-images.jianshu.io/upload_images/7195479-12c7e44c8ab14deb.png)
3、顏色通道,紋理新增燥波。
![7195479-680f73c627f41052.png](https://upload-images.jianshu.io/upload_images/7195479-680f73c627f41052.png)
4、其他的材質忽略。(材質不是重點,自己美化吧)
![7195479-2b32df62f74c4a1f.png](https://upload-images.jianshu.io/upload_images/7195479-2b32df62f74c4a1f.png)
第四步製作動畫
1、簡單的分析:
如下圖,ABC三點的線速度是相同的。(相同時間轉過相同的弧長)大輪子的半徑為小輪子半徑的2倍,從速度比來說,假設大輪子的半徑為1,那麼小輪子的半徑為0.5,大輪子的角速度為1,那麼小輪子的角速度為2(輪子的角速度與半徑成反比),ABC三點的線速度就是 大輪子半徑×大輪子角速度=1。
![7195479-1f82d4f999998854.png](https://upload-images.jianshu.io/upload_images/7195479-1f82d4f999998854.png)
2、建立空白物體,新增XPRESSO標籤。把主動輪(大輪子)和被動輪(小輪子)拖入。
![7195479-4aa68749c862739e.png](https://upload-images.jianshu.io/upload_images/7195479-4aa68749c862739e.png)
3、新增數學節點,用“乘”,“輸入2埠”輸入數字為2。小輪子的角速度是大輪子的2倍。
![7195479-656c4492bb3e155d.png](https://upload-images.jianshu.io/upload_images/7195479-656c4492bb3e155d.png)
4、 新增XPRESSO預置 Rotation,做如下連線,測試,大小輪子轉動符合要求。
![7195479-7623ec5ecffb14eb.png](https://upload-images.jianshu.io/upload_images/7195479-7623ec5ecffb14eb.png)
5、如何製作皮帶轉動動畫呢?
難道你真想讓皮帶模型轉動嗎?無論輪子如何轉動,皮帶的樣子也是不變的。有一個辦法,就是製作皮帶的材質動畫,我們製作皮帶的材質跟隨著輪子以一定速度移動,感覺就是皮帶在轉。
首先為了看清楚,材質移動,需要更換以前製作的皮帶的材質。在顏色通道--紋理中新增棋盤格。
![7195479-96e3dcc24a841e29.png](https://upload-images.jianshu.io/upload_images/7195479-96e3dcc24a841e29.png)
2、渲染一下,發現這個材質清楚。
![7195479-c27f9c97dade2e95.png](https://upload-images.jianshu.io/upload_images/7195479-c27f9c97dade2e95.png)
3、點選材質,發現移動"偏移V"可以使皮帶紋理延需要的方向移動。
![7195479-c50eca93116927e7.png](https://upload-images.jianshu.io/upload_images/7195479-c50eca93116927e7.png)
4、把這個材質新增進來,在輸入端找到“偏移V",按照下面連線。
![7195479-3c1e444528811bf7.png](https://upload-images.jianshu.io/upload_images/7195479-3c1e444528811bf7.png)
5、測試,顯示動畫效果很好,速度匹配也非常好。
(可惜這是圖文教程,動畫效果你看不到,但你可以想啊)
![7195479-6f4fef12016cf7cd.png](https://upload-images.jianshu.io/upload_images/7195479-6f4fef12016cf7cd.png)
6、如果你感覺速度慢,可以調整Rotate節點的 1/S埠,數值越大,則轉速越快。
在輸出動畫時,你可以把以前做過的材質賦予皮帶,然後,把該材質的拖入進來,如此編輯即可。
![7195479-f17327fa66357a85.png](https://upload-images.jianshu.io/upload_images/7195479-f17327fa66357a85.png)
【後記】
這篇與其說是研究XPRESSO,倒不如說是建模的研究,製作兩個輪子和皮帶用了一大半時間。
我也不是學機械的,製作機械動畫必須要掌握一些機械理論,過去僅當過高中物理老師,知道一點皮毛而已。如果製作動畫,用上面的方法是可以的;但如果製作模擬動畫,那就必須按照公式來處理相互的邏輯關係。
相關文章
- SQL輕鬆入門(5):視窗函式SQL函式
- Arduino :入門教學讓你輕鬆玩轉UI
- Flask入門很輕鬆 (一)Flask
- Apache Kafka安裝和使用(入門教程輕鬆學)ApacheKafka
- Flask入門很輕鬆(三)—— 模板Flask
- Webpack輕鬆入門(四)——HTML打包WebHTML
- 04selenium爬蟲輕鬆入門爬蟲
- Webpack輕鬆入門(三)——圖片打包Web
- 輕輕鬆鬆帶你入門Android Jetpack(含Jetpack Compose),容易肝不難!AndroidJetpack
- 監控神器:Prometheus 輕鬆入門,真香!(上篇)Prometheus
- 監控神器:Prometheus 輕鬆入門,真香!(下篇)Prometheus
- Apache Doris 輕鬆入門和快速實踐Apache
- 小白學大資料掌握這幾個方法可輕鬆入門大資料
- 5分鐘輕鬆學正規表示式
- 萬字長文,帶你輕鬆學習 SparkSpark
- 1.5 w字、16 張圖,輕鬆入門 RLock+AQS 併發程式設計原理AQS程式設計
- MySql輕鬆入門系列————第一站 從原始碼角度輕鬆認識mysql整體MySql原始碼
- 解鎖 VS Code 更多可能性,輕鬆入門 WebViewWebView
- 企業客戶體驗數字化之路非輕鬆之旅
- 輕鬆上手CANoe Scenario Editor———智慧網聯工程師入門篇工程師
- electron-egg: 當代桌面開發框架,輕鬆入門electron框架
- MySql輕鬆入門系列——第一站 從原始碼角度輕鬆認識mysql整體框架圖MySql原始碼框架
- Android開發社招面試經驗:萬字長文輕鬆徹底入門Flutter,詳細的Android學習指南Android面試Flutter
- 如何輕鬆學習 Kubernetes?
- 輕鬆入門,30min 搭建一個「淘立拍」應用
- 軟體工程入門-輕鬆理解依賴注入 (DI) 和 IoC 容器軟體工程依賴注入
- 優思學院|DMAIC從入門到精通,輕鬆學會六西格瑪的基本原理!AI
- substrate輕鬆學系列5:編寫pallet的Rust前置知識Rust
- 5款讓Web前端開發人員更輕鬆的實用工具!Web前端
- Python入門塔防小遊戲,開發步驟和原始碼,帶你輕鬆學pythonPython遊戲原始碼
- 2020年學網路運維與安全就業薪資多少?這套教程輕鬆入門運維就業
- substrate輕鬆學系列1:前言
- 怎麼輕鬆學習JavaScriptJavaScript
- 讀懂這4條建議,輕鬆實現數字化轉型
- 看圖輕鬆理解計數排序排序
- Python實戰案例彙總,帶你輕鬆從入門到實戰Python
- 深度學習推理時融合BN,輕鬆獲得約5%的提速深度學習
- 不知道怎麼入門學Java?這套Java基礎全套影片合集幫你輕鬆搞定Java
- 萬字長文+圖解,帶你輕鬆學習 Spark(文末送PDF)圖解Spark