Optimize Your Meshes! // OpenGL Tutorial #48

  Рет қаралды 5,031

OGLDEV

OGLDEV

Күн бұрын

In this video we learn how to optimize meshes and models using the Mesh Optimizer tool.
Mesh Optimizer: github.com/zeux/meshoptimizer
Arseny Kapoulkine on youtube: / @zeuxcg
Timecodes:
0:00 Intro
1:12 Installing Mesh Optimizer
2:33 Integration
2:47 SOA to AOS
8:11 Integration - continued
9:54 Optimization #1 - drop duplicate vertices
12:57 Optimization #2 - optimize the vertex cache
14:07 Optimization #3 - optimize overdraw
15:50 Optimization #4 - optimize the vertex buffer
16:37 Optimization #5 - mesh simplification
19:14 Outro
Make sure to watch all the previous tutorials in the "OpenGL For Beginners" playlist at • OpenGL for Beginners
Please visit ogldev.org to see more of my tutorials on modern OpenGL.
Link to source: github.com/emeiri/ogldev/blob...
If you want to get the same version of the code that was used in the video checkout the tag 'TUT_48_MESH_OPTIMIZER'.
OpenGL 4.6 specification: www.khronos.org/registry/Open...
Credits:
Models from McGuire Computer Graphics Archive: casual-effects.com/data/
Image: www.cleanpng.com/png-download...
GPU Image by rwindr from Pixabay
-----------------------
Easy Love by Hotham / hothammusic
Creative Commons - Attribution 3.0 Unported - CC BY 3.0
Free Download / Stream: bit.ly/405k8o8
Music promoted by Audio Library bit.ly/3Qbk2H1
-----------------------
Tropical Funk by tubebackr / tubebackr
Creative Commons - Attribution-NoDerivs 3.0 Unported - CC BY-ND 3.0
Free Download / Stream: bit.ly/3Q6Ut9N
Music promoted by Audio Library bit.ly/3MxS2fR
----------------------
Feel free to comment below.
Email: ogldev1@gmail.com
Instagram: @ogldev1
Github: github.com/emeiri/ogldev.git
Twitter: @ogldev
One time donations (Paypal): ogldev.org/donate.html
Patreon: / ogldev
Enjoy,
Etay Meiri
#opengl #ogldev #opengtutorials

Пікірлер: 12
@OGLDEV
@OGLDEV 6 ай бұрын
Clone the sources: git clone --recurse-submodules github.com/emeiri/ogldev.git If you want to get the same version that was used in the video you can checkout the tag 'TUT_48_MESH_OPTIMIZER'. Build on Windows: Open the Visual Studio solution: ogldev\Windows\ogldev_vs_2022\ogldev_vs_2022.sln Build the project 'OpenGL Tutorials\Tutorial48_MeshOptimizer' Notes: 1. I've implemented a similar change in the SkinnedMesh class which derives from BasicMesh. It is not presented in the video but you can check the sources for more details. Homework: 1. Try to productize the mesh simplification optimization to be used in a real game. The mesh should be loaded by Assimp once and then optimized for several levels of detail based on the users request. When rendering the proper LOD should be selected based on the distance from the camera.
@cheerwizard21
@cheerwizard21 6 ай бұрын
I am happy that your educational content is still alive and you didn't suspended this channel. Keep it up! 🙂
@OGLDEV
@OGLDEV 6 ай бұрын
Thanks! 😃
@syntaxed2
@syntaxed2 6 ай бұрын
Hell yeah! I was just looking at this the other day :) perfect timing!
@OGLDEV
@OGLDEV 6 ай бұрын
Enjoy!
@yuhaohan1451
@yuhaohan1451 6 ай бұрын
Thanks for the content!
@OGLDEV
@OGLDEV 6 ай бұрын
My pleasure!
@edwincarlsson9014
@edwincarlsson9014 6 ай бұрын
Hi and thank you! Very informative. I’ve always thought that just Assimp is enough, but I’ll have to try to optimize my meshes! Question: My geometry shader only allows for a single diffuse, normal, and specular map (3 in total). How should I handle meshes that have several textures per vertex? I’m very stuck here.
@OGLDEV
@OGLDEV 6 ай бұрын
You're welcome :-) Do you plan to use the same texture coordinates for each texture? Assimp supports loading multiple sets of texture coordinates per vertex (though I haven't used this feature yet). In general you need to assign a unique sampler for each texture and bind each texture to its corresponding sampler.
@cheerwizard21
@cheerwizard21 6 ай бұрын
1. Mix textures on CPU, if you mean several textures with similar format. Like several albedos per vertex. 2. Maybe try to use instance rendering as well and do rendering per instance with combination of geometry shader. That way to make draw call that send all instances to gpu, all instance can be stored in some sort of InstanceBuffer. In case of DX11 it's StructuredBuffer or in case of OpenGL it's - StorageBuffer. 3. Use Texture Array or Texture 3D and store texture index per instance or per vertex. 4. For optimization of 3. you can generate Texture Atlas, store atlas cells & locations into instance buffer and than send it to shaders. 5. You can use bindless textures feature in newer OpenGL. I don't really remember how to do it, since I switched to DX11 1 year ago.
@crouette
@crouette 6 ай бұрын
Any numbers on what are the frame rate improvements after the different optimizations (without simplification)?
@OGLDEV
@OGLDEV 6 ай бұрын
I didn't get a chance to do such measurements myself on real workloads. I guess it will be very difficult to provide a general guidance such as "the library improves the performance by 1.5x" due to the vast difference between workloads and GPUs.
Render a Wireframe On a Solid Mesh // OpenGL Tutorial #49
10:11
Let's Get Physical (Device) // Vulkan For Beginners #5
17:36
Заметили?
00:11
Double Bubble
Рет қаралды 2,8 МЛН
КАРМАНЧИК 2 СЕЗОН 5 СЕРИЯ
27:21
Inter Production
Рет қаралды 592 М.
Eccentric clown jack #short #angel #clown
00:33
Super Beauty team
Рет қаралды 26 МЛН
FOOTBALL WITH PLAY BUTTONS ▶️ #roadto100m
00:29
Celine Dept
Рет қаралды 75 МЛН
Shadow Mapping Unleashed! // OpenGL Tutorial #38
17:07
OGLDEV
Рет қаралды 4,7 М.
Basic Shadow Mapping // OpenGL Tutorial #35
16:54
OGLDEV
Рет қаралды 19 М.
WWDC23: Bring your game to Mac, Part 1: Make a game plan | Apple
15:06
Introduction To Tessellation // OpenGL Tutorial #47
16:57
OGLDEV
Рет қаралды 4,7 М.
how this game renders millions of blades of grass
5:03
Stylized Station
Рет қаралды 367 М.
Rotations in 3D Graphics With Quaternions
8:23
Manifolds in Maryland
Рет қаралды 6 М.
When Your Game Is Bad But Your Optimisation Is Genius
8:52
Vercidium
Рет қаралды 1,3 МЛН
Is Gaijin Right about Abrams Hull Armor??
8:24
RedEffect
Рет қаралды 225 М.
An introduction to Shader Art Coding
22:40
kishimisu
Рет қаралды 907 М.
My 2 Year Journey of Learning C, in 9 minutes
8:42
VoxelRifts
Рет қаралды 541 М.
Заметили?
00:11
Double Bubble
Рет қаралды 2,8 МЛН