Day 3, 4 – Fixing Mesh Imports

I have combined the last couple of days into one blog post since I have done multiple things since I fixed the camera issues.

I found another issue with how I imported meshes and this took me a lot longer than it should have taken (I guess this was mostly due to me not getting enough sleep since I fixed the issue the next day within minutes).

First of all what was the problem? When I implemented mesh loading using the assimp library I mostly just copy pasted most of the code (I know never do this) in order to get something up and running fast to test out other stuff. I never tested the mesh loading with different models so I was pretty surprised when I got this:

When I actually should have gotten this, without the textures / colors of course.

The first thing I did was refactor / restructure my code to get a better overview. This changed nothing except giving me a clearer overview of the code in place which is good anyway.

After a lot of digging around in RenderDoc and looking at the Index Buffers and Vertex Buffers I knew that the problem definitely was in how these were passed to the GPU. It turned out that I was just stupid since I mixed up the index buffer and vertex array buffer binding orders which caused the mesh to be incorrect.

As you can see from the screenshot now everything looks as it should look, except for the texture/material of course which I will implement soon.

Kommentar verfassen

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:

Du kommentierst mit Deinem Abmelden /  Ändern )


Du kommentierst mit Deinem Twitter-Konto. Abmelden /  Ändern )


Du kommentierst mit Deinem Facebook-Konto. Abmelden /  Ändern )

Verbinde mit %s