2023年4月19日 星期三

呱! - Week10 - 模型🦆

Week10

網址連結:https://jsyeh.org/3dcg10/


下載

data > data.zip

win32 > windows.zip

glut32.dll > 按保留


解壓縮

windows.zip > 下載 > windows\Transformation.exe

data.zip > windows\data(解壓後的data拉去windows資料夾下)




Transformation.exe





-1



step01


先從jsyeh.org的3dcg10下載老師範例跑Transformation.exe會把data目錄中的3D模型畫出來3D模型對應的OBJ檔,會再引用.mtl檔對應material材質。OBJ檔裡的v對應vertex頂點,vt對應vertex texture打光要用的法向量。f是點線面的面,會需要3個頂點or4個以上的頂點。


下載
source.zip > source

下載source.zip >  複製 glm.h > 放到week10_glm資料夾裡

glm.c改檔名為glm.cpp放在week10_glm目錄裡



把模型檔 data裡的模型 > 全部複製 > 放到freeglut > bin


滑鼠右鍵 > 選擇Add files > 將glm.cpp加入


執行結果





week10_glm



-2





為了製作貼圖,最好讀圖方式OpenCV用舊版OpenCV2.1
桌面 > 葉正聖老師上課軟體 > 安裝OpenCV-2.1.0-win32-vs2008.exe > Add PATH重設 > 使用原先OpenCV2.1目錄 > CodeBlock重開


設定(參考week07)

Setting-Compiler
Search directory搜尋的目錄
1.Compiler: C:\OpenCV2.1\include
2.Linker: C:\OpenCV2.1\lib

Linker setting cv210 cxcore210 highgui210


week10_glmgundam


-3




安裝Git GitBash

-cd desktop
-git clone https://github.com/Owoyayou/2023graphicsa
-cd 2023graphicsa
-start .
  (打開2023graphicsa資料夾,把今日程式碼檔案放進來)
-git add .
-git status
(開啟檔案總管)
-git config --global user.email ______________
-git config --global user.name Owoyayou
-git commit -m "week10"
-git push

沒有留言:

張貼留言