Gildor's Forums

Author Topic: Exporting skeletons from _Skeleton when _Skelmesh is broken/missing  (Read 160 times)
floxay
Newbie
*
Posts: 25



View Profile
Exporting skeletons from _Skeleton when _Skelmesh is broken/missing
« on: June 12, 2020, 21:11 »

To my understanding UE games have separate files for the skeleton and the mesh (usually named _Skeleton and _Skelmesh) and UE Viewer loads both of them.

Would it be somehow possible for UE Viewer to have an option to export only the skeleton from the _Skeleton file in case the _Skelmesh file is not present?

I'm not sure if PSK allows for only REFSKELT, if not maybe another format or some basic meshes (like cylinders or cuboids) drawn around parented bones (also maybe different materials for each of these for color coding)

Right now I have a JSON file after serializing the _Skeleton uexp&uasset but I just have no idea how could I get the skeleton loaded in for example Blender.
The whole point of this would be allowing the user to export the _Skeleton to a format (PSK?) which can be opened by Blender (or some other software) and applying PSA animations when a functional _Skelmesh is not present.
« Last Edit: June 12, 2020, 21:19 by floxay » Logged
Gildor
Administrator
Hero Member
*****
Posts: 7962



View Profile WWW
Re: Exporting skeletons from _Skeleton when _Skelmesh is broken/missing
« Reply #1 on: June 12, 2020, 21:25 »

Well ... UE Viewer has 2 types of Unreal assets. Exportable/viewable (like Texture, SkeletalMesh) and secondary, like AnimSequence, Skeleton, Socket. Secondary assets can't be loaded alone, without parent "exportable" asset.
In my "ActorX Importer for 3ds Max" script, there's an option for importing only the skeleton, ignoring any geometry. I don't know if Blender has such option. If that option would be enough for you (and if it's not in Blender plugin yet), I'd suggest asking the author of importer, he's a very kind guy and he supports his product well.
Logged
floxay
Newbie
*
Posts: 25



View Profile
Re: Exporting skeletons from _Skeleton when _Skelmesh is broken/missing
« Reply #2 on: June 12, 2020, 21:58 »

Edit: I since realized that if I want to apply psa animations on it the bone positions don't matter as it will be changed with the animation. I got the skeleton working with the animation perfectly, even the parented bones are working/moving fine

Sorry, I think I didn't explain it very well in the OP.

My issue isn't not being able to import only the skeleton in Blender as if I want that I could just simply delete the mesh after importing the full thing.



TLDR is: I don't have a _Skelmesh only a _Skeleton, but after serializing only the _Skeleton itself it seems to contain all what is needed to get a proper skeleton (more information what it contains below) for anims, I just can't import the JSON file I got from serializing the _Skeleton into Blender (or any other software).

So would it be possible for UE Viewer to receive a feature to extract only the skeleton directly from the _Skeleton file itself without even touching the _Skelmesh file (assuming it's non-existent) in a format which can be later imported into 3DS Max/Blender or other software?



My issue is that the model I have a psa animation for does not have a mesh (_Skelmesh) file only a skeleton (_Skeleton) file and because of this I can't check visually how the bones are placed nor apply psa animations on it (since UE Viewer only exports skeleton together with the mesh thus requiring both a _Skeleton and a _Skelmesh files but in my case I only have a _Skeleton file)

So I tried it myself with other tools to check whether the _Skeleton file could be used to get the positions of the bones;
After serializing the _Skeleton file alone (with a tool I found on github) I got a JSON file which seems to contain all the necessary information about the bones
(name, index, parent index [-1 if none], "rotation" XYZW, "translation" XYZ and "scale_3d" XYZ for each bone but I'm also not sure if the numbers are correct).

(Unless I'm missing something important) this leads me to believe that "exporting" the skeleton from the _Skeleton file without a _Skelmesh would produce a correct skeleton without a mesh which I could apply psa animations onto, I just simply hasn't found a way to import this file in any software as it is has very specific data layout and lacks a mesh, this is why I thought it'd be good idea implementing something like this in UE Viewer.

If you would like me to I can share the _Skeleton uexp and uasset, the JSON I got after serializing and the tool I used for serialization.
« Last Edit: June 13, 2020, 06:01 by floxay » Logged
Gildor
Administrator
Hero Member
*****
Posts: 7962



View Profile WWW
Re: Exporting skeletons from _Skeleton when _Skelmesh is broken/missing
« Reply #3 on: June 13, 2020, 09:49 »

If Skeleton exists, there should be a mesh using it. Otherwise, even is skeleton has related animations, they won't be used in a game. UE4 has a kind of garbage collector which won't let unused assets to be cooked.
Logged
Blenux
Moderator
Hero Member
*****
Posts: 839


Welcome to Gildor Land.


View Profile
Re: Exporting skeletons from _Skeleton when _Skelmesh is broken/missing
« Reply #4 on: June 16, 2020, 10:40 »

Befzz PSK Importer can Import Skel/Armatures only if needed (Skel Button).



Logged

Blender + Linux User Here.
floxay
Newbie
*
Posts: 25



View Profile
Re: Exporting skeletons from _Skeleton when _Skelmesh is broken/missing
« Reply #5 on: June 16, 2020, 12:36 »

Befzz PSK Importer can Import Skel/Armatures only if needed (Skel Button).

Thanks for your reply but as I already stated in my previous comment my issue's not being able to export the skeleton itself in the first place.

UModel only exports Skelmeshes as a whole (looking at the log, after opening a Skelmesh in UModel loads the Skelmesh and then all the necessary stuff for it for example the Skeleton and textures for a fancy built in 3D view) but since this "model" I want to export does not have a mesh for it (it is just a Skeleton) I simply just can't export it with UModel.
« Last Edit: June 16, 2020, 12:44 by floxay » Logged
Gildor
Administrator
Hero Member
*****
Posts: 7962



View Profile WWW
Re: Exporting skeletons from _Skeleton when _Skelmesh is broken/missing
« Reply #6 on: June 16, 2020, 12:47 »

UModel is supposed to work only with visual resources - meshes. I though a bit about doing visualization for abstract resources like skeleton and animation (without a mesh), it's hard to do - this will break many things, especially for engines where it is impossible, e.g. for UE3. Also, I see no significant reason for doing that for pure Skeleton. You'd better find a mesh which is using your skeleton and export it.
Logged
floxay
Newbie
*
Posts: 25



View Profile
Re: Exporting skeletons from _Skeleton when _Skelmesh is broken/missing
« Reply #7 on: June 16, 2020, 13:09 »

I completely understand your problem with a feature like this and thank you for still replying to this thread.

But how about not visualizing it in UModel just allowing the user to export the skeleton from the skeleton file itself for later use in other software? Right now it seems like UModel does not even try to do anything with the skeleton file itself as it says "Exported 0/0 objects in 0.0 sec"

Would that be easier to do? I don't know the "limitations" of the output formats (ActorX, glTF, md5mesh) which UModel uses for saving 3D models and their skeletons and whether if those are able to store only a skeleton without a mesh.

Quote from: Gildor
You'd better find a mesh which is using your skeleton and export it.
I'd do that and not bother you at all with my requests/questions if there were any meshes for this particular skeleton.
Logged
Gildor
Administrator
Hero Member
*****
Posts: 7962



View Profile WWW
Re: Exporting skeletons from _Skeleton when _Skelmesh is broken/missing
« Reply #8 on: June 16, 2020, 13:13 »

Would that be easier to do?
Same amount of work, same troubles.
Logged
floxay
Newbie
*
Posts: 25



View Profile
Re: Exporting skeletons from _Skeleton when _Skelmesh is broken/missing
« Reply #9 on: June 16, 2020, 13:18 »

Same amount of work, same troubles.

Oh, okay, thank you for your answer:)
« Last Edit: June 16, 2020, 14:05 by floxay » Logged
Jump to:  

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