2022年4月12日 星期二

´◔౪◔)Morning Star

 Week07 

1. Light Material打光

    0. 日常下載

        0-1. 到 jsyeh.org/3dcg10 下載 windows/data/source.zip
        0-2. 執行 Light Material.

    1. 複習上週,去熟悉 Light Material

    2. 實作看看3D模型!!!

        2-0. 到 moodle下載 freeglut
        2-1. File-New-Project, 開新的GLUT專案。偷它的程式(全偷~),放在Notepad++

    3. 了解 GLUT專案,在做些什麼

        3-1. GLUT callback? 回呼函式。會被 GLUT  呼叫的函式,
                ex:display()/keyboard()/mouse()/motion()
        3-2. 打光的程式碼: GL_LIGHTO
                a. 打光的陣列
                b. 打光的函式

    4. 從 git hub 拿出上周的程式 week06_light的main函式複製到week07_model

        4-0. Open Git Bash
        4-1. cd desktop/git clone 網址
        4-2. copy paste 到 week07_model的main函式中

    5. 把 souce.zip 裡的檔案拿來"學習" 理解理解 >_< 就可以讀入模型了

        5-1. glm.h 要 include 它
        5-2. glm.c 改檔名為 glm.cpp
        5-3. lightmaterial.cpp 用 Notepad++ ''學習''((偷程式碼~又來了

    6. 畫我們的3D模型

        6-1. 使用 drawmodel() 程式碼 glutSolidTeapot()
        6-2. 把下載的data資料夾放在工作目錄 (C:\Users\...\Desktop\freeglut\bin\) 裡 
        6-3. 把glm.h&glm.cpp放到week07_model目錄裡
        6-4. 在codeBlock頁面裡的week0按右鍵 Add Flie-glm.cppglm.cpp 

push上雲端吧

沒有留言:

張貼留言

VERY BEAUTIFUL, VERY POWERFUL

一.     一樣先安裝且設定好freeglut,OpecCV, 開啟CodeBlocks建立新專案 week11_gundam,                 把 MyGundam.zip下載解壓縮後的data資料夾放到freeglut/bin裡面 把week09_openc...