Using OpenGL and Assimp in a Qt Widget application to render 3D models / practice writing GLSL shaders
Go to file
Shaun Reed 578fcb2bbd Initial commit 2021-09-06 20:12:28 -04:00
app Initial commit 2021-09-06 20:12:28 -04:00
lib Initial commit 2021-09-06 20:12:28 -04:00
resources Initial commit 2021-09-06 20:12:28 -04:00
.gitignore Initial commit 2021-09-06 20:12:28 -04:00
CMakeLists.txt Initial commit 2021-09-06 20:12:28 -04:00
LICENSE Initial commit 2021-09-01 09:41:30 -04:00
README.md Initial commit 2021-09-06 20:12:28 -04:00
qtk_en_US.ts Initial commit 2021-09-06 20:12:28 -04:00
resources.qrc Initial commit 2021-09-06 20:12:28 -04:00

README.md

Qtk

Practice project for learning about using OpenGL in Qt5 widget applications. Model loader using Assimp.

You can fly around and see the examples I made, or import your own models within mainwdget.cpp, inside the MainWidget::initObjects() function. I've commented throughout the code there to explain which model or example I'm modifying. Rotations and translations happen in MainWidget::update(), to get textures loading on models look into material files and see some examples in the resources/models/ directory.

Can be built with cmake manually or using Qt Creator.

To build and run qtk on Ubuntu -

# Qt Creator
sudo apt update -y && sudo apt install qttools5-dev freeglut3-dev libassimp-dev
git clone https://gitlab.com/shaunrd0/qtk
mkdir build && cd build
cmake .. && cmake --build
./qtk

You can fly around the scene if you hold the right mouse button and use WASD. If you see a small triangle floating by a model it represents the light source that is being used for the shader rendering the model. These appear on models using phong, specular, and diffuse lighting techniques.

Spartan with no normals -

Spartan with normals -

Model Artists

"Alien Hominid" (https://skfb.ly/onStx) by Nwilly_art is licensed under Creative Commons Attribution (http://creativecommons.org/licenses/by/4.0/).

"Scythe World Of Warcraft" (https://skfb.ly/6UooG) by Warcraft-3D-Models is licensed under Creative Commons Attribution (http://creativecommons.org/licenses/by/4.0/).

"Spartan Armour MKV - Halo Reach" () by McCarthy3D is licensed under Creative Commons Attribution (http://creativecommons.org/licenses/by/4.0/).

"Survival Guitar Backpack (Low Poly)" (https://skfb.ly/6RnCB) by Berk Gedik is licensed under Creative Commons Attribution (http://creativecommons.org/licenses/by/4.0/). Model by Berk Gedik, from: https://sketchfab.com/3d-models/survival-guitar-backpack-low-poly-799f8c4511f84fab8c3f12887f7e6b36 Modified material assignment (Joey de Vries) for easier load in OpenGL model loading chapter, and renamed albedo to diffuse and metallic to specular to match non-PBR lighting setup.

"Terror-bird (NHMW-Geo 2012/0007/0001)" (https://skfb.ly/onAWy) by Natural History Museum Vienna is licensed under Creative Commons Attribution-NonCommercial (http://creativecommons.org/licenses/by-nc/4.0/).

"Golden Lion Sitting OBJ Low Poly FREE" (https://skfb.ly/onZAH) by LordSamueliSolo is licensed under Creative Commons Attribution (http://creativecommons.org/licenses/by/4.0/).