March 28, 2024, 23:35
bigger smaller reset     1020px Wide width Full width Reset   * *

Gildor's Forums

  Homepage Facebook Read news on Twitter Youtube channel Github page
Welcome, Guest. Please login or register.
Did you miss your activation email?

« previous next »
Print
Author Topic: glTF 2.0 export  (Read 8581 times)
Gildor
Administrator
Hero Member
*****
Posts: 7978



View Profile WWW
« on: July 27, 2018, 17:37 »

Hi guys.

Today I'm going to announce glTF 2.0 export in UModel. In this thread I'll inform about progress in this area.

What's working now:
- Added "-gltf" command line option which activates glTF export.
- Alternatively you may select mesh format in "Options" window.
- Only StaticMesh is supported at the moment.
- Materials aren't exported at all, only some "dummies" are created in glTF file.
- There could be issues with mesh tangents, however they didn't appear in any software I use. I've tested with couple of WebGL viewers and with Blender. Also I've successfully imported a mesh into UE4.20 using built-in glTF importer plugin.
- Be careful with recreating materials by hands: glTF specification assumes that normal maps goes in format which differs from used by UE4 (OpenGL vs DirectX normal map format. In my tests I've flipped green channel in Paint.NET, and things worked well.

For Blender I used this plugin: https://github.com/julienduroure/gltf2-blender-importer

More stuff coming later.
Logged
Juso3D
Moderator
Hero Member
*****
Posts: 910


Welcome to Gildor Forums


View Profile
« Reply #1 on: July 27, 2018, 21:27 »

Very nice!
Logged

Blender + Linux User Here.
Gildor
Administrator
Hero Member
*****
Posts: 7978



View Profile WWW
« Reply #2 on: August 01, 2018, 20:33 »

Added SkeletalMesh export.
Logged
venturion
Jr. Member
**
Posts: 77


View Profile
« Reply #3 on: August 05, 2018, 06:19 »

Just a fair warning that the skinweights are broken when imported due to Blender's gltf importer which is still in experimental stage. It works but not as intended.
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7978



View Profile WWW
« Reply #4 on: August 05, 2018, 09:20 »

Which plugin did you use for Blender? Did you see which one I used in the first post?
Logged
venturion
Jr. Member
**
Posts: 77


View Profile
« Reply #5 on: August 05, 2018, 10:55 »

Yep, I used the one that you used in the first post.
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7978



View Profile WWW
« Reply #6 on: August 05, 2018, 11:01 »

Give me the mesh please (upk, uasset etc - NOT .gltf)
Logged
venturion
Jr. Member
**
Posts: 77


View Profile
« Reply #7 on: August 05, 2018, 11:27 »

https://cdn.discordapp.com/attachments/473670616034181131/475565476966170624/SKM_AF_BODY_038_010.7z
Logged
Juso3D
Moderator
Hero Member
*****
Posts: 910


Welcome to Gildor Forums


View Profile
« Reply #8 on: August 05, 2018, 13:53 »

I prefer the gLTF importer for blender from kson, imports mesh into current scene, keeps smoothing groups, and support skeletons/animations (not sure on animations haven't tested yet, also  think rotation of bones is off maybe?) and has the gLTF Metal/Roughness material node.

Kson (Github Link)


julienduroure
« Last Edit: August 05, 2018, 14:01 by Blenux » Logged

Blender + Linux User Here.
Gildor
Administrator
Hero Member
*****
Posts: 7978



View Profile WWW
« Reply #9 on: August 05, 2018, 14:29 »

There's a real bug in UModel with skeleton, it is rotated 180 degrees for provided mesh. I've fixed the bug, skeleton appears correctly. However, vertex groups aren't assigned well for that mesh - they're random, it could be seen in "Weight Paint" mode.

I've tried another importer ("Kson"). After import, I can't find "pose mode", and trying to use "Weight paint" shows me that weights aren't assigned at all. I'm absolute zero in Blender (it took 2 hours for me to start working with previous plugin, with my friend's help!) - so probably I'm doing something wrong? I worked in 3ds Max and Maya before, with no needs to check for any tutorials, but Blender appears to me like it was created by aliens.
Logged
Juso3D
Moderator
Hero Member
*****
Posts: 910


Welcome to Gildor Forums


View Profile
« Reply #10 on: August 05, 2018, 14:50 »

There's a real bug in UModel with skeleton, it is rotated 180 degrees for provided mesh. I've fixed the bug, skeleton appears correctly. However, vertex groups aren't assigned well for that mesh - they're random, it could be seen in "Weight Paint" mode.

I've tried another importer ("Kson"). After import, I can't find "pose mode", and trying to use "Weight paint" shows me that weights aren't assigned at all. I'm absolute zero in Blender (it took 2 hours for me to start working with previous plugin, with my friend's help!) - so probably I'm doing something wrong? I worked in 3ds Max and Maya before, with no needs to check for any tutorials, but Blender appears to me like it was created by aliens.



or

CTRL+TAB to enter pose mode with blender default settings, had a test also and yeah unfortunately kson importer doesn't do keep inport vertex groups for the mesh, animation works fine itself after exporting a PSK/PSA to gLTF though.

And yeah Blender's UI does take a bit to learn, I've been using it for a while now and now know my way around it to a point, though I am using a few add-ons that make it a-bit more streamlined and pie menu's and that makes it similar experience to maya pop menu's, there is also a folk of Blender called BforArtists that makes the UI more easier for new people.
Logged

Blender + Linux User Here.
Gildor
Administrator
Hero Member
*****
Posts: 7978



View Profile WWW
« Reply #11 on: August 05, 2018, 14:55 »

"Pose mode" doesn't appear to me at all, when I'm importing with "Kson" addon. When I'm selecting "Scene root", only "Object mode" is available. When I'm selecting the node under "Scene root" - mesh node, then it has everything except "pose mode". Moving armature with gizmos doesn't affect the mesh, like if skeleton is not bound to the mesh.
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7978



View Profile WWW
« Reply #12 on: August 05, 2018, 15:00 »

I'd love to test a mesh somewhere else, to check how rig works - before I've added animation support. But I wasn't able to find anything else where I could move bones to test weights. "Babylon.js" has possibility to visualize skeleton, but no way to check assignment or move bones.
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7978



View Profile WWW
« Reply #13 on: August 05, 2018, 15:55 »

So, I did more testing with gltf2-blender-importer Blender addon, and submitted an issue to it's author:
https://github.com/julienduroure/gltf2-blender-importer/issues/18
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7978



View Profile WWW
« Reply #14 on: August 05, 2018, 16:01 »

I've uploaded UModel with fixed root bone orientation. This won't fix Blender issue, but probably fixes the mesh itself.
Logged
Print 
« previous next »
Jump to:  

Powered by SMF | SMF © 2006-2009, Simple Machines LLC
Leviathan design by Bloc | XHTML | CSS