Loading 3D Models - Vulkan Game Engine Tutorial 17

Поділитися
Вставка
  • Опубліковано 25 вер 2024

КОМЕНТАРІ • 60

  • @BrendanGalea
    @BrendanGalea  3 роки тому +12

    Note: There's a mistake at 13:37, and the default color doesn't actually work and will always be white based on how tinyobjloader works! I will address this in the next tutorial.

    • @berghwilliam
      @berghwilliam 3 роки тому +9

      Even the mistakes are elite :)
      These tutorials really make it easy to understand how it all works and I do hope you enjoy making them as much as I enjoy watching them!

    • @BrendanGalea
      @BrendanGalea  3 роки тому +2

      Haha elite isn’t quite the word I’d use. This one was very careless of me to not test more thoroughly 😅

  • @piepgrassargpeip8884
    @piepgrassargpeip8884 3 роки тому +20

    I appreciate the work you've put into this! This will help thousands of nerds in the years to come, for sure!
    Pat yourself on the back for me

  • @guitarvoicing
    @guitarvoicing Рік тому +7

    As all other coders, this is a MUST watch series. Even if you are a experienced graphics programmer, you will learn so much from it. All the small details that we often bypass it well covered. Thank you again Mr. Galea!

    • @sehzadeselim863
      @sehzadeselim863 10 місяців тому

      Hey, I have found your channel thanks to your comment! It's high time I started to watch about physics in a computer graphics

  • @DiMeng666
    @DiMeng666 6 місяців тому +2

    When the model changed to vase, I found it upside down(I didn't realize it when we used cube as the model). I know the reason is about coordinate system, so I add a negative sign before model matrix[1][1] and it works.😄

    • @telli5868
      @telli5868 6 місяців тому

      i have the same problem, where did you add the negative sign exactly ?

    • @DiMeng666
      @DiMeng666 6 місяців тому

      @@telli5868TransformComponent::mat4() in GameObject.cpp, mat4[1][1]=-scale.y * (c2 * c3). btw it's just a temporary way, you'll learn how to reset OBJ file in the next tutorial.

  • @theRPGmaster
    @theRPGmaster 3 роки тому +6

    This is a topic I've been waiting for, nice. Also, I suggest reading about the glTF format if you haven't already.

    • @BrendanGalea
      @BrendanGalea  3 роки тому +3

      Great suggestion! I'll likely cover glTF2.0 format in a future tutorial once we've covered more of the basics.

  • @gvcallen
    @gvcallen 3 роки тому +2

    Wow! All caught up! Thanks so much for the series so far, your explanations (theory and code) are really insightful and helpful for understanding the monstrosity that is Vulkan. Really appreciate the quality content!

    • @BrendanGalea
      @BrendanGalea  3 роки тому +1

      Wow you really powered through these! Awesome work, really glad you've enjoyed it!

  • @flocela
    @flocela Місяць тому

    Thanks for the discord link! And the videos!

  • @TADevelopment
    @TADevelopment Рік тому +1

    am I the only one getting weird Errors from Tiny_obj_loader? After defining and importing tinyibjloader, i'm getting 'member initializer 'valid_' does not same a non-static data member or base class, error in Xcode. and won't compile. Not making any sense at all.

  • @semikim1432
    @semikim1432 24 дні тому +1

    Hi, I have been following your tutorial lectures well, but I have a question. I exported the Suzanne (monkey) model from Blender as an OBJ file and rendered it, but it is rendered upside down. The OBJ file you provided renders correctly, but why is this happening? I suspect it is due to the difference between the OpenGL viewport and the Vulkan viewport. How did you solve this issue?

    • @BrendanGalea
      @BrendanGalea  24 дні тому

      I think when exporting there are some settings in blender you can set. Can’t remember off the top of my head though

  • @_general_error
    @_general_error 3 роки тому +2

    Mistake in commentary at 14:30 - If we wanted each face to have a uniform color, we need each vertex 3x not just 2x, because each vertex is used in 3 faces, each with a different color.

    • @BrendanGalea
      @BrendanGalea  3 роки тому +1

      Ya I could have used better wording! By duplicate twice I meant 2 copies + the original for a total of 3. Sorry for the confusion!!

  • @nataestanislaubastos7637
    @nataestanislaubastos7637 3 роки тому +6

    i am trying to optimize a vulkan renderer. Could be nice a profiler tutorial

    • @BrendanGalea
      @BrendanGalea  3 роки тому +2

      Noted! I'll make sure that's added to my list for possible future tutorials!

  • @j4j4j4sn
    @j4j4j4sn 3 роки тому +3

    i tried building in c++20, this, in the PipelineConfigInfo struct:
    PipelineConfigInfo(const PipelineConfigInfo&) = delete;
    wont work now.
    No constructor could take the source type, or constructor overload resolution was ambiguous

    • @BrendanGalea
      @BrendanGalea  3 роки тому +2

      Ya this is a mistake on my part. The struct is missing the default constructor.
      Add
      PipelineConfigInfo() = default;
      And it should work if there aren’t any other errors

    • @j4j4j4sn
      @j4j4j4sn 3 роки тому

      @@BrendanGalea yeah that works, cheers!

  • @telli5868
    @telli5868 6 місяців тому +1

    HI, why are any other obj files rendering upside down for me

  • @gmrzilla
    @gmrzilla 3 роки тому +2

    In the example shown at 2:16, shouldn't the first vertex be the values {-1, -1, 1} since that is the fifth index and the one you highlighted?

  • @pdform
    @pdform 3 роки тому +2

    For uniquely identifying vertices, wouldn't it be more efficient to use the indices in the position, normal, texture and color lists, instead of the Vertex object data? I mean, they are all ints, and you can get away with a simple xor operation for the hash funcion...

    • @BrendanGalea
      @BrendanGalea  3 роки тому +1

      Good suggestion! Ya that would work too, and would probably be a bit faster! But having the equality and hash functionality added to the Vertex struct will be useful for other scenarios, file formats, etc.

  • @PP-ss3zf
    @PP-ss3zf 24 дні тому

    In this video I dont understand how duplicating a vertex position twice will allow for the face to be colored in one color

  • @JohnWakley
    @JohnWakley 3 роки тому +2

    Another great tutorial!!

  • @миииц
    @миииц 2 роки тому +1

    When I saw the name, I thought that you yourself will write the code. That a bit pity, but also thanks for that tut.
    By the way, will it be the same later, but with models that have bones (animations)? As far as I know, they are not stored in obj

  • @joelwakefield3655
    @joelwakefield3655 Рік тому +5

    If anyone else is getting an LNK2019 error - try double checking your #define in the Model.cpp file.
    It should be "#define TINYOBJLOADER_IMPLEMENTATION".
    I wrote "#define TINYOBJECTLOADER_IMPLEMENTATION": a subtle, but very powerful, difference.

    • @trolllord02
      @trolllord02 Рік тому

      Thanks, I made the same error ^^

    • @boltyhunter
      @boltyhunter Рік тому

      had the same encounter! thanks a ton!

    • @Rook1e0ne
      @Rook1e0ne 5 місяців тому

      Man you are a champ.. i watched the video back and forth 2 times and I was still trying to figure out what was wrong!!

  • @alexanderdorenkamp
    @alexanderdorenkamp 2 роки тому +3

    For some reason, after implementing the index stuff. I am still getting "Vertex count:23894" for the amount of vertices
    Edit: I was loading in wrong model, lol. Problem fixed

  • @Leandro_SWR
    @Leandro_SWR Рік тому

    Hey, thank you for this series it's been amazing! :)
    I'm trying to use assimp instead of tinyobjloader. From what I understand assimp already gives me the unique vertices with the correct indices right? No need for the utility class and all the extra work?

  • @ChiYeung-ky9yj
    @ChiYeung-ky9yj Рік тому

    Inspiration for us all.

  • @ParaParaPartyCrow
    @ParaParaPartyCrow 7 місяців тому

    "models/colored_cube.obj" works for me on windows

  • @marcinszymusiak3937
    @marcinszymusiak3937 3 роки тому +3

    Hmm... great that you making video about vulkan - YT need this!
    But really, you don't need to read every single word that you type in, every single move that you do - we see it!

    • @BrendanGalea
      @BrendanGalea  3 роки тому +1

      Noted! Thanks for the honest feedback, I appreciate it :)
      also if you have any examples of yt channels that you think make great coding tutorials, (like ones that flow well, with good delivery, etc) that would also be really helpful!

    • @marcinszymusiak3937
      @marcinszymusiak3937 3 роки тому +1

      ​@@BrendanGalea Check out eg."The Cherno" channel, he also have a series about game dev in c++. He sounds more natural, not like he's reading pre-prepared statements. Of course he making videos for years...
      But to be honest - you making better helper graphics for your videos (which are just great) :).
      So in my opinion you should more taking about why you should do something less what you are actually doing and you should work on your voice intonation (now you're a little too monotonous).
      And again, this what you're doing is very important, so keep doing it. Good luck

    • @axedaddy1
      @axedaddy1 2 роки тому +4

      I think you shouldn't change your style, its great exactly the way it is. Your content and code structure so far are excellent. Additionally I disagree with the comment below about checking out "The Cherno" channel, do yourself a favor and NOT be like that guy.

  • @jonohiggs
    @jonohiggs 3 роки тому +1

    Feels like the model loading should be split out into a separate class

    • @BrendanGalea
      @BrendanGalea  3 роки тому

      Ya that's a good point, would be a nice improvement to make.

  • @stomah9832
    @stomah9832 3 роки тому +5

    please don’t use human readable text when you don’t have to

    • @BrendanGalea
      @BrendanGalea  3 роки тому +2

      is this coming from a robot?
      jk but I know what you mean. I kind of wish I included a section saying why we're starting with this format for now but also going over its many disadvantages.

    • @alexanderstreng4265
      @alexanderstreng4265 3 роки тому

      You can probably do that in another video

  • @binarybotany3218
    @binarybotany3218 2 роки тому +1

    Latest release of tiny_obj_loader leaves out the std::string warn argument from ::loadObj. :)

    • @alexaras5767
      @alexaras5767 6 днів тому

      I know this is a year later, but in case anyone has the same issue it's not missing, he was just using v2.0-rc1 instead of the latest stable release.