Announcement

Collapse
No announcement yet.

The new glTF import supported in 4.19 preview is awesome. [Experimentation]

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    The new glTF import supported in 4.19 preview is awesome. [Experimentation]

    Click image for larger version

Name:	Capture.JPG
Views:	2
Size:	186.8 KB
ID:	1415588
    glTF is a new format, created by khronos (openGl, openCL, collada, others), designed to share game assets and scenes beetween engines. Mostly designed as a webGL exchange format, it turns out is quite good for normal assets.

    UE4.19 preview has a experimental importer for it, and right now its extremelly promising. This is an open format, that, once final, should work better than FBX, and actually work great with Blender.

    I went to test the 4.19 preview and started doing a few experiments with it. Right now its much superior to FBX for some simple cases.
    The cool point about glTF is that the same file holds a full scene, with multiple 3d objects, each of them with animation, and each of them with materials, and each material actually imports as a material graph, and with textures.

    This means that glTF is one click import and it setups every single mesh in your scene with correct materials and textures, from one file This allows you to setup your game assets in blender, with a blender material graph and textures, and import it directly into ue4, with everything getting translated.

    This gif shows the workflow:






    My tests have resulted in this:

    Basic static mesh support works. Skeletal meshes and animations are not supported yet.
    Each of the objects in the scene will become a single static mesh in unreal. This is good for a modular pack, but very bad for complex multiobject files. An option to merge objects would be great (like in FBX import). This fails spectacularly if you try to import one of the complex models from https://sketchfab.com/features/gltf , like the unity robot model (he imports as a ton of tiny objects) The same happens with the drone mode;.


    Interestingly enough, Blender export works by default, without any setup. There are no more scale ******** to deal with as with FBX, and also it will use the correct axis by default, so no flipped models or badly scaled models. Great improvement over FBX. It "Just Works"


    All objects in the scene will import as static meshes, with their scale and position reset. If you have any scale or position at "object" level in blender, when importing into unreal this will be reset. An option to apply the scale/position would be great, but working around it is absolutely trivial.
    Smooth groups export perfectly by default, exactly as they are with blender (no more import normals or not as with FBX). Another great improvement over FBX

    Whole scenes cant be imported well, as every object will just become a separated static mesh centered at origin, but without the "scene hierarchy". The importer having the option to create a blueprint that holds the scene information would be a huge plus, and would allow one to create a whole scene in blender and import it as 1 object into ue4.

    The material/texture import is a lot better than i expected, and its what makes this a superior format and workflow over FBX (for static meshes) right now. A blender cycles node tree will get completely translated to UE4, as long as it follows the roughness/metallic workflow. The fact that the importer already supports textures and recreates the material is awesome.

    The one that benefits the most from this is Blender, as FBX support has allways been terrible, but gltf already works well. Once Blender 2.8 releases, you will be able to author your meshes from it, using the PBR viewport, and then export the file to UE4 and it will keep all the material setup, looking similar.

    If unreal also adds glTF export, you would be able to extract any game asset in unreal, and import it into blender for use in a cinematic or a render with the pathtracer. With all the materials being compatible.
    Attached Files
    Last edited by vblanco; 01-19-2018, 10:54 AM.
    UDK and UE4 programmer and Unreal engine 4 betatester. Currently working on commercial VR games for PSVR.
    Deep knowlegde of C++ and blueprints. Open to freelance work.
    Games released, Deathwave(Steam), VRMultigames(Steam), DWVR(Steam,Oculus,PSVR):
    http://store.steampowered.com/app/463870
    http://store.steampowered.com/app/500360
    http://store.steampowered.com/app/520750

    #2
    AFAIK there is no support for skeletal meshes and animation in glTF.

    On top of that Blender 2.8 will not be production ready for some loooong time. So full support for mesh/skel/anims in Blender 2.79 is a must have thing and that's not going to happen afaik.

    Comment


      #3
      Originally posted by motorsep View Post
      AFAIK there is no support for skeletal meshes and animation in glTF.

      On top of that Blender 2.8 will not be production ready for some loooong time. So full support for mesh/skel/anims in Blender 2.79 is a must have thing and that's not going to happen afaik.
      glTF does support skeletal animation, in fact its designed precisely to work with game engines, with different animations separated, and a bone system like the one in game engines. One of the gltf demos in sketchfab comes with animation. Once unreal adds skeletal support and a way to import scenes as a blueprint (to keep scene hierarchy/setup), the format willl make FBX obsolete.
      UDK and UE4 programmer and Unreal engine 4 betatester. Currently working on commercial VR games for PSVR.
      Deep knowlegde of C++ and blueprints. Open to freelance work.
      Games released, Deathwave(Steam), VRMultigames(Steam), DWVR(Steam,Oculus,PSVR):
      http://store.steampowered.com/app/463870
      http://store.steampowered.com/app/500360
      http://store.steampowered.com/app/520750

      Comment


        #4
        If the importer could generate the maps automatically sent to specific project folders then this would be perfection.
        | Finite State Machine | Auto-Save Plugin | USQLite Plugin | Object-Pool Plugin | Sound-Occlusion Plugin | Anti-Cheat Plugin | Property Transfer Tool |

        Comment


          #5
          Originally posted by vblanco View Post
          UE4.19 preview has a experimental importer for it, and right now its extremelly promising. This is an open format, that, once final, should work better than FBX, and actually work great with Blender.
          Thanks vblanco for taking the new glTF importer for a spin! This sort of feedback is really valuable. We'll continue to improve the plugin during UE4.19's lifetime and I hope to do some bigger enhancements for 4.20 and beyond.

          The initial design goals were focused on someone creating assets specifically for games, who has control over their DCC application and pipeline. Supporting glTF files from external sources (Sketchfab, freelancers, etc.) is also important, and makes import flexibility/options more important.

          The current plugin is geared toward one object per file, or multiple independent objects per file -- an asset "pack" like you said. One file containing a composite object would be a good next step. Importing a whole scene is a much bigger step, but we'll get there.

          I'm just getting into animation, and have not started implementing bones, skins, morph targets, etc. So the Skeletal Mesh pipeline will come later & I'm hoping it will be as painless as today's Static Mesh support.

          The one that benefits the most from this is Blender, as FBX support has allways been terrible, but gltf already works well. Once Blender 2.8 releases, you will be able to author your meshes from it, using the PBR viewport, and then export the file to UE4 and it will keep all the material setup, looking similar.
          BTW: Blender's Eevee renderer was designed from the beginning to be compatible with Unreal's material & lighting system. The long-term plan is for glTF to provide a clear path between these.

          If unreal also adds glTF export, you would be able to extract any game asset in unreal, and import it into blender for use in a cinematic or a render with the pathtracer. With all the materials being compatible.
          Good point! So far I've been thinking mostly about how to get things into UE4. The hardest thing about export would be materials, since glTF uses texture maps or single values for material inputs, not a general node graph. Still, this would be good to have after glTF import is in better shape!

          Comment


            #6
            Great write-up and feedback. Really excited to see the first iteration of the importer already works that well. Awesome job by Epic!

            Also glad to see the feedback is being listened to. As a Blender user myself, I can't wait to have a fully functional asset pipeline for using Blender, the Substance Package and Unreal Engine via glTF.
            Last edited by zaha; 02-02-2018, 09:13 AM.

            Comment


              #7
              Thank you Epic for glTF support!

              Super happy that this is a thing in 4.19


              Comment


                #8
                I'm really looking forward to this as this format once fully supported is far superior than anything that is out there right now. Thank you Epic for looking into it.

                Comment


                  #9
                  Works great with Substance Painter, seems like it would help keep things organized and speed up jumping between applications.

                  Comment


                    #10
                    vblanco When you say roughness/metallic workflow, do you mean the new Principled BSDF node? This sounds really great and it's the first time I've heard of glTF. My interest is thoroughly piqued.

                    Comment


                      #11
                      Well well, i'm gonna step up my Blender game then ..
                      LinkedIn | Atmosphere Modelisation | Nvidia GameWorks builds - 4.19.2 : VXGI2.0, Blast, HairWorks, Flow - Plugins: VictoryBP | 4.17.2 | 4.16.2 | 4.15.3 | 4.14.3

                      Comment


                        #12
                        This is awesome, looking forward to animations and armatures working as well as imported static meshes.

                        Comment


                          #13
                          We are very much looking forward to getting rid of FBX. What is the timeline for this to move out of the experimental phase?

                          Originally posted by DangerCobraM View Post
                          The current plugin is geared toward one object per file, or multiple independent objects per file -- an asset "pack" like you said. One file containing a composite object would be a good next step. Importing a whole scene is a much bigger step, but we'll get there.
                          Hopefully you will work with the Datasmith team to support full CAD assemblies in glTF.
                          Last edited by roberteker; 03-28-2018, 03:43 AM.

                          Comment


                            #14
                            @DangerCobraM

                            Since glTF format specs have no support for LOD groups, would it be possible for you to add an option to import LODs from separate glTF files using specific file name convention?

                            Comment


                              #15
                              You also can try to use my plugin to import gltf - [glTF for UE4](https://c4gio.itch.io/gltf-for-ue4).
                              It is free and has a lot of features, visits [this roadmap](https://trello.com/b/omtMIw06/gltf-for-ue4).
                              Import all meshes in gltf file into UE4. https://github.com/code4game/glTFForUE4
                              Last edited by c4g.io; 04-08-2018, 09:34 PM.

                              Comment

                              Working...
                              X