AEJuice Free Plugins https://aejuice.com/free-plugins/?ref...
AEJuice I Want It All Bundle https://aejuice.com/product/i-want-it...
AEJuice YouTube Channel / @aejuice
In this video we will learn how to load models from various file formats using the Assimp library and how to render them in OpenGL. We will store the models in OpenGL buffers using a method called 'Structure of Arrays' (SOA) and we will study the difference between this method and what we've been using so far ('Array of Structures' - AOS). Finally, we will enable the depth test in order to solve a visual problem with the rendered model.
🔥 I'm using the following books as background information for my tutorials and I highly recommend them for learning more about OpenGL and Vulkan.
These are affiliate links so if you use them to buy the books the price is the same for you and I will get a small commision (thank-you!).
📖 OpenGL 4 Shading Language Cookbook - Third Edition: Build high-quality, real-time 3D graphics with OpenGL 4.6, GLSL 4.6 and C++17 3rd ed. Edition: https://amzn.to/3XO2J3S
📖 3D Graphics Rendering Cookbook: A comprehensive guide to exploring rendering algorithms in modern OpenGL and Vulkan: https://amzn.to/3MMJQbf
(Watch my short video review on this book: • The 2nd book I'm using for my Vulkan ... )
📖 Vulkan Programming Guide: The Official Guide to Learning Vulkan: https://amzn.to/3XwBjhr
(Watch my short video review on this book: • The book I'm using for my Vulkan seri... )
Assimp homepage: https://www.assimp.org/
Assimp binary installation:
Ubuntu: sudo apt install assimp-utils libassimp-dev libassimp5
From sources:
git clone https://github.com/assimp/assimp.git
cd assimp
Linux: cmake .
Windows: cmake CMakeLists.txt
Build/Install (Linux):
make
sudo make install
Timecodes:
0:00 Intro
0:59 Model file formats
1:23 Introducing Assimp
2:04 Installing Assimp on Linux
3:34 Installing Assimp on Windows
7:47 Integrating Assimp into your project
7:52 The BasicMesh class
8:20 The BasicMesh::LoadMesh function
9:05 AOS vs SOA
12:38 The aiScene struct
13:13 The aiMesh struct
13:49 The aiMaterial struct
14:09 Planning the import
14:55 Counting the number of vertices and indices
16:20 Reserving space in our vectors
16:52 Initializing a single mesh
17:45 Initializing the texture
19:10 Populating the OpenGL buffers
20:58 The BasicMesh::Render function
21:36 Using glDrawElementsBaseVertex
24:00 Using BaseMesh in the main application code
24:49 Test the code
25:29 Enabling the depth test
25:49 Conclusion
Make sure to watch all the previous tutorials in the "OpenGL For Beginners" playlist at • OpenGL for Beginners
Please visit https://ogldev.org to see more of my tutorials on modern OpenGL.
Link to source: https://github.com/emeiri/ogldev/blob...
If you want to get the same version that was used in the video checkout the tag TUT_18_ASSIMP.
OpenGL 4.6 specification: https://www.khronos.org/registry/Open...
Feel free to comment below.
Email: [email protected]
Facebook: / ogldev-188319114585587
Github: https://github.com/emeiri/ogldev.git
Twitter: @ogldev
One time donations (Paypal): https://ogldev.org/donate.html
Patreon: / ogldev
Credits:
Music: "Perception" from https://bensound.com
Image: https://www.cleanpng.com/png-download...
Enjoy,
Etay Meiri
#opengl #ogldev #opengtutorials