CJO Games Posted October 21, 2023 Share Posted October 21, 2023 I've managed to replicate this with another file - its a folder of assets which have been converted by Ultra to gltf format. The screenshots are copied below: RockyMoon.zip Quote Link to comment Share on other sites More sharing options...
Josh Posted October 21, 2023 Share Posted October 21, 2023 Thank you. This indicates there may be an error in a glTF file, or in my loader. I will investigate... Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted October 21, 2023 Share Posted October 21, 2023 The zip file above only includes one file, an .ultra map file. I will need the glTF files in order to investigate this (along with their .bin files and textures) Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
CJO Games Posted October 22, 2023 Author Share Posted October 22, 2023 I've attached tow random gltf meshes from the folder for you to look at and will send some mats separately. Yellow_Ladder_03.zip Yellow_Ladder_02.zip 1 Quote Link to comment Share on other sites More sharing options...
Josh Posted October 22, 2023 Share Posted October 22, 2023 I cannot load these files because the associated .bin file and textures are missing. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
CJO Games Posted October 22, 2023 Author Share Posted October 22, 2023 The original fbx files are here so that you can convert them yourself - I can't send you the mats as the folder is too large and I'm not actually sure which atlas is the correct one for the model... the only .bin file in the folder is attached - not sure if this is the correct one or not. buffer.zip Yellow_Ladder_02.zip Yellow_Ladder_03.zip Quote Link to comment Share on other sites More sharing options...
Josh Posted October 22, 2023 Share Posted October 22, 2023 What you can do is open the model in the asset editor, then select the File > Save As option and save a glTF to the desktop or in another folder somewhere, then zip those files up. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
CJO Games Posted October 22, 2023 Author Share Posted October 22, 2023 I would but as soon as I get to the files that are in .gltf format in the editor (however I do it) the error boxes come up and then as of today the editor crashes to desktop. If I use the editor to scroll the .fbx files it doesn't crash and no errors are present it is only once it reaches the .gltf files that the editor seems to have a problem. 1 Quote Link to comment Share on other sites More sharing options...
Josh Posted October 22, 2023 Share Posted October 22, 2023 Oh, I bet I know what is happening... Both these files are using "buffer.bin": { "asset": { "generator": "FBX2glTF v0.9.7", "version": "2.0" }, "scene": 0, "buffers": [ { "byteLength": 32208, "uri": "buffer.bin" } ], And: { "asset": { "generator": "FBX2glTF v0.9.7", "version": "2.0" }, "scene": 0, "buffers": [ { "byteLength": 34608, "uri": "buffer.bin" } ], Usually the bin file is named the same as the glTF, but your exporter is just saving it as "buffer.bin" for every file, overwriting the bin file used by other glTF files you export. So the editor is correctly reporting an error in the format because the data being read does not match one of the glTF files. You can either change this setting in your glTF exporter, or save each glTF file into a separate subfolder. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
CJO Games Posted October 22, 2023 Author Share Posted October 22, 2023 Oddly enough, I was just writing to suggest this as the possible problem as I had isolated each model type within there own folders .fbx; .mdl & .gltf and the problem had gone away... I also created a separate texture and materials folder with textures a sub folder of materials - I'm sure somebody better at code than me could explain how to do this automatically... thanks Josh! Quote Link to comment Share on other sites More sharing options...
Josh Posted October 22, 2023 Share Posted October 22, 2023 So the Facebook FBX to glTF converter does this, right? I don't see any CLI switches to change it: https://github.com/facebookincubator/FBX2glTF Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
reepblue Posted October 22, 2023 Share Posted October 22, 2023 1 minute ago, Josh said: So the Facebook FBX to glTF converter does this, right? I don't see any CLI switches to change it: To be honest, I had no luck using that tool. I accidentally copied over my Cyclone fbx files and it just made a bunch of useless garbage. I have better luck exporting as a gltf right out of blender. Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! Link to comment Share on other sites More sharing options...
CJO Games Posted October 22, 2023 Author Share Posted October 22, 2023 is this what this part eludes to? > FBX2glTF --binary --draco --verbose \ --input ~/models/source/butterfly.fbx \ --output ~/models/target/butterfly.glb so if the existing FBX2GLTF.lua included this in the process parameters? Quote Link to comment Share on other sites More sharing options...
Josh Posted October 22, 2023 Share Posted October 22, 2023 The only immediate fix is to add the --binary switch to the command line in line 10 of FBX2glTF.lua: local arguments = "--binary -i \""..path.."\" -o \""..output.."\"" This will save the file as a .glb with bin and textures packed into a single file. Reported this issue to Facebook here: https://github.com/facebookincubator/FBX2glTF/issues/304 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
CJO Games Posted October 22, 2023 Author Share Posted October 22, 2023 ah I see thanks again, Josh! Quote Link to comment Share on other sites More sharing options...
CJO Games Posted October 22, 2023 Author Share Posted October 22, 2023 Not sure if this is relevant but it would seem that Godot game engine are relying on their own build as the upstream is (according to their website) no longer maintained - link here: FBX Import (godotengine.org) perhaps there is some useful additions in their build that could be used to fashion something for Ultra? FBX2glTF-master.zip Quote Link to comment Share on other sites More sharing options...
Solution Josh Posted November 14, 2023 Solution Share Posted November 14, 2023 I added some code in the FBX convert script that loads the glTF file as JSON data, changes the name and location of the bin file, and resaves it. This fixes the problem and allows use of .gltf rather than .glb. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.