Exporting 3D Models to Godot 4 | GlTF settings

Поделиться
HTML-код
  • Опубликовано: 19 ноя 2024

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

  • @octodemy
    @octodemy  27 дней назад

    Since Godot 4.3, you can now import '.fbx' files natively. There is no need for an external importer anymore.

    • @RaViNsongGuY
      @RaViNsongGuY 14 дней назад

      Shall I do .glb or .fbx files now then? My .glb files seem to be twice the file size than my .fbx files.

  • @maro6477
    @maro6477 7 месяцев назад +3

    Short and to the point! Amazing tutorial keep up the good work!

    • @octodemy
      @octodemy  7 месяцев назад

      Thanks. Really glad you liked it :)

  • @zeddlegion
    @zeddlegion 9 месяцев назад +4

    Wow that was so much information that I never heard before. I can’t wait to get off work to pay more attention 😊

    • @octodemy
      @octodemy  9 месяцев назад +1

      Glad to hear that. Hope you find it useful.

  • @antonlytvynenko
    @antonlytvynenko 8 месяцев назад +2

    thank you hugely good sir, best of luck with all your projects

  • @tjspeirs75
    @tjspeirs75 9 месяцев назад +2

    okay just from watching this at 1.5x speed at work, this seems like a brilliant video?? like this is so much great info! and it seems really easy with godot? I don't even have models to import but I just want to try just to see it work lol Thanks for the vid!

    • @octodemy
      @octodemy  9 месяцев назад +1

      Very nice to hear that :) thanks.

  • @MimounX
    @MimounX Год назад +2

    Great video
    I'm creating an asset pack for Godot. Is it advisable to extract the collision and the model, like 'model_colonly'? Or is it not necessary?

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

      Nice :)
      I'd say it depends. I personally only like using Godot's automatic collisions on terrain.
      I much prefer creating an inherited scene with simple, basic primitives collision. It takes more time having to manually do that, and its more imprecise but I think its usually good enough for games and it more performant.
      So I don't think is is necessary for an asset pack to have it inside the gltf file.
      But that's only me, I recommend you check out some free assets packs and see if any of them did this. The couple of asset packs I used (Kenny's and iPoly3D) didn't have it. (But they were not Godot exclusive assets, so there's that)

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

      @@octodemy
      Thank you this was very helpful

  • @Torbulous
    @Torbulous 3 месяца назад +1

    I have problems with the gltf format. After exporting a modeling using gltf, it will create splits on my models. Those splits are usually caused be separate islands when UV unwrapping. So if there's a part of a model that has a separate island on the UV unwrap, there will be a split in the model.
    This is noticeable with a model that's skinned to an armature. As the model bends, sharp edges reveal itself. It will most likely also be noticeable with vertex shaders. I tried looking for a solution, but all I'm finding is why it's happening and not really a way to stop it, other than not creating seams lol.
    It's frustrating as an artist. Do you have a way to keep this from happening?

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

      Does it work in Godot when you export in fbx?
      You could also try some things.
      Inside the gltf exporter options. Make sure apply modifiers is ticked.
      And inside the Geometry. Make sure 'Tangents' is turned on.
      Take a look at the armature and animation sections to see if anything you might need stands out.
      It could also be a problem with the compression in the Godot importer. You can try to select 'Force disable compression' to see if that is the case.
      It might also be a problem with blenders exporter.
      I've seen a bug report that blender was messing the normals if you had unapplied mirror modfiers. Even with the 'apply modifiers' option selected.
      Here: forum.godotengine.org/t/gltf-imports-differ-greatly-from-blender-uv-and-normals/53024
      But again, I'm not sure what your problem is. Try to see if one of those things work and try to figure out what is causing the issue. Is it the model's mesh, blender exporter or godot's importer.
      One of the things of gltf is that it is always triangulated. Sometimes your mesh might have bad/impossible quads, and that is why the appearance changes when you triangulate the mesh.

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

      @@octodemy
      EDIT: before you waste your time reading, I think I figured it out.
      EDIT x 2: ......Yeah I think I found the issue... I'll post it in a new reply.
      Hey thanks for the response!
      I haven't tried yet with an FBX file but it does work correctly in Unreal using an FBX. I've tried figuring out this issue before and went through the export settings, but I've also gone over them again just now. Following the stuff you've mentioned. Nothing seems to work. I'm not finding the option "force disable compression" but I do see a compression tick. Tried with it off and on and even changed some of the compression settings.
      I always apply modifiers and transforms before I export a model. It's not really an animation problem either. Nor is it an issue with the normals. It's just that there are actual cuts being created on the mesh. If I re import into blender, I can move the vertices apart.
      I did try triangulating (is that a word? lol) every quad. Didn't fix the issue. I also make my own models so I know everything about them. This might be happening with your models too without noticing. I didn't really notice at first till something looked off and I figured out what was going on.

    • @Torbulous
      @Torbulous 3 месяца назад +1

      So I found the issue... but I could have sworn I tested this before... I guess not...
      So it must be Blender's importer... not exporter. The issue showed in Godot too because I import my work into a clean blender file to keep animations and stuff organized. So I thought my model was just breaking when exporting... especially because I thought I tested this.
      Really dumb oversight on my part. My bad.

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

      Nice! Really glad to hear that.
      Btw, about the faces being disconnected. I've seen this before, and as it turns out, that is the expected behavior of gltf.
      Besides making all the faces triangles, it also makes them all individual disconnected triangles. It has something to do with GPU rendering optimization, so that is actually normal.
      GLTFs are not made to be imported into blender because they are very destructive of the original result. They are optimized to be rendered.
      So I guess when you imported into blender and used it again, Godot did a second export to gltf that broke everything because the triangles were not connected and gave you that problem.
      But its great that you figure things out.

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

      @@octodemy Yeah, the models being optimized for gpu rendering is what I read as well. Not every tri was split though. Only the ones that had a separation on the UV map. I hope it is actually solved and I'm not running into some weird fluke, lol. Going to have to keep an eye on my models. I spend a lot of time making bends and normals look right so having stuff like that is incredibly frustrating, haha.

  • @tgirlshark
    @tgirlshark 7 месяцев назад +1

    I use embedded gltf cuz it makes the workflow easier and considering godot will remap these files into their own structures it's prefectly fine to use

    • @octodemy
      @octodemy  7 месяцев назад +1

      Honestly, me too. I just change the option to not extract the textures and pollute the filesystem with a copy.
      I only use un-embeded gltfs with external shared materials when too many objects share the same texture atlas or trim sheets.
      But you are right. Even if you used embeded gltf's, as long as you setup the external shared materials, you'd still get the same performance benefits in the end.

    • @tgirlshark
      @tgirlshark 7 месяцев назад +1

      @@octodemyyup it's pretty cool ^-^

  • @飞风
    @飞风 9 дней назад

    Why is my built-in material model overwritten after adding a shader effect?

  • @MeshVoid
    @MeshVoid 9 месяцев назад +1

    Why glb and gltf is imported as a separate scene file and have that root node? I really want original geometry's MeshInstance3d node to be the root node and have editable material tab, instead of always having to reimport asset and editing custom material path. This is not user friendly, why did they decide to dumbify exporting assets...

    • @octodemy
      @octodemy  9 месяцев назад +2

      I also hate that. It feels very clunky and takes a lot of useless time. But it is the only way unfortunately.
      If you 3D object is a single mesh, you can export it as a .obj and it'll be imported as a single MeshInstance3D. I also don't know why they don't allow it for gltf when its a single mesh. There was an issue with people complaining about this issue but it was reject so I don't think this is likely to change anytime soon.
      My main gripe is that you can't change the scene structure after importing them, which is a problem that I often encounter. And I'm not a fan of using the "Make local" option because it essentially copies the mesh to that file, bloating your game and making it less optimized as that is now essentially a different mesh than the original.
      The other alternative you have is exporting the mesh from the gltf. In the same menu as the export material, there is a export mesh option which will export the .mesh files to the project, and you can create your own meshInstance3D and set that mesh file. That allows you to build that object any way you want to but it is very slow and tedious to do so. Its a nice option to have when you want to make more specific object changes but otherwise it takes too much time to setup.
      The last thing you try is making an import script.
      These are script that run when you IMPORT and click on the REIMPORT button.
      You could make an import script that sets the root node as a meshInstance3D if it is a single mesh. I think that would work but I need to test it to see if it is really possible.

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

    Great video, thank you! What is the downside of choosing glTF? Your current method is optimal because it eliminates duplicated materials, correct?

    • @octodemy
      @octodemy  10 месяцев назад

      There is no real downside of using glTF. It is the recommended and most supported method of 3D model import.
      There were a few limitations before, but they are being fixed as godot updates. For example: glTF emission materials import are only available from Godot 4.2+.
      Also, glTF should load faster than even .fbx. And it seems its become the standard for VR applications in a multitude of engines.
      And yeah, using the same external material eliminates duplicated materials and should come with a slight performance boost because of that :)

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

    Muchas gracias!! esto me servirá luego

  • @tabsterg
    @tabsterg 2 месяца назад

    after I create a new inherited scene it *doesn't* let me edit material properies :(
    I have a different project where I imported a character and I *CAN* edit materials, but for some reason I can't replicate that level of control even when I create an inherited scene like godot tells me to. When I open it in the editor it says _"this object is read-only"_

    • @octodemy
      @octodemy  2 месяца назад

      That is one point in that Godot is a bit frustrating. But there are a few ways around it. From simple to complicated ones.
      -
      Btw, in your other project where you CAN edit the material is probably because you at some point made the nodes LOCAL.
      You'll probably notice they are NOT 'yellow' colored (yellow means they are inherited).
      In older versions of Godot, if you tried to change the root node type of an inherited scene, it would convert the whole scene to local. (I think they fixed this behavior in 4.3 now)
      -
      While making things local can look easier, there are a lot of problems with it.
      They won't update if you change the original mesh, and if you make an image local, you might slowdown you editor by quite a bit when saving.
      -
      The recommended way to edit a material is to just copy it and paste it inside the override material slot. That's what it is for.
      Open the Instance3DNode mesh -> surface -> rclick and copy the material.
      Then rclick the override material and paste it. Now you can edit that material.
      -
      Another very common way, is to select extract materials when importing your models.
      It'll extract a '.tres' external material that is used in the models. I think I do this at some point in this video.
      So you can change material and it'll affect the inherited model.
      -
      Another way, is to make an import script that you can tell Godot exactly what node it creates when you import a scene. I have a brief video in the channel about that.

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

    Awesome Video! But i have a problem, i exported it exactly as shown in the video, but my mesh doesn't deform. I see the skeleton moving, and in blender it also deforms the mesh. What could be the problem?

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

      You could try a couple of things.
      1- Make sure Data->Mesh->Apply modifiers is on. I'm not sure if that affects it, but as the armature in blender is a modifier, you might need it.
      2- You could try enable Data->Skinning->"Include all bone influences". This will export more than 4 influences per bone. Godot supports till 8 influences. If you have a lot of bones close together affecting your mesh, this might solve some issues.
      3- I saw an old post saying if you have a world space vertex shader it could mess up the animation, so make sure the animation is working on the default shader first.
      4- Try Godot 4.1, there was a bug in older versions with some imported skeleton meshes.
      5- In the mesh import settings. Disable the "Generate LOD". This can cause some problems deforming meshes. There is an open bug report (github.com/godotengine/godot/issues/84479)
      Lastly, what is the Godot version you are using and check the console for errors if there are any. This could help find out what the problem.

  • @lemonworm
    @lemonworm 27 дней назад +1

    Is therw any way to speed up the material override process? For example, I have a ton of props to upload that are using materials that I've already set up in godot. Each prop has like 7 material slots and its incredibly annoying having ro do surface material override, then navigate to the correct material, for every single slot on every single prop. I thought maybe if I made my material slots named the same as my godot materials it might be able to find them automatically but no 😭 is there any way at all to speed this up or am I just gonna have to grit my teeth through the carpal tunnel

    • @octodemy
      @octodemy  27 дней назад

      There is! Also, quite relatable... Godot importing pipeline is a bit painful at times.
      But Godot has a way to deal with that. You can create import script to tell Godot how to treat your imported files.
      I have a video named "Change how your 3D MODELS are imported" that explains a bit about that. ruclips.net/video/mmZ11qSGD3k/видео.html
      And I one of the examples I showed is exactly about how to automate the material override of multiple models ( 1-45 timestamp )

  • @stabbedbyapanda
    @stabbedbyapanda 5 месяцев назад +1

    Ty

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

    Hey! Liked your tutorial.I had a question I am trying to import 3D car which are available online from 3dfree assets everything seems pretty good in blender all shaders are good but when i import it to godot it is pure white and no textures or shaders . the model is pretty complex its an buggati 2017 model please help

    • @octodemy
      @octodemy  4 месяца назад +1

      I checked out that model.... It seems it uses a mix shader that blends two blender shaders together.
      That means the exporter can't convert it to a format other programs can understand. Not only godot.
      The .mtl file accompanying the .obj file given can kinda give you some colors. But they are the ugly flat viewport colors only and they are very different from the original.
      To get results similar to blender, you'd have to either bake the result shader image of all shaders or make an import script to parse those blender shaders into a godot equivalent custom shader.
      Both cases are fairly complex.

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

      ​​@@octodemyThank you for reply. I was struggling really hard to setup those models since I came from unity to godot I have to find assets for my game since unity had large asset store but godot is pretty new, I think I will stick to unity or use game ready with godot. What's your suggestion.I more question that is every asset on that website has the same problem?? I tried some other simple models but same problem such as Mjolnir, Toon girl, Audi R8, some houses, the only model seems to work is the cottage house which is marked game ready. once again thanks for the help

  • @EmulateUser
    @EmulateUser Месяц назад

    I am receiving an error on my models saying "KHR_materials_Speculare" is not supported. Anyone know how to fix this?

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

    I change the material path to the extracted material, then I try and delete the textures, it gives me an error that the it can't find the orig texture and it cant load the material variant... I clearly missed something here lol

    • @randomjimbitz512
      @randomjimbitz512 Месяц назад

      annnnd to reply to myself here and see it helps anyone else... you have to keep the original texture that you created the material from as well as the material. I incorrectly thought you could delete all the textures... However that is not the case.
      For super noobs like me... you keep all the original things from where you extracted the material and then you can delete all subsequent textures and materials as laid out in the video. Hope this helps someone. :D

    • @octodemy
      @octodemy  Месяц назад

      Yes, extracting the material just create a material asset that you can externally edit.
      But that material still uses a reference to the original texture extracted from the model.
      So its like you said, you still need to keep the texture from where you extracted the material, and can delete the subsequent others.

    • @randomjimbitz512
      @randomjimbitz512 Месяц назад

      @@octodemy do you have issues with color banding with objects that use the shared material?
      All the objects that I add the shared material to now have color banding... they are fine with their own extracted textures, but when I switch to the shared material the object has the banding...
      appreciate your work btw :D

    • @octodemy
      @octodemy  Месяц назад

      @randomjimbitz512
      The color banding is probably due to the compression mode and the mipmap generation.
      To fix this you can select the texture and go to the import tab.
      There you can change the Compress Mode from VRAM Compressed to something else.
      You can also disable mipmaps there if you want to make sure the texture is at full quality all the time.
      There is also an option at the end named 'Detect 3D Compress to: " that overrides the compression mode if it detectes the texture is being used for 3D.
      Then make sure to hit Reimport.
      There is also a project setting in "Rendering->Antialiasing->Use debanding". This can remove the color banding from the whole screen.
      This option is useful if you are getting color banding in the light and shadows of your game.
      The strange thing is that it only happened to you on the extracted material, and not with the material inside the imported object.
      Might be some bug.

  • @NoName-rv3vb
    @NoName-rv3vb 4 месяца назад

    unknown format of the requested file gltf. How can I solve this problem ? please help me

    • @octodemy
      @octodemy  4 месяца назад +1

      This is a problem when you try to save a gltf/glb within the Godot editor right?
      If you need to make change to the models within Godot, make sure you right click them and create a new inherited scene. So you can make changes and save them.

    • @ЭдуардБеженов-д3ь
      @ЭдуардБеженов-д3ь 4 месяца назад

      ​@@octodemyYes, I just found a solution, thank you. I understand that if we create a new scene, we will not be able to delete the previous gltf, or if we make it local, will we be able to? I apologize in advance for my English, it's not my native language, maybe the translator translated something wrong

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

      Yes, even if you make an inherited scene from the gltf model, you still need to keep the original gltf.
      The inherited scene is only applying modifications to it. It still uses the meshes that are inside the gltf file.
      If you make it local and save it to a new scene, then it becomes its own file and it is not linked to the original anymore.
      But that is very bad. When you make a mesh node 'local' it actually saves the mesh data inside the scene in plain text.
      This usually makes the files 3-5x larger
      It can have HEAVY performance impacts when editing the game from the editor.
      So I would never use 'make local' with meshes for any big project.
      You can also save the meshes as resource files outside of the gltf and use that instead.
      But that is a bit complicated to explain here.

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

    crashing when importing glb file :'(

  • @ভোমরা
    @ভোমরা 8 месяцев назад +3

    Godot

  • @dragneeladhoo6023
    @dragneeladhoo6023 6 месяцев назад +1

    rename he light? Just export selected only! plain and simple!

    • @octodemy
      @octodemy  6 месяцев назад

      Yea, I always do that.
      Just thought I would mention it to know that it exists.
      I've known some people that like to use .blend files directly. Specially for prototyping. So there's that use-case.

  • @Alexander-mk4qf
    @Alexander-mk4qf Год назад +10

    Gltf are future of gamedev, fbx is dead

    • @octodemy
      @octodemy  Год назад +3

      After first finding out about, I'm also starting to have the same opinion :)
      It seems gltf is already being used as the standard for VR and AR, as well as various web apps.
      From what I hear, it is faster the fbx, and being an open-source and active project means it still has room to grow in the future.