Just a quick question about glTF export.
I have to assume that script-controlled animations will not export properly. Been testing and I can use a standard regular non scripted exported glTF but anything with "heavy" bone manipulation using a script just gives errors on import into any supporting programs (Blender, Khronos, godot etc).
If this is the case I understand completely and even if slightly disappointed I can work around it.
glTF export does not work with scripted bone manipulation for animation
Moderators: Víctor Paredes, Belgarath, slowtiger
- synthsin75
- Posts: 10450
- Joined: Mon Jan 14, 2008 2:20 pm
- Location: Oklahoma
- Contact:
Re: glTF export does not work with scripted bone manipulation for animation
I wouldn't expect anything using layerscripts to work for glTF export, but anything that you can keyframe should work.
- Wes
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Donations: https://www.paypal.com/paypalme/synthsin75 (Thx, everyone.)
https://www.youtube.com/user/synthsin75
Scripting reference: https://mohoscripting.com/
Re: glTF export does not work with scripted bone manipulation for animation
I think part of the issue is that by default the glTF export looks for keyframed Frame Positions (any keyframe at a particular frame) and then jumps to those frames during the export. This is for speed, reduced output size and fidelity if subsequently editing the animation elements in application X after export.
So, on first run, any keyframed Frame Positions created by LayerScript won't exist. There are 2 possible approaches to resolving this:
1: Play the animation before export. This should create the LayerScripted keyframes, and assuming they persist - then they will be available when the export is run.
2: Use the 'Bake every frame' option. This will run the export in Frame-by-Frame mode, which will visit every (Interpolation Step) frame during export.
So, on first run, any keyframed Frame Positions created by LayerScript won't exist. There are 2 possible approaches to resolving this:
1: Play the animation before export. This should create the LayerScripted keyframes, and assuming they persist - then they will be available when the export is run.
2: Use the 'Bake every frame' option. This will run the export in Frame-by-Frame mode, which will visit every (Interpolation Step) frame during export.
Moho 14.4 » Win 11 Pro 64GB » NVIDIA GTX 1080ti 11GB
Moho 14.4 » Mac mini 2012 8GB » macOS 10.15 Catalina
Tube: SimplSam
Sam
Moho 14.4 » Mac mini 2012 8GB » macOS 10.15 Catalina
Tube: SimplSam
Sam
Re: glTF export does not work with scripted bone manipulation for animation
First off I am certain that my problem is probably the file itself. Some of you may know I tend to create massively over complex files with way too many bones.
I've fixed the file I've been testing and removed all scripting. I am only using bones with keys to move points. the bones are very simple for a run cycle of a character but the file still doesn't export. It exports but when used in blender khronos or Godot the animation isn't included it only displays frame 0. I have a simpler test file with just 3 bones a vector layer and it works after export.
I saw in the video demo a relatively complex character file included with Moho used as a sample of how the gltf export works. My file is only a wee tiny bit more complex but there could be features in it that are breaking the export. Are there any features that might not work when exporting to gilt? Is there a list of bone constraints that won't work?
Thanks for the help
I've fixed the file I've been testing and removed all scripting. I am only using bones with keys to move points. the bones are very simple for a run cycle of a character but the file still doesn't export. It exports but when used in blender khronos or Godot the animation isn't included it only displays frame 0. I have a simpler test file with just 3 bones a vector layer and it works after export.
I saw in the video demo a relatively complex character file included with Moho used as a sample of how the gltf export works. My file is only a wee tiny bit more complex but there could be features in it that are breaking the export. Are there any features that might not work when exporting to gilt? Is there a list of bone constraints that won't work?
Thanks for the help
Re: glTF export does not work with scripted bone manipulation for animation
One issue is masking. GLTF doesn't appear to like masking. I turned off masking on the main layer and the animation DID export.
Never mind!!! Got it to work... sort of... yes pretty well. It was my IMPORT SETTINGS. I fiddled with import settings in the other software and got it to show up correctly. It's a bit fiddly but should work. Now I can even go back and test my other versions to see if my changes were even absolutely needed. Sorry for ranting.
However, the layers were all moving based on the bones and keyframes, but they were randomly mixed up and reordered. The bicep switched with a leg, arm switched with a thigh etc etc. A complete mess but at LEAST i got the animation and it was "correct-ish". Just have to figure out why all my layers are flipping around randomly.
EDIT: Layers are not switched around. They are simply not aligned with the bones or rotation. It's like the translation/position isn't honored on export. I am going to spend the time to make all layers at 0 and move the vectors or visa versa.
Edit:
Giving up for now. It doesn't appear to be ready for prime time at least for me at the moment. Simply can't make it work. Plane vanilla file with standard vector layers and bones. I tried layer binding point binding reseting layer centers points etc. I keep getting offset layers that don't stick to the bones. Any information on the process would be helpful. There's plenty of other options for game import.
Never mind!!! Got it to work... sort of... yes pretty well. It was my IMPORT SETTINGS. I fiddled with import settings in the other software and got it to show up correctly. It's a bit fiddly but should work. Now I can even go back and test my other versions to see if my changes were even absolutely needed. Sorry for ranting.
However, the layers were all moving based on the bones and keyframes, but they were randomly mixed up and reordered. The bicep switched with a leg, arm switched with a thigh etc etc. A complete mess but at LEAST i got the animation and it was "correct-ish". Just have to figure out why all my layers are flipping around randomly.
EDIT: Layers are not switched around. They are simply not aligned with the bones or rotation. It's like the translation/position isn't honored on export. I am going to spend the time to make all layers at 0 and move the vectors or visa versa.
Edit:
Giving up for now. It doesn't appear to be ready for prime time at least for me at the moment. Simply can't make it work. Plane vanilla file with standard vector layers and bones. I tried layer binding point binding reseting layer centers points etc. I keep getting offset layers that don't stick to the bones. Any information on the process would be helpful. There's plenty of other options for game import.
Re: glTF export does not work with scripted bone manipulation for animation
Wooohooooo! Now I got it figured out this is awesome. A lot of it is weird attributes and goofy issues with the application you are importing into.