How-To Texture Wavefront (.obj) Models for OpenGL | C++ | learnopengl.com | Assimp | Blender 2.8

Поделиться
HTML-код
  • Опубликовано: 5 сен 2024
  • Please leave your feedback or questions in the comments!
    References -
    blender: www.blender.org/
    learnopengl: learnopengl.com/
    assimp: www.assimp.org/
    Find me, support me:
    Stream: / overridetheprogram
    Patreon: / codetechtuts
    One time donations: www.paypal.com...
    Shop via my Amazon Affiliates Link: amzn.to/3bVQ9X0
    Business inquiries: codetechtuts@gmail.com
    Thanks for coming to the channel to check out a video on Code, Tech, and Tutorials.

Комментарии • 29

  • @9Drok6
    @9Drok6 Месяц назад +1

    You can actually set "Path Mode" to "copy" in the export dialog. Blender then copies all textures to the same folder as the .obj file and uses relative paths in the .stl file. This is exactly the behaviour needed for the model loader described in the learn OpenGL tutorials.

  • @rachelveer7574
    @rachelveer7574 5 лет назад +9

    You saved my life on this one, everyone seems so confused in the comments of that learnopengl part and for good reason. I really couldn't figure out myself too but now I can load a fully textured car. :)

  • @rosshoyt2030
    @rosshoyt2030 4 года назад +1

    Great, great video. I'm excited to use this material. subscribing!

  • @rosshoyt2030
    @rosshoyt2030 4 года назад +4

    By the way, you can't see the mouse in the video, would be helpful if your screen recorder also got your mouse movement!

  • @yuliansyahibr
    @yuliansyahibr 4 года назад +2

    Great tutorial! Thank you

  • @joelincz8314
    @joelincz8314 Год назад +1

    Thanks, I was able to load my low poly world but it's all grey (a bit shiny). I am going to look into this next. Did you ever do the animation video you spoke of at the end of this video?

  • @realmarsastro
    @realmarsastro 5 месяцев назад

    When I do this the textures come out all wrong. Their coordinates are wrong, and the specular map is enitirely fucked up. Not sure what I'm doing wrong.

  • @nspattak1
    @nspattak1 2 года назад

    Hi, interesting video but I still cant export models. i tried several models I downloaded using sketchfab's blender plugin and the material path in the file i edit point to blender's temp dir instead of the export directory. Anyone had this error?

  • @mounirbalir5631
    @mounirbalir5631 10 месяцев назад +1

    but what should we do in case there is no
    texture ?

    • @nikoszervo
      @nikoszervo 4 месяца назад

      What I did inside the fragment shader, I defined a Material structure with the following members: diffuse0, diffuse1, diffuse2, diffuse3, specular0, specular1, specular2, specular3, numOfDiffuse, numOfSpecular. The last two tell me exactly how many diffuse or specular maps I have set from the Mesh::Draw(). For example if numOfDiffuse = 2, then diffuse0, diffuse1 are the set diffuse uniforms (I always set them in order from 0 - 3, the same for speculars). If numOfDiffuse = 0, I know I don't have set any diffuse maps, so I'm using a grey color for the fragments output. In the model loading processMesh() method, if there are no textures at all, just pass an empty std::vector into the Mesh constructor, and inside your Mesh::Draw() if this vector is empty, just set the uniforms numOfDiffuse = 0 and numOfSpecular = 0 and leave the diffuse and specular maps unset.

  • @AmoghSrivastava
    @AmoghSrivastava 3 года назад

    I'm followng a similar thing but my textures are all over the place. They are not mapped properly. I have the exact OBJ export properties too.

    • @CodeTechandTutorials
      @CodeTechandTutorials  3 года назад

      One thing I do when it doesn't seem to be loading correctly is check it in another engine like unity, unreal, or godot and see if it loads correctly there. If it does, it might be your import code or shaders or something rather than the model. Good luck!

  • @hanlovciss2944
    @hanlovciss2944 4 года назад

    Thanks a lot. If i duplicate this object in blender in the world coordinate, do this generate a mchildren[] node with mMeshes[] and mTransformation[] ? Model class from learnopengl seems not supporting mTransformation?

    • @CodeTechandTutorials
      @CodeTechandTutorials  4 года назад

      Yes, that is one of things that hung me for a while. The loader from learnopengl is very basic and doesn't do many things that will be needed later, like animations and probably that duplicate feature.

  • @ethanandrewkiocho7264
    @ethanandrewkiocho7264 2 года назад

    how can i use wavefront

  • @obitouchiha-fl7od
    @obitouchiha-fl7od 2 года назад

    I am following learnopengl too but it takes forever to load model it don't even load program freezes

    • @nspattak1
      @nspattak1 2 года назад

      debug builds of assimp are significantly slower than release builds, are you sure that if you wait long enough it will not load?

    • @obitouchiha-fl7od
      @obitouchiha-fl7od 2 года назад +2

      @@nspattak1it was not a build issue i got what was wrong ,i was loading all textures of the model even if it was loaded previously that was slowing the program.

  • @zoeherriot
    @zoeherriot Год назад

    So of course... the circle is now to the left of it.... jesus.

  • @Layarion
    @Layarion 2 года назад

    The lack of a cursor makes this hard to follow at some points.

  • @MrMariozzz78
    @MrMariozzz78 3 месяца назад

    i have trouble with import model with this file and about assimp:: importer.h

  • @mzsov
    @mzsov 8 месяцев назад

    The quality of this video is just bad. Trying to see where your mouse cursor is clicking in Blender is really hurting my eyes.